Fix(cypress): Fix e2e failing on master (#32494)
Этот коммит содержится в:
@@ -296,12 +296,12 @@ function verifySearchAutocomplete(index, type = 'user') {
|
||||
const usernameLength = 12;
|
||||
const displayName = text.substring(1, usernameLength) + ' ' + text.substring(usernameLength, text.length);
|
||||
const userAriaLabel = getUserMentionAriaLabel(displayName);
|
||||
cy.wrap(el).parents('#searchFormContainer').find('.sr-only').should('have.attr', 'aria-live', 'polite').and('have.text', userAriaLabel);
|
||||
cy.wrap(el).parents('#searchBox').find('.sr-only').should('have.attr', 'aria-live', 'polite').and('contain.text', userAriaLabel);
|
||||
});
|
||||
} else if (type === 'channel') {
|
||||
cy.get('.suggestion-list__ellipsis').invoke('text').then((text) => {
|
||||
const channel = text.split('~')[1].toLowerCase().trim();
|
||||
cy.wrap(el).parents('#searchFormContainer').find('.sr-only').should('have.attr', 'aria-live', 'polite').and('have.text', channel);
|
||||
cy.wrap(el).parents('#searchBox').find('.sr-only').should('have.attr', 'aria-live', 'polite').and('contain.text', channel);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -223,6 +223,6 @@ describe('Verify Guest User Identification in different screens', () => {
|
||||
});
|
||||
|
||||
// # Close and Clear the Search Autocomplete
|
||||
cy.get('#searchFormContainer').find('.input-clear-x').click({force: true});
|
||||
cy.findByTestId('searchBoxClose').click({force: true});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -45,13 +45,11 @@ describe('Search', () => {
|
||||
// # Verify that the cleared search text does not appear on the search box
|
||||
cy.uiGetSearchContainer().should('be.visible').click();
|
||||
cy.uiGetSearchBox().should('be.empty');
|
||||
cy.uiGetSearchContainer().should('be.visible').click();
|
||||
cy.uiGetSearchContainer().type('{esc}');
|
||||
cy.uiGetSearchBox().type('{esc}');
|
||||
|
||||
// # Verify that the Search term input box is still cleared and search term does not reappear when RHS opens
|
||||
cy.uiGetSearchContainer().should('be.visible').click();
|
||||
cy.uiGetSearchBox().and('be.empty');
|
||||
cy.uiGetSearchContainer().should('be.visible').click();
|
||||
cy.uiGetSearchContainer().type('{esc}');
|
||||
cy.uiGetSearchBox().type('{esc}');
|
||||
});
|
||||
});
|
||||
|
||||
Ссылка в новой задаче
Block a user