[MM-58518] Migrate tooltips of "components/copy_text.tsx" to WithTooltip (#27413)

Этот коммит содержится в:
M-ZubairAhmed
2024-07-29 08:49:57 +00:00
коммит произвёл GitHub
родитель 705679e875
Коммит 6ddf796384
8 изменённых файлов: 83 добавлений и 55 удалений

Просмотреть файл

@@ -51,21 +51,12 @@ describe('Incoming webhook', () => {
cy.findByText('Setup Successful').should('be.visible');
// * You should see a "copy" icon to the right of the URL in the "Setup Successful" screen
copyIconIsVisible('.backstage-form__confirmation');
cy.findByTestId('copyText').should('be.visible');
// # Click "Done" in the "Setup Successful" screen
cy.findByText('Done').should('be.visible').click();
// # You should see a "copy" icon to the right of the webhook's URL
copyIconIsVisible('.item-details__url');
cy.findByTestId('copyText').should('be.visible');
});
});
function copyIconIsVisible(element) {
cy.get(element).within(() => {
cy.get('.fa.fa-copy').
should('be.visible').
trigger('mouseover').
should('have.attr', 'aria-describedby', 'copy');
});
}

Просмотреть файл

@@ -248,8 +248,7 @@ describe('Integrations page', () => {
cy.findByText('Token').should('exist').and('be.visible');
// * Verify copy icon is shown
cy.get('.fa.fa-copy').should('exist').and('be.visible').
trigger('mouseover').and('have.attr', 'aria-describedby', 'copy');
cy.findByTestId('copyText').should('be.visible');
// # Hit done to move from confirm screen
cy.findByText('Done').should('exist').and('be.visible').click();
@@ -265,8 +264,7 @@ describe('Integrations page', () => {
// # For each custom slash command was created
cy.wrap(el).within(() => {
// Verify copy icon for token is present
cy.get('.fa.fa-copy').should('exist').and('be.visible').
trigger('mouseover').and('have.attr', 'aria-describedby', 'copy');
cy.findByTestId('copyText').should('be.visible');
});
});
});