Fix(cypress): Fix e2e failing on master (#32494)
Этот коммит содержится в:
@@ -296,12 +296,12 @@ function verifySearchAutocomplete(index, type = 'user') {
|
|||||||
const usernameLength = 12;
|
const usernameLength = 12;
|
||||||
const displayName = text.substring(1, usernameLength) + ' ' + text.substring(usernameLength, text.length);
|
const displayName = text.substring(1, usernameLength) + ' ' + text.substring(usernameLength, text.length);
|
||||||
const userAriaLabel = getUserMentionAriaLabel(displayName);
|
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') {
|
} else if (type === 'channel') {
|
||||||
cy.get('.suggestion-list__ellipsis').invoke('text').then((text) => {
|
cy.get('.suggestion-list__ellipsis').invoke('text').then((text) => {
|
||||||
const channel = text.split('~')[1].toLowerCase().trim();
|
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
|
// # 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
|
// # Verify that the cleared search text does not appear on the search box
|
||||||
cy.uiGetSearchContainer().should('be.visible').click();
|
cy.uiGetSearchContainer().should('be.visible').click();
|
||||||
cy.uiGetSearchBox().should('be.empty');
|
cy.uiGetSearchBox().should('be.empty');
|
||||||
cy.uiGetSearchContainer().should('be.visible').click();
|
cy.uiGetSearchBox().type('{esc}');
|
||||||
cy.uiGetSearchContainer().type('{esc}');
|
|
||||||
|
|
||||||
// # Verify that the Search term input box is still cleared and search term does not reappear when RHS opens
|
// # 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.uiGetSearchContainer().should('be.visible').click();
|
||||||
cy.uiGetSearchBox().and('be.empty');
|
cy.uiGetSearchBox().and('be.empty');
|
||||||
cy.uiGetSearchContainer().should('be.visible').click();
|
cy.uiGetSearchBox().type('{esc}');
|
||||||
cy.uiGetSearchContainer().type('{esc}');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user