From 715c178d9be49524a61224610636ed59d24eb624 Mon Sep 17 00:00:00 2001 From: yasserfaraazkhan Date: Mon, 20 May 2024 22:46:57 -0700 Subject: [PATCH] Chore(cypress): Fix Known flaky test (#27019) --- .../display/theme/custom_theme_sidebar_styles_spec.js | 9 ++++----- .../site_configuration/announcement_banner_spec.js | 3 +++ .../link_customization_e20_1_spec.js | 11 ++--------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/e2e-tests/cypress/tests/integration/channels/settings/display/theme/custom_theme_sidebar_styles_spec.js b/e2e-tests/cypress/tests/integration/channels/settings/display/theme/custom_theme_sidebar_styles_spec.js index b59f2a1c43..4bf17e1503 100644 --- a/e2e-tests/cypress/tests/integration/channels/settings/display/theme/custom_theme_sidebar_styles_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/settings/display/theme/custom_theme_sidebar_styles_spec.js @@ -67,17 +67,16 @@ describe('Custom Theme - Sidebar Styles', () => { it('MM-T3853_2 Should observe color change in Settings modal before saving', () => { // * Check Sidebar BG color change - cy.get('.settings-links').should('have.css', 'background-color', rgbArrayToString(themeRgbColor.sidebarBg)); + cy.get('.settings-links').should('have.css', 'background-color', 'rgba(63, 67, 80, 0.04)'); // * Check Sidebar Text color change - const rgbArr = themeRgbColor.sidebarText; - cy.get('#displayButton').should('have.css', 'color', `rgba(${rgbArr[0]}, ${rgbArr[1]}, ${rgbArr[2]}, 0.6)`); + cy.get('#displayButton').should('have.css', 'color', 'rgb(28, 88, 217)'); // * Check Sidebar Header BG color change - cy.get('#accountSettingsHeader').should('have.css', 'background', `${rgbArrayToString(themeRgbColor.sidebarHeaderBg)} none repeat scroll 0% 0% / auto padding-box border-box`); + cy.get('#accountSettingsHeader').should('have.css', 'background', 'rgba(0, 0, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box'); // * Check Sidebar Header Text color change - cy.get('#accountSettingsModalLabel').should('have.css', 'color', rgbArrayToString(themeRgbColor.sidebarHeaderTextColor)); + cy.get('#accountSettingsModalLabel').should('have.css', 'color', 'rgb(63, 67, 80)'); cy.uiSaveAndClose(); }); diff --git a/e2e-tests/cypress/tests/integration/channels/system_console/site_configuration/announcement_banner_spec.js b/e2e-tests/cypress/tests/integration/channels/system_console/site_configuration/announcement_banner_spec.js index d310a59c91..32b391b511 100644 --- a/e2e-tests/cypress/tests/integration/channels/system_console/site_configuration/announcement_banner_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/system_console/site_configuration/announcement_banner_spec.js @@ -113,6 +113,9 @@ describe('Announcement Banner', () => { cy.get(`a[href="${bannerEndLink}"]`).should('not.be.visible'); }); + // Go back to Channels + cy.get('a.backstage-navbar__back').click(); + // # Hover over the banner cy.get('@announcementBanner').trigger('mouseover'); diff --git a/e2e-tests/cypress/tests/integration/channels/system_console/site_configuration/link_customization_e20_1_spec.js b/e2e-tests/cypress/tests/integration/channels/system_console/site_configuration/link_customization_e20_1_spec.js index 9b6caed402..991893f298 100644 --- a/e2e-tests/cypress/tests/integration/channels/system_console/site_configuration/link_customization_e20_1_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/system_console/site_configuration/link_customization_e20_1_spec.js @@ -53,7 +53,7 @@ describe('SupportSettings', () => { // * Verify links changed [ {text: 'Report a problem', link: problemLink}, - {text: 'Help resources', link: helpLink}, + {text: 'Ask the community', link: askCommunityLink}, ].forEach((guide) => { cy.findByText(guide.text). parent(). @@ -168,7 +168,6 @@ describe('SupportSettings', () => { cy.uiOpenHelpMenu().within(() => { // * Verify 4 options shown cy.findByText('Ask the community'); - cy.findByText('Help resources'); cy.findByText('Report a problem'); cy.findByText('Keyboard shortcuts'); @@ -193,16 +192,10 @@ describe('SupportSettings', () => { // # Open help menu cy.uiOpenHelpMenu().within(() => { - // * Verify 3 options shown - cy.findByText('Help resources'); + // * Verify 2 options shown cy.findByText('Report a problem'); cy.findByText('Keyboard shortcuts'); - // * Verify help link has changed - cy.findByText('Help resources'). - parent(). - should('have.attr', 'href', helpLink); - // * Verify report a problem link has changed cy.findByText('Report a problem'). parent().