feat: Add tooltips to channel info RHS top buttons (#29170)
* feat: Add tooltips to channel info RHS top buttons * style: address linting issues * feat: Add accessibility ids to Tooltips in top_buttons.tsx * leverage WithTooltip for standardized styling --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ef46f8e164
Коммит
7c6f1d4554
@@ -91,6 +91,31 @@ describe('Channel Info RHS', () => {
|
||||
|
||||
describe('regular channel', () => {
|
||||
describe('top buttons', () => {
|
||||
it('should show correct tooltips for all buttons', () => {
|
||||
// # Go to test channel
|
||||
cy.visit(`/${testTeam.name}/channels/${testChannel.name}`);
|
||||
|
||||
// # Click on the channel info button
|
||||
cy.get('#channel-info-btn').click();
|
||||
|
||||
// * Verify tooltips appear with correct text
|
||||
cy.uiGetRHS().findByText('Favorite').trigger('mouseover');
|
||||
cy.get('#favorite-tooltip').should('be.visible').and('have.text', 'Add this channel to favorites');
|
||||
cy.uiGetRHS().findByText('Favorite').trigger('mouseout');
|
||||
|
||||
cy.uiGetRHS().findByText('Mute').trigger('mouseover');
|
||||
cy.get('#mute-tooltip').should('be.visible').and('have.text', 'Mute notifications for this channel');
|
||||
cy.uiGetRHS().findByText('Mute').trigger('mouseout');
|
||||
|
||||
cy.uiGetRHS().findByText('Add People').trigger('mouseover');
|
||||
cy.get('#add-people-tooltip').should('be.visible').and('have.text', 'Add team members to this channel');
|
||||
cy.uiGetRHS().findByText('Add People').trigger('mouseout');
|
||||
|
||||
cy.uiGetRHS().findByText('Copy Link').trigger('mouseover');
|
||||
cy.get('#copy-link-tooltip').should('be.visible').and('have.text', 'Copy link to this channel');
|
||||
cy.uiGetRHS().findByText('Copy Link').trigger('mouseout');
|
||||
});
|
||||
|
||||
it('should be able to toggle favorite on a channel', () => {
|
||||
// # Go to test channel
|
||||
cy.visit(`/${testTeam.name}/channels/${testChannel.name}`);
|
||||
|
||||
Ссылка в новой задаче
Block a user