This document outlines all the coding standard issues found in the project and provides a guide for fixing them.
The word "Customer" is misspelled as "Costumer" throughout the project. This affects multiple files and all their references.
Interface Files:
Projects/Guru99BankTestAutomation/Interface/IEditCostumerPage.ts→IEditCustomerPage.tsProjects/Guru99BankTestAutomation/Interface/INewCostumerPage.ts→INewCustomerPage.tse2e_tests/Interface/IEditCostumerPage.js→IEditCustomerPage.jse2e_tests/Interface/INewCostumerPage.js→INewCustomerPage.js
Page Action Files:
Projects/Guru99BankTestAutomation/Pages/Actions/EditCostumerPage.ts→EditCustomerPage.tsProjects/Guru99BankTestAutomation/Pages/Actions/NewCostumerPage.ts→NewCustomerPage.tse2e_tests/Pages/Actions/EditCostumerPage.js→EditCustomerPage.jse2e_tests/Pages/Actions/NewCostumerPage.js→NewCustomerPage.js
Locator Files:
Projects/Guru99BankTestAutomation/Pages/Locators/EditCostumerPageLocators.ts→EditCustomerPageLocators.tsProjects/Guru99BankTestAutomation/Pages/Locators/NewCostumerPageLocators.ts→NewCustomerPageLocators.tse2e_tests/Pages/Locators/EditCostumerPageLocators.js→EditCustomerPageLocators.jse2e_tests/Pages/Locators/NewCostumerPageLocators.js→NewCustomerPageLocators.js
Test Files:
Projects/Guru99BankTestAutomation/TestCases/EditCostumerPageTest.ts→EditCustomerPageTest.tsProjects/Guru99BankTestAutomation/TestCases/NewCostumerPageTest.ts→NewCustomerPageTest.tse2e_tests/TestCases/EditCostumerPageTest.js→EditCustomerPageTest.jse2e_tests/TestCases/NewCostumerPageTest.js→NewCustomerPageTest.js
After renaming files, update all import statements and references:
-
Export Files:
ExportInterface.ts/ExportInterface.jsExportLocators.ts/ExportLocators.jsExportPages.ts/ExportPages.js
-
HomePage references:
- Update method:
clickOnNewCostumerLink()→clickOnNewCustomerLink() - Update method:
clickOnEditCostumerLink()→clickOnEditCustomerLink()
- Update method:
-
Test Data:
NewCostumerData→NewCustomerData- All properties:
costumer*→customer*
-
Config file:
- Update suite references
-
All test cases:
- Update variable names
- Update method calls
- Update comments
-
Inconsistent variable naming in test files:
// Current (inconsistent) let newCostumerPage: INewCostumerPage; // Should be let newCustomerPage: INewCustomerPage;
-
Method names with typos:
// Current costumerNameInvalidCharacterVerify() // Should be customerNameInvalidCharacterVerify()
-
Test descriptions with typos:
// Current it("Verify costumer name field with...") // Should be it("Verify customer name field with...")
All interfaces follow the correct pattern: I prefix + PascalCase ✅
Example:
ILoginPageIHomePageIDeleteCustomerPage
Classes follow PascalCase pattern ✅
Example:
LoginPageHomePageTestUtil
- Missing JSDoc comments on public methods
- Inconsistent comment style (some use //, some use /* */)
- Outdated or incorrect comments
/**
* Verifies customer name field with invalid characters
* @param {string} input - The input to test
* @returns {Promise<string>} The validation message
*/
public async customerNameInvalidCharacterVerify(input: string): Promise<string> {
// Implementation
}-
Mixed compiled and source files:
- Both
Projects/ande2e_tests/directories exist e2e_tests/contains compiled JavaScript- Need to ensure
.gitignoreexcludes compiled files
- Both
-
Test Reports in repository:
allure-results/should be in.gitignoreTestReports/should be in.gitignoreOldTestReports/should be removed
-
Log files in repository:
Guru99Bank.logshould be in.gitignoreGuru99Bank.log.%d{...}files should be removed
# Compiled output
e2e_tests/
*.js
*.js.map
# Test reports
allure-results/
TestReports/
OldTestReports/
SampleReport/
# Logs
*.log
*.log.*
# Python cache
__pycache__/
*.pyc
# OS files
.DS_Store
Thumbs.db
# IDE
.idea/
.vscode/
*.swp
*.swo
# Dependencies
node_modules/
package-lock.jsonUse this checklist when implementing fixes:
- Rename Interface files (IEditCostumerPage, INewCostumerPage)
- Rename Page Action files (EditCostumerPage, NewCostumerPage)
- Rename Locator files (*CostumerPageLocators)
- Rename Test files (*CostumerPageTest)
- Update all import statements
- Update Export files (ExportInterface, ExportLocators, ExportPages)
- Update HomePage methods (clickOnNew/EditCostumer → clickOnNew/EditCustomer)
- Update test data class names and properties
- Update all variable names in tests
- Update all method names
- Update test descriptions and comments
- Delete e2e_tests/ directory
- Run
npm run tscto recompile - Verify no compilation errors
- Add JSDoc comments to public methods
- Update README.md if needed
- Update CONTRIBUTING.md examples
- Update .gitignore
- Remove compiled files from git
- Remove old test reports
- Remove log files
- Commit changes with proper message
Here's a bash script to help automate some of the renaming:
#!/bin/bash
# Navigate to project root
cd /Users/lkumarrajput/Developer/Code/ProtractorPageObjectModel
# Rename Interface files
mv Projects/Guru99BankTestAutomation/Interface/IEditCostumerPage.ts \
Projects/Guru99BankTestAutomation/Interface/IEditCustomerPage.ts
mv Projects/Guru99BankTestAutomation/Interface/INewCostumerPage.ts \
Projects/Guru99BankTestAutomation/Interface/INewCustomerPage.ts
# Rename Page Action files
mv Projects/Guru99BankTestAutomation/Pages/Actions/EditCostumerPage.ts \
Projects/Guru99BankTestAutomation/Pages/Actions/EditCustomerPage.ts
mv Projects/Guru99BankTestAutomation/Pages/Actions/NewCostumerPage.ts \
Projects/Guru99BankTestAutomation/Pages/Actions/NewCustomerPage.ts
# Rename Locator files
mv Projects/Guru99BankTestAutomation/Pages/Locators/EditCostumerPageLocators.ts \
Projects/Guru99BankTestAutomation/Pages/Locators/EditCustomerPageLocators.ts
mv Projects/Guru99BankTestAutomation/Pages/Locators/NewCostumerPageLocators.ts \
Projects/Guru99BankTestAutomation/Pages/Locators/NewCustomerPageLocators.ts
# Rename Test files
mv Projects/Guru99BankTestAutomation/TestCases/EditCostumerPageTest.ts \
Projects/Guru99BankTestAutomation/TestCases/EditCustomerPageTest.ts
mv Projects/Guru99BankTestAutomation/TestCases/NewCostumerPageTest.ts \
Projects/Guru99BankTestAutomation/TestCases/NewCustomerPageTest.ts
echo "File renaming complete!"
echo "Next steps:"
echo "1. Update import statements in all files"
echo "2. Search and replace 'Costumer' with 'Customer' in code"
echo "3. Delete e2e_tests/ directory"
echo "4. Run 'npm run tsc' to recompile"Use these patterns in your IDE for bulk find-and-replace:
| Find | Replace | Scope |
|---|---|---|
Costumer |
Customer |
All .ts files |
costumer |
customer |
All .ts files |
IEditCostumer |
IEditCustomer |
All files |
INewCostumer |
INewCustomer |
All files |
EditCostumer |
EditCustomer |
All files |
NewCostumer |
NewCustomer |
All files |
Note: Be careful with search and replace. Review each change before applying.
- 🔴 Critical: Breaks functionality or causes confusion (typos in names)
- 🟡 Important: Violates coding standards but doesn't break functionality
- 🟢 Nice to have: Improvements for consistency and maintainability
-
High Priority:
- Fix "Costumer" typo (Critical for professionalism)
- Update .gitignore (Prevents repository bloat)
- Remove compiled files from git
-
Medium Priority:
- Add JSDoc comments
- Standardize comment style
- Update documentation
-
Low Priority:
- Code formatting consistency
- Variable name improvements
- Additional helper methods
If you encounter issues while fixing these problems:
- Check the CONTRIBUTING.md for guidelines
- Review the examples in this document
- Create an issue on GitHub
- Ask for code review before committing large changes
Last Updated: October 16, 2025