This document outlines the TypeScript file naming convention updates that have been COMPLETED to align with industry standards.
All TypeScript files have been successfully renamed according to coding standards.
✅ Classes, Interfaces, Types, Enums
LoginPage.ts- Page Object classILoginPage.ts- Interface definitionLoginPageLocators.ts- Locators classTestUtil.ts- Utility classInvalidElementFinder.ts- Exception classPageFactory.ts- Factory class
✅ Configuration files, Data files, Module exports
config.ts- Configuration object/settingssuites.ts- Suite configuration/datadata.ts- Test data definitionsindex.ts- Barrel export files
| Old Name | New Name | Reason | Location |
|---|---|---|---|
Config.ts |
✅ config.ts |
Configuration file, not a class | config/ |
ConfigLog4j.ts |
✅ log4jConfig.ts |
Configuration file for log4j | log-manager/ |
Suites.ts |
✅ suites.ts |
Suite configuration data | suites/ |
Data.ts |
✅ testData.ts |
Test data definitions | test-data/ |
| Old Name | New Name | Reason | Location |
|---|---|---|---|
ExportInterface.ts |
✅ interfaces.ts |
Descriptive barrel export | exports/ |
ExportLocators.ts |
✅ locators.ts |
Descriptive barrel export | exports/ |
ExportPages.ts |
✅ pages.ts |
Descriptive barrel export | exports/ |
ExportUtils.ts |
✅ utils.ts |
Descriptive barrel export | exports/ |
| Old Name | New Name | Reason | Location |
|---|---|---|---|
LoginPageTest.ts |
✅ loginPage.spec.ts |
Jasmine/Protractor .spec.ts convention | test-cases/ |
HomePageTest.ts |
✅ homePage.spec.ts |
Jasmine/Protractor .spec.ts convention | test-cases/ |
NewCustomerPageTest.ts |
✅ newCustomerPage.spec.ts |
Jasmine/Protractor .spec.ts convention | test-cases/ |
EditCustomerPageTest.ts |
✅ editCustomerPage.spec.ts |
Jasmine/Protractor .spec.ts convention | test-cases/ |
DeleteCustomerPageTest.ts |
✅ deleteCustomerPage.spec.ts |
Jasmine/Protractor .spec.ts convention | test-cases/ |
Note: Modern imports now use descriptive names:
// Updated imports:
import { LoginPage } from '../exports/pages';
import { ILoginPage } from '../exports/interfaces';
import { LoginPageElements } from '../exports/locators';
import { TestUtil } from '../exports/utils';All of these follow PascalCase correctly because they export classes:
IDeleteCustomerPage.tsIEditCustomerPage.tsIHomePage.tsILoginPage.tsINewCustomerPage.tsITestUtil.ts
Page.ts- Base page classDeleteCustomerPage.ts- Page classEditCustomerPage.ts- Page classHomePage.ts- Page classLoginPage.ts- Page classNewCustomerPage.ts- Page classDeleteCustomerPageLocators.ts- Locators classEditCustomerPageLocators.ts- Locators classHomePageLocators.ts- Locators classLoginPageLocators.ts- Locators classNewCustomerPageLocators.ts- Locators classTestUtil.ts- Utility classPageFactory.ts- Factory classLogUtils.ts- Utility classInvalidElementFinder.ts- Exception class
DeleteCustomerPageTest.tsEditCustomerPageTest.ts→ ✅HomePageTest.tshomePage.spec.ts→ ✅LoginPageTest.tsloginPage.spec.ts→ ✅NewCustomerPageTest.tsnewCustomerPage.spec.ts
All phases have been successfully completed:
- All config and data files renamed to camelCase
- All imports updated
- TypeScript compilation successful
- Renamed to descriptive camelCase names (interfaces.ts, locators.ts, pages.ts, utils.ts)
- All imports updated throughout the codebase
- Modern, clear naming that indicates purpose
- Renamed all test files to .spec.ts (Jasmine/Protractor standard)
- Updated suite configuration
- All imports updated
- ✅ Industry Standard: Now matches TypeScript/JavaScript conventions (Angular, React, Node.js)
- ✅ Clear Distinction: Visual difference between classes and configuration/data files
- ✅ Better Tooling: IDEs can better understand file purposes
- Consistency: Aligns with npm ecosystem and popular frameworks
- Self-Documenting: File naming immediately indicates its purpose