test: Added branding related test for the community user#38460
test: Added branding related test for the community user#38460sagar-qa007 merged 2 commits intoreleasefrom
Conversation
WalkthroughThis pull request introduces a new Cypress test suite for validating branding settings in the Admin Settings page. The changes include a comprehensive test case that checks logo and favicon uploads across different file formats, verifies UI element visibility, and ensures proper logo display. Simultaneously, the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/client/cypress/locators/AdminsSettings.js (1)
50-72: Consider using data- attributes for selectors.*The code here uses CSS classes (like
".t--settings-category-branding") for selectors. Although this seems consistent with the existing code, the guidelines recommend usingdata-*attributes to ensure stable and maintainable selectors.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
app/client/cypress/fixtures/appsmith-community-logo.svgis excluded by!**/*.svgapp/client/cypress/fixtures/branding_sample.pngis excluded by!**/*.pngapp/client/cypress/fixtures/branding_sampleICO.icois excluded by!**/*.icoapp/client/cypress/fixtures/branding_samplejpg.jpgis excluded by!**/*.jpg
📒 Files selected for processing (2)
app/client/cypress/e2e/Regression/ClientSide/AdminSettings/Branding_settings_Spec.ts(1 hunks)app/client/cypress/locators/AdminsSettings.js(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
app/client/cypress/e2e/Regression/ClientSide/AdminSettings/Branding_settings_Spec.ts (1)
Pattern app/client/cypress/**/**.*: Review the following e2e test code written using the Cypress test library. Ensure that:
- Follow best practices for Cypress code and e2e automation.
- Avoid using cy.wait in code.
- Avoid using cy.pause in code.
- Avoid using agHelper.sleep().
- Use locator variables for locators and do not use plain strings.
- Use data-* attributes for selectors.
- Avoid Xpaths, Attributes and CSS path.
- Avoid selectors like .btn.submit or button[type=submit].
- Perform logins via API with LoginFromAPI.
- Perform logout via API with LogOutviaAPI.
- Perform signup via API with SignupFromAPI.
- Avoid using it.only.
- Avoid using after and aftereach in test cases.
- Use multiple assertions for expect statements.
- Avoid using strings for assertions.
- Do not use duplicate filenames even with different paths.
- Avoid using agHelper.Sleep, this.Sleep in any file in code.
app/client/cypress/locators/AdminsSettings.js (1)
Pattern app/client/cypress/**/**.*: Review the following e2e test code written using the Cypress test library. Ensure that:
- Follow best practices for Cypress code and e2e automation.
- Avoid using cy.wait in code.
- Avoid using cy.pause in code.
- Avoid using agHelper.sleep().
- Use locator variables for locators and do not use plain strings.
- Use data-* attributes for selectors.
- Avoid Xpaths, Attributes and CSS path.
- Avoid selectors like .btn.submit or button[type=submit].
- Perform logins via API with LoginFromAPI.
- Perform logout via API with LogOutviaAPI.
- Perform signup via API with SignupFromAPI.
- Avoid using it.only.
- Avoid using after and aftereach in test cases.
- Use multiple assertions for expect statements.
- Avoid using strings for assertions.
- Do not use duplicate filenames even with different paths.
- Avoid using agHelper.Sleep, this.Sleep in any file in code.
🔇 Additional comments (1)
app/client/cypress/e2e/Regression/ClientSide/AdminSettings/Branding_settings_Spec.ts (1)
1-108: Well-structured Cypress test suite.No forbidden usage (like
cy.wait,cy.pause, orit.only) is found; consistent use of external locators for UI elements is effective. Good job!
| loginContainer: ".t--login-container", | ||
| signupLink: ".t--signup-link", | ||
| authContainer: ".t--auth-container", | ||
| submitButton: "button[type='submit']", |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Avoid using button[type='submit'] as a selector.
According to the guidelines, please replace this with a data-* based attribute to ensure robust and maintainable selectors.
- submitButton: "button[type='submit']",
+ submitButton: "[data-testid='t--submit-button']",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| submitButton: "button[type='submit']", | |
| submitButton: "[data-testid='t--submit-button']", |
…#38460) ## Description Admin setting Test case for branding Fixes # https://app.zenhub.com/workspaces/stability-pod-6690c4814e31602e25cab7fd/issues/gh/appsmithorg/appsmith/38459 ## Automation /ok-to-test tags="@tag.Settings,@tag.Sanity" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/12593006493> > Commit: 7e05339 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12593006493&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Settings,@tag.Sanity` > Spec: > <hr>Fri, 03 Jan 2025 08:28:02 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Tests** - Added a new Cypress test suite for validating Admin Branding Page settings - Implemented test case for verifying branding data updates for community users - Tested logo and favicon uploads in various image formats - **Locators** - Added multiple new locators for Admin Settings UI elements - Introduced locators for branding, authentication, and application management interfaces <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Description
Admin setting Test case for branding
Fixes # https://app.zenhub.com/workspaces/stability-pod-6690c4814e31602e25cab7fd/issues/gh/appsmithorg/appsmith/38459
Automation
/ok-to-test tags="@tag.Settings,@tag.Sanity"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12593006493
Commit: 7e05339
Cypress dashboard.
Tags:
@tag.Settings,@tag.SanitySpec:
Fri, 03 Jan 2025 08:28:02 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Tests
Locators