fix: refs #8078 improve cy command
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-10-28 16:21:00 +01:00
parent 57488503aa
commit 1e16e3312e
3 changed files with 6 additions and 1 deletions

View File

@ -167,6 +167,7 @@ const toModule = computed(() =>
icon="more_vert" icon="more_vert"
round round
size="md" size="md"
data-cy="descriptor-more-opts"
> >
<QTooltip> <QTooltip>
{{ t('components.cardDescriptor.moreOptions') }} {{ t('components.cardDescriptor.moreOptions') }}

View File

@ -14,6 +14,8 @@ describe('Ticket descriptor', () => {
it('should clone the ticket without warehouse', () => { it('should clone the ticket without warehouse', () => {
cy.visit('/#/ticket/1/summary'); cy.visit('/#/ticket/1/summary');
cy.intercept('GET', /\/api\/Tickets\/\d/).as('ticket');
cy.wait('@ticket');
cy.openActionsDescriptor(); cy.openActionsDescriptor();
cy.contains(listItem, toCloneOpt).click(); cy.contains(listItem, toCloneOpt).click();
cy.clickConfirm(); cy.clickConfirm();
@ -28,6 +30,8 @@ describe('Ticket descriptor', () => {
it('should set the weight of the ticket', () => { it('should set the weight of the ticket', () => {
cy.visit('/#/ticket/10/summary'); cy.visit('/#/ticket/10/summary');
cy.intercept('GET', /\/api\/Tickets\/\d/).as('ticket');
cy.wait('@ticket');
cy.openActionsDescriptor(); cy.openActionsDescriptor();
cy.contains(listItem, setWeightOpt).click(); cy.contains(listItem, setWeightOpt).click();
cy.intercept('POST', /\/api\/Tickets\/\d+\/setWeight/).as('weight'); cy.intercept('POST', /\/api\/Tickets\/\d+\/setWeight/).as('weight');

View File

@ -261,7 +261,7 @@ Cypress.Commands.add('openActionDescriptor', (opt) => {
}); });
Cypress.Commands.add('openActionsDescriptor', () => { Cypress.Commands.add('openActionsDescriptor', () => {
cy.get('.header > :nth-child(3) > .q-btn__content > .q-icon').click(); cy.get('[data-cy="descriptor-more-opts"]').click();
}); });
Cypress.Commands.add('openUserPanel', () => { Cypress.Commands.add('openUserPanel', () => {