diff --git a/e2e-tests/cypress/tests/integration/channels/account_settings/security/password_spec.ts b/e2e-tests/cypress/tests/integration/channels/account_settings/security/password_spec.ts index ff939820b6..e17e538f80 100644 --- a/e2e-tests/cypress/tests/integration/channels/account_settings/security/password_spec.ts +++ b/e2e-tests/cypress/tests/integration/channels/account_settings/security/password_spec.ts @@ -80,8 +80,8 @@ describe('Profile', () => { // # Save cy.uiSave(); - // * Verify for error message: "Must be 5-72 characters long." - cy.get('#clientError').should('be.visible').should('have.text', 'Must be 5-72 characters long.'); + // * Verify for error message: "Your password must be 5-72 characters long." + cy.get('#clientError').should('be.visible').should('have.text', 'Your password must be 5-72 characters long.'); }); it('MM-T2084 Password: Cancel out of password changes causes no changes to be made', () => { diff --git a/e2e-tests/cypress/tests/integration/channels/auth_sso/authentication_2_spec.ts b/e2e-tests/cypress/tests/integration/channels/auth_sso/authentication_2_spec.ts index 95d24b9673..9084008159 100644 --- a/e2e-tests/cypress/tests/integration/channels/auth_sso/authentication_2_spec.ts +++ b/e2e-tests/cypress/tests/integration/channels/auth_sso/authentication_2_spec.ts @@ -49,7 +49,7 @@ describe('Authentication', () => { cy.uiSave(); - cy.findByText('Must be 7-72 characters long.').should('be.visible'); + cy.findByText('Your password must be 7-72 characters long.').should('be.visible'); cy.apiLogout(); @@ -65,7 +65,7 @@ describe('Authentication', () => { cy.findByText('Create Account').click(); // * Assert the error is what is expected; - cy.findByText('Must be 7-72 characters long.').should('be.visible'); + cy.findByText('Your password must be 7-72 characters long.').should('be.visible'); cy.get('#input_password-input').clear().type('greaterthan7'); @@ -118,7 +118,7 @@ describe('Authentication', () => { cy.findByText('Create Account').click(); // * Assert the error is what is expected; - cy.findByText('Must be 5-72 characters long and include both lowercase and uppercase letters, numbers, and special characters.').should('be.visible'); + cy.findByText('Your password must be 5-72 characters long and include both lowercase and uppercase letters, numbers, and special characters.').should('be.visible'); }); }); diff --git a/e2e-tests/cypress/tests/integration/channels/auth_sso/authentication_4_spec.ts b/e2e-tests/cypress/tests/integration/channels/auth_sso/authentication_4_spec.ts index d53c73467e..ad5f76dd2e 100644 --- a/e2e-tests/cypress/tests/integration/channels/auth_sso/authentication_4_spec.ts +++ b/e2e-tests/cypress/tests/integration/channels/auth_sso/authentication_4_spec.ts @@ -58,7 +58,7 @@ describe('Authentication', () => { cy.visit('/login'); // # Remove autofocus from login input - cy.get('.login-body-card-content').should('be.visible').focus(); + cy.get('.login-body-card-title').click(); // # Clear email/username field and type username cy.apiGetClientLicense().then(({isLicensed}) => { diff --git a/e2e-tests/cypress/tests/integration/channels/enterprise/bot_accounts/managing_bot_accounts_spec.ts b/e2e-tests/cypress/tests/integration/channels/enterprise/bot_accounts/managing_bot_accounts_spec.ts index 867d963f49..30c6fcfb6d 100644 --- a/e2e-tests/cypress/tests/integration/channels/enterprise/bot_accounts/managing_bot_accounts_spec.ts +++ b/e2e-tests/cypress/tests/integration/channels/enterprise/bot_accounts/managing_bot_accounts_spec.ts @@ -28,8 +28,8 @@ describe('Managing bot accounts', () => { cy.apiLogout(); cy.visit('/login'); - // # Remove autofocus from login input - cy.get('.login-body-card-content').should('be.visible').focus(); + // # Click on card titile to remove auto focus from the email field + cy.get('.login-body-card-title').click(); // # Enter bot name in the email field cy.findByPlaceholderText('Email, Username or AD/LDAP Username', {timeout: TIMEOUTS.ONE_MIN}).clear().type(botName); diff --git a/e2e-tests/cypress/tests/integration/channels/signin_authentication/login_logout_smoke_spec.js b/e2e-tests/cypress/tests/integration/channels/signin_authentication/login_logout_smoke_spec.js index c104181236..cc2be7f873 100644 --- a/e2e-tests/cypress/tests/integration/channels/signin_authentication/login_logout_smoke_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/signin_authentication/login_logout_smoke_spec.js @@ -22,7 +22,7 @@ describe('SignIn Authentication', () => { cy.visit('/login'); // # Remove autofocus from login input - cy.get('.login-body-card-content').should('be.visible').focus(); + cy.get('.login-body-card-title').click(); }); }); @@ -48,7 +48,7 @@ describe('SignIn Authentication', () => { cy.url().should('include', '/login'); // # Remove autofocus from login input - cy.get('.login-body-card-content').should('be.visible').focus(); + cy.get('.login-body-card-title').click(); // # Enter actual user's username in the email field cy.findByPlaceholderText(loginPlaceholder).clear().type(testUser.username); diff --git a/e2e-tests/cypress/tests/integration/channels/signin_authentication/login_open_server_spec.js b/e2e-tests/cypress/tests/integration/channels/signin_authentication/login_open_server_spec.js index bfb0f199d4..4170b17430 100644 --- a/e2e-tests/cypress/tests/integration/channels/signin_authentication/login_open_server_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/signin_authentication/login_open_server_spec.js @@ -46,8 +46,8 @@ describe('Login page with open server', () => { // * Verify title of the document is correct cy.title().should('include', config.TeamSettings.SiteName); - // # Remove autofocus from login id input - cy.get('.login-body-card-content').should('be.visible').focus(); + // # Remove autofocus from login input + cy.get('.login-body-card-title').click(); // * Verify email/username field is present cy.findByPlaceholderText('Email or Username').should('exist').and('be.visible'); @@ -156,6 +156,9 @@ describe('Login page with open server', () => { it('MM-T3306_7 Should show error with invalid password', () => { const invalidPassword = `${Date.now()}-password`; + // Remove autofocus from login input + cy.get('.login-body-card-title').click(); + // # Lets verify generated password is not an actual password expect(invalidPassword).to.not.equal(testUser.password); @@ -173,6 +176,9 @@ describe('Login page with open server', () => { }); it('MM-T3306_8 Should login with a valid email and password and logout', () => { + // Remove autofocus from login input + cy.get('.login-body-card-title').click(); + // # Enter actual users email/username in the email field cy.findByPlaceholderText('Email or Username').clear().type(testUser.username); @@ -196,8 +202,8 @@ describe('Login page with open server', () => { // # Visit login page cy.visit('/login'); - // # Remove autofocus from login id input - cy.get('.login-body-card-content').should('be.visible').focus(); + // # Remove autofocus from login input + cy.get('.login-body-card-title').click(); // # Enter actual users email/username in the email field cy.findByPlaceholderText('Email or Username').clear().type(testUser.username); diff --git a/e2e-tests/cypress/tests/integration/channels/signin_authentication/signup_spec.js b/e2e-tests/cypress/tests/integration/channels/signin_authentication/signup_spec.js index 4cc15da233..71db9fb3fe 100644 --- a/e2e-tests/cypress/tests/integration/channels/signin_authentication/signup_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/signin_authentication/signup_spec.js @@ -75,7 +75,7 @@ describe('Signup Email page', () => { cy.findByText('You can use lowercase letters, numbers, periods, dashes, and underscores.').should('be.visible'); cy.get('#input_password-input').should('be.visible').and('have.attr', 'placeholder', 'Choose a Password'); - cy.findByText('Must be 5-72 characters long.').should('be.visible'); + cy.findByText('Your password must be 5-72 characters long.').should('be.visible'); cy.get('#saveSetting').scrollIntoView().should('be.visible'); cy.get('#saveSetting').should('contain', 'Create Account'); diff --git a/e2e-tests/cypress/tests/integration/channels/system_console/user_management/users_spec.js b/e2e-tests/cypress/tests/integration/channels/system_console/user_management/users_spec.js index d89ca3e74e..e6041c4f6d 100644 --- a/e2e-tests/cypress/tests/integration/channels/system_console/user_management/users_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/system_console/user_management/users_spec.js @@ -164,7 +164,7 @@ describe('System Console > User Management > Users', () => { // * Verify the appropriate error is returned. cy.get('form.form-horizontal').find('.has-error p.error').should('be.visible'). - and('contain', 'Must be 5-72 characters long.'); + and('contain', 'Your password must be 5-72 characters long.'); }); it('MM-T936 Users - System admin changes own password - Blank fields', () => { @@ -193,7 +193,7 @@ describe('System Console > User Management > Users', () => { // * Verify the appropriate error is returned. cy.get('form.form-horizontal').find('.has-error p.error').should('be.visible'). - and('contain', 'Must be 5-72 characters long.'); + and('contain', 'Your password must be 5-72 characters long.'); }); it('MM-T937 Users - System admin changes own password - Successfully changed', () => { diff --git a/e2e-tests/cypress/tests/support/common_login_commands.js b/e2e-tests/cypress/tests/support/common_login_commands.js index f732258575..04d1149679 100644 --- a/e2e-tests/cypress/tests/support/common_login_commands.js +++ b/e2e-tests/cypress/tests/support/common_login_commands.js @@ -5,7 +5,7 @@ import * as TIMEOUTS from '../fixtures/timeouts'; Cypress.Commands.add('checkLoginPage', (settings = {}) => { // # Remove autofocus from login input - cy.get('.login-body-card-content').should('be.visible').focus(); + cy.get('.login-body-card-title').click(); // * Check elements in the body cy.get('#input_loginId', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible').and(($loginTextbox) => { diff --git a/e2e-tests/playwright/lib/src/ui/pages/login.ts b/e2e-tests/playwright/lib/src/ui/pages/login.ts index 2f662aa2e0..a1397f8350 100644 --- a/e2e-tests/playwright/lib/src/ui/pages/login.ts +++ b/e2e-tests/playwright/lib/src/ui/pages/login.ts @@ -37,7 +37,7 @@ export default class LoginPage { this.loginPlaceholder = page.locator(`[placeholder="Email or Username"]`); this.loginWithAdLdapPlaceholder = page.locator(`[placeholder="Email, Username or AD/LDAP Username"]`); this.passwordInput = page.locator('#input_password-input'); - this.passwordToggleButton = page.getByRole('button', {name: 'Show or hide password'}); + this.passwordToggleButton = page.locator('#password_toggle'); this.signInButton = page.locator('button:has-text("Log in")'); this.createAccountLink = page.locator("text=Don't have an account?"); this.forgotPasswordLink = page.locator('text=Forgot your password?'); diff --git a/e2e-tests/playwright/lib/src/ui/pages/signup.ts b/e2e-tests/playwright/lib/src/ui/pages/signup.ts index 974e3a21a9..cb43497b3b 100644 --- a/e2e-tests/playwright/lib/src/ui/pages/signup.ts +++ b/e2e-tests/playwright/lib/src/ui/pages/signup.ts @@ -40,7 +40,7 @@ export default class SignupPage { this.emailInput = page.locator('#input_email'); this.usernameInput = page.locator('#input_name'); this.passwordInput = page.locator('#input_password-input'); - this.passwordToggleButton = page.getByRole('button', {name: 'Show or hide password'}); + this.passwordToggleButton = page.locator('#password_toggle'); this.createAccountButton = page.locator('button:has-text("Create Account")'); this.emailError = page.locator('text=Please enter a valid email address'); this.usernameError = page.locator( diff --git a/e2e-tests/playwright/specs/accessibility/common/login.spec.ts b/e2e-tests/playwright/specs/accessibility/common/login.spec.ts index ce50a4a9ab..dc4f346370 100644 --- a/e2e-tests/playwright/specs/accessibility/common/login.spec.ts +++ b/e2e-tests/playwright/specs/accessibility/common/login.spec.ts @@ -67,10 +67,6 @@ test('/login accessibility tab support', async ({pw}) => { // * Should move focus to login body after shift+tab await pw.loginPage.loginInput.press('Shift+Tab'); - expect(await pw.loginPage.bodyCard).toBeFocused(); - - // * Should move focus to create account link after shift+tab - await pw.loginPage.bodyCard.press('Shift+Tab'); expect(await pw.loginPage.createAccountLink).toBeFocused(); // * Should move focus to login body after tab diff --git a/e2e-tests/playwright/specs/accessibility/common/signup_user_complete.spec.ts b/e2e-tests/playwright/specs/accessibility/common/signup_user_complete.spec.ts index 2430c7c0fa..e0456404b6 100644 --- a/e2e-tests/playwright/specs/accessibility/common/signup_user_complete.spec.ts +++ b/e2e-tests/playwright/specs/accessibility/common/signup_user_complete.spec.ts @@ -79,14 +79,6 @@ test('/signup_user_complete accessibility tab support', async ({pw}, testInfo) = await pw.signupPage.emailInput.focus(); expect(await pw.signupPage.emailInput).toBeFocused(); - // * Should move focus to sign up body after shift+tab - await pw.signupPage.emailInput.press('Shift+Tab'); - expect(await pw.signupPage.bodyCard).toBeFocused(); - - // * Should move focus to sign up body after shift+tab - await pw.signupPage.emailInput.press('Shift+Tab'); - expect(await pw.signupPage.bodyCard).toBeFocused(); - if (testInfo.project.name === 'ipad') { // * Should move focus to header back button after shift+tab await pw.signupPage.bodyCard.press('Shift+Tab'); diff --git a/e2e-tests/playwright/specs/visual/common/login.spec.ts-snapshots/login-error-chrome-linux.png b/e2e-tests/playwright/specs/visual/common/login.spec.ts-snapshots/login-error-chrome-linux.png index 73b721da62..862c67ab70 100644 Binary files a/e2e-tests/playwright/specs/visual/common/login.spec.ts-snapshots/login-error-chrome-linux.png and b/e2e-tests/playwright/specs/visual/common/login.spec.ts-snapshots/login-error-chrome-linux.png differ diff --git a/e2e-tests/playwright/specs/visual/common/login.spec.ts-snapshots/login-error-firefox-linux.png b/e2e-tests/playwright/specs/visual/common/login.spec.ts-snapshots/login-error-firefox-linux.png index 8ed74c00e6..caab795ccb 100644 Binary files a/e2e-tests/playwright/specs/visual/common/login.spec.ts-snapshots/login-error-firefox-linux.png and b/e2e-tests/playwright/specs/visual/common/login.spec.ts-snapshots/login-error-firefox-linux.png differ diff --git a/e2e-tests/playwright/specs/visual/common/login.spec.ts-snapshots/login-error-ipad-linux.png b/e2e-tests/playwright/specs/visual/common/login.spec.ts-snapshots/login-error-ipad-linux.png index 650eaf69af..784cab742c 100644 Binary files a/e2e-tests/playwright/specs/visual/common/login.spec.ts-snapshots/login-error-ipad-linux.png and b/e2e-tests/playwright/specs/visual/common/login.spec.ts-snapshots/login-error-ipad-linux.png differ diff --git a/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-chrome-linux.png b/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-chrome-linux.png index 06ea901c3f..bc0be8b970 100644 Binary files a/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-chrome-linux.png and b/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-chrome-linux.png differ diff --git a/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-error-chrome-linux.png b/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-error-chrome-linux.png index d5972f27e2..87ad4bd352 100644 Binary files a/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-error-chrome-linux.png and b/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-error-chrome-linux.png differ diff --git a/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-error-firefox-linux.png b/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-error-firefox-linux.png index a12f34d332..138a562785 100644 Binary files a/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-error-firefox-linux.png and b/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-error-firefox-linux.png differ diff --git a/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-error-ipad-linux.png b/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-error-ipad-linux.png index 7dbe0fe185..c39669b25b 100644 Binary files a/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-error-ipad-linux.png and b/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-error-ipad-linux.png differ diff --git a/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-firefox-linux.png b/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-firefox-linux.png index a7da013cb6..965b46f964 100644 Binary files a/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-firefox-linux.png and b/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-firefox-linux.png differ diff --git a/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-ipad-linux.png b/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-ipad-linux.png index 696a505df6..dd50811e75 100644 Binary files a/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-ipad-linux.png and b/e2e-tests/playwright/specs/visual/common/signup_email.spec.ts-snapshots/signup-email-ipad-linux.png differ diff --git a/webapp/channels/src/components/alert_banner/index.tsx b/webapp/channels/src/components/alert_banner/index.tsx index 8af18a1126..e659815763 100644 --- a/webapp/channels/src/components/alert_banner/index.tsx +++ b/webapp/channels/src/components/alert_banner/index.tsx @@ -81,6 +81,7 @@ const AlertBanner = ({ return (
{getCardTitle()}
@@ -842,6 +847,7 @@ const Login = ({onCustomizeHeader}: LoginProps) => {
{enableCustomBrand && getMessageSubtitle()}
{alertBanner && (
Create your account
Create your account
{getCardTitle()}
@@ -801,8 +814,9 @@ const Signup = ({onCustomizeHeader}: SignupProps) => {
/>
)}
{enableSignUpWithEmail && (
-