We have instances where testIDs are not consistently stored in variables. This lack of uniformity can lead to redundant testID declarations throughout the codebase, resulting in code that is harder to maintain and prone to errors.
For instance, consider the following code snippet: testID={'request-qrcode-button'}. This line directly specifies a testID value within the code, and similar declarations may be scattered throughout the codebase.
A more effective and best-practice approach is to store the testID value as a variable and then reference that variable when defining the testID property. By doing so, we centralize the testID values, reducing redundancy and making it easier to manage and maintain these identifiers throughout the codebase. This approach enhances code consistency and reduces the likelihood of introducing errors, ultimately contributing to a more robust and maintainable codebase.
Technical details:
Replace all string definitions used for testIDs. For example: testID={BrowserUrlModalSelectorsIDs.CONTAINER}
All variables should be group by the file where they're being call
All variables should be group in a JSON
File structure should follow a similar structure as the main app structure
Acceptance Criteria
[ ] pr_regression_e2e_pipeline and pr_smoke_e2e_pipeline in bitrise should have passing tests
[ ] These files should no longer have selector strings in the TestID prop:
app/components/Views/SDKSessionsManager/SDKSessionsManager.tsx
app/components/Views/Settings/AdvancedSettings/index.js
app/components/Views/Settings/AppInformation/index.js
app/components/Views/Settings/NetworksSettings/index.js
app/components/Views/Settings/SecuritySettings/SecuritySettings.tsx
app/components/Views/Settings/SecuritySettings/Sections/LoginOptionsSettings.tsx
app/components/Views/WalletConnectSessions/index.js
Description
We have instances where testIDs are not consistently stored in variables. This lack of uniformity can lead to redundant testID declarations throughout the codebase, resulting in code that is harder to maintain and prone to errors.
For instance, consider the following code snippet:
testID={'request-qrcode-button'}.
This line directly specifies a testID value within the code, and similar declarations may be scattered throughout the codebase.A more effective and best-practice approach is to store the testID value as a variable and then reference that variable when defining the testID property. By doing so, we centralize the testID values, reducing redundancy and making it easier to manage and maintain these identifiers throughout the codebase. This approach enhances code consistency and reduces the likelihood of introducing errors, ultimately contributing to a more robust and maintainable codebase.
Technical details:
Replace all string definitions used for testIDs. For example:
testID={BrowserUrlModalSelectorsIDs.CONTAINER}
All variables should be group by the file where they're being call All variables should be group in a JSON File structure should follow a similar structure as the main app structureAcceptance Criteria
[ ] pr_regression_e2e_pipeline and pr_smoke_e2e_pipeline in bitrise should have passing tests
[ ] These files should no longer have selector strings in the TestID prop: app/components/Views/SDKSessionsManager/SDKSessionsManager.tsx app/components/Views/Settings/AdvancedSettings/index.js app/components/Views/Settings/AppInformation/index.js app/components/Views/Settings/NetworksSettings/index.js app/components/Views/Settings/SecuritySettings/SecuritySettings.tsx app/components/Views/Settings/SecuritySettings/Sections/LoginOptionsSettings.tsx app/components/Views/WalletConnectSessions/index.js