The project currently uses PascalCase for folders, which is non-standard for TypeScript/JavaScript projects.
- kebab-case (lowercase with hyphens):
test-cases/,page-objects/,test-data/ - Reason: Platform-agnostic, URL-friendly, widely used in npm packages and modern frameworks
- PascalCase: For classes, components, interfaces
LoginPage.ts,IHomePage.ts,UserService.ts
- camelCase: For utilities, helpers, config files
testUtil.ts,configLoader.ts,dataProvider.ts
- kebab-case: For test files (alternative convention)
login-page.spec.ts,home-page.test.ts
| Current | Proposed | Reason |
|---|---|---|
Config/ |
config/ |
Standard lowercase for config folders |
Exception/ |
exceptions/ |
Plural + lowercase |
Exports/ |
exports/ |
Standard lowercase |
Interface/ |
interfaces/ |
Plural + lowercase |
LogManager/ |
log-manager/ |
kebab-case for multi-word |
Pages/ |
pages/ |
Standard lowercase |
Pages/Actions/ |
pages/actions/ |
Nested lowercase |
Pages/BasePage/ |
pages/base/ |
Simplified + lowercase |
Pages/Locators/ |
pages/locators/ |
Nested lowercase |
Suites/ |
suites/ |
Standard lowercase |
TestCases/ |
test-cases/ |
kebab-case for multi-word |
TestData/ |
test-data/ |
kebab-case for multi-word |
TestReports/ |
test-reports/ |
kebab-case for multi-word |
Utils/ |
utils/ |
Standard lowercase |
OldTestReports/ |
DELETE | Should not be in repository |
SampleReport/ |
DELETE | Should not be in repository |
Config.ts→config.ts(configuration file, not a class)Suites.ts→suites.ts(configuration file)Data.ts→data.tsortestData.ts(data file)
TestUtil.ts→ Keep (it's a class)PageFactory.ts→ Keep (it's a class/factory)LogUtils.ts→ Keep (it's a class)ConfigLog4j.ts→configLog4j.tsorlog4jConfig.ts(config file)
LoginPageTest.ts→loginPage.spec.tsor keep as isHomePageTest.ts→homePage.spec.tsor keep as is
- Rename all folders to lowercase/kebab-case
- Update all import paths in TypeScript files
- Update tsconfig.json if needed
- Test compilation
- Rename configuration files to camelCase
- Update imports
- Test compilation
- Rename to .spec.ts or .test.ts convention
- Update suite configuration
- Test execution
- Consistency: Aligns with industry standards
- Cross-platform: Works on case-sensitive file systems
- Tool Compatibility: Better support in build tools and IDEs
- Community Standards: Matches conventions in popular frameworks (Angular, React, Vue)
- npm Package Conventions: Follows common npm package structures
- TypeScript Official Documentation
- Angular Style Guide
- React Best Practices
- ESLint/Prettier Conventions
- npm Package Guidelines
Recommendation: Start with Phase 1 (folders only) as it provides the most impact with manageable complexity.