-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Admin setting new test cases with email #38522
base: release
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request focuses on enhancing Cypress end-to-end testing for email settings in an application. The changes introduce comprehensive tests for admin email configurations, including SMTP setup, user invitations, and password reset functionality. The modifications span multiple files, adding new locators, email verification methods, and updating header validation to improve test robustness and flexibility. Changes
Sequence DiagramsequenceDiagram
participant User
participant AdminSettings
participant SMTPServer
participant EmailService
User->>AdminSettings: Configure SMTP Settings
AdminSettings->>SMTPServer: Test Connection
SMTPServer-->>AdminSettings: Confirm Configuration
User->>AdminSettings: Send Test Email
AdminSettings->>EmailService: Trigger Email
EmailService->>SMTPServer: Transmit Email
SMTPServer-->>User: Deliver Email
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
app/client/cypress/locators/SignupPage.json (2)
8-10
: LGTM on JSON structure, but locator needs improvementThe new locator should use data-* attributes instead of href for better maintainability.
- "forgetPasswordLink": "[href='/user/forgotPassword']" + "forgetPasswordLink": "[data-testid='t--forgot-password-link']"
Line range hint
1-10
: Consider refactoring all selectors to use data- attributes*Several selectors in this file use attribute selectors or CSS classes which are fragile and against best practices.
{ - "username": "input[name='email']", - "password": "input[name='password']", - "submitBtn": "button[type='submit']", + "username": "[data-testid='t--email-input']", + "password": "[data-testid='t--password-input']", + "submitBtn": "[data-testid='t--submit-button']", "proficiencyGroupButton": "[data-testid='t--user-proficiency'] button", "useCaseGroupButton": "[data-testid='t--user-use-case'] button", - "dropdownOption": ".rc-select-item-option:first", - "getStartedSubmit": ".t--get-started-button", - "forgetPasswordLink": "[href='/user/forgotPassword']" + "dropdownOption": "[data-testid='t--dropdown-option']", + "getStartedSubmit": "[data-testid='t--get-started-button']", + "forgetPasswordLink": "[data-testid='t--forgot-password-link']" }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
app/client/cypress/e2e/Regression/ClientSide/AdminSettings/Email_settings_Spec.ts
(1 hunks)app/client/cypress/locators/AdminsSettings.js
(1 hunks)app/client/cypress/locators/SignupPage.json
(1 hunks)app/client/cypress/support/Pages/AggregateHelper.ts
(1 hunks)app/client/cypress/support/Pages/HomePage.ts
(4 hunks)
👮 Files not reviewed due to content moderation or server errors (4)
- app/client/cypress/locators/AdminsSettings.js
- app/client/cypress/e2e/Regression/ClientSide/AdminSettings/Email_settings_Spec.ts
- app/client/cypress/support/Pages/HomePage.ts
- app/client/cypress/support/Pages/AggregateHelper.ts
🧰 Additional context used
📓 Path-based instructions (5)
app/client/cypress/locators/SignupPage.json (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/support/Pages/HomePage.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/support/Pages/AggregateHelper.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/e2e/Regression/ClientSide/AdminSettings/Email_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.
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: perform-test / rts-build / build
- GitHub Check: client-lint / client-lint
- GitHub Check: client-build / client-build
- GitHub Check: client-prettier / prettier-check
Description
New cypress test case for admin setting
Fixes # https://app.zenhub.com/workspaces/stability-pod-6690c4814e31602e25cab7fd/issues/gh/appsmithorg/appsmith/38459
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Caution
🔴 🔴 🔴 Some tests have failed.
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12664257144
Commit: dc6c585
Cypress dashboard.
Tags: @tag.All
Spec:
The following are new failures, please fix them before merging the PR:
Wed, 08 Jan 2025 06:15:37 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Tests
Locators
Improvements