fix: refs #6696 update login role in tests and add data attributes for component options
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
parent
4e40156c38
commit
5bd2859e5d
|
@ -346,17 +346,18 @@ function claimUrl(section) {
|
|||
<template #body="props">
|
||||
<QTr :props="props">
|
||||
<QTd v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span v-if="col.name != 'description'">{{
|
||||
t(col.value)
|
||||
}}</span>
|
||||
<span class="link" v-if="col.name === 'description'">{{
|
||||
t(col.value)
|
||||
}}</span>
|
||||
<ItemDescriptorProxy
|
||||
v-if="col.name == 'description'"
|
||||
:id="props.row.sale.itemFk"
|
||||
:sale-fk="props.row.saleFk"
|
||||
></ItemDescriptorProxy>
|
||||
<template v-if="col.name === 'description'">
|
||||
<span class="link">{{
|
||||
dashIfEmpty(col.field(props.row))
|
||||
}}</span>
|
||||
<ItemDescriptorProxy
|
||||
:id="props.row.sale.itemFk"
|
||||
:sale-fk="props.row.saleFk"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ dashIfEmpty(col.field(props.row)) }}
|
||||
</template>
|
||||
</QTd>
|
||||
</QTr>
|
||||
</template>
|
||||
|
|
|
@ -84,6 +84,7 @@ defineExpose({ save });
|
|||
dense
|
||||
:dark="true"
|
||||
class="q-mb-sm"
|
||||
:data-cy="`componentOption-${item.id}`"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ const firstRow = 'tbody > :nth-child(1)';
|
|||
describe('TicketSale', () => {
|
||||
describe('Ticket #23', () => {
|
||||
beforeEach(() => {
|
||||
cy.login('developer');
|
||||
cy.login('salesPerson');
|
||||
cy.viewport(1920, 1080);
|
||||
cy.visit('/#/ticket/23/sale');
|
||||
});
|
||||
|
@ -15,6 +15,8 @@ describe('TicketSale', () => {
|
|||
cy.get('[data-col-field="price"]').find('.q-btn').click();
|
||||
cy.waitForElement('[data-cy="ticketEditManaProxy"]');
|
||||
cy.dataCy('ticketEditManaProxy').should('exist');
|
||||
cy.get('[data-cy="componentOption-17"]').click();
|
||||
|
||||
cy.waitForElement('[data-cy="Price_input"]');
|
||||
cy.dataCy('Price_input').clear();
|
||||
cy.dataCy('Price_input').type(price);
|
||||
|
@ -31,6 +33,7 @@ describe('TicketSale', () => {
|
|||
cy.get('[data-col-field="discount"]').find('.q-btn').click();
|
||||
cy.waitForElement('[data-cy="ticketEditManaProxy"]');
|
||||
cy.dataCy('ticketEditManaProxy').should('exist');
|
||||
cy.get('[data-cy="componentOption-17"]').click();
|
||||
cy.waitForElement('[data-cy="Disc_input"]');
|
||||
cy.dataCy('Disc_input').clear();
|
||||
cy.dataCy('Disc_input').type(discount);
|
||||
|
@ -73,7 +76,7 @@ describe('TicketSale', () => {
|
|||
});
|
||||
describe('Ticket to add claim #24', () => {
|
||||
beforeEach(() => {
|
||||
cy.login('developer');
|
||||
cy.login('salesPerson');
|
||||
cy.viewport(1920, 1080);
|
||||
cy.visit('/#/ticket/24/sale');
|
||||
});
|
||||
|
@ -90,9 +93,9 @@ describe('TicketSale', () => {
|
|||
cy.dataCy('VnConfirm_confirm').click();
|
||||
});
|
||||
});
|
||||
describe('Free ticket #31', () => {
|
||||
describe.only('Free ticket #31', () => {
|
||||
beforeEach(() => {
|
||||
cy.login('developer');
|
||||
cy.login('salesPerson');
|
||||
cy.viewport(1920, 1080);
|
||||
cy.visit('/#/ticket/31/sale');
|
||||
});
|
||||
|
@ -129,7 +132,7 @@ describe('TicketSale', () => {
|
|||
cy.dataCy('ticketSaleMoreActionsDropdown').should('be.disabled');
|
||||
});
|
||||
|
||||
it('should update discount when "Update discount" is clicked', () => {
|
||||
it.only('should update discount when "Update discount" is clicked', () => {
|
||||
selectFirstRow();
|
||||
cy.dataCy('ticketSaleMoreActionsDropdown').click();
|
||||
cy.waitForElement('[data-cy="updateDiscountItem"]');
|
||||
|
@ -138,6 +141,7 @@ describe('TicketSale', () => {
|
|||
cy.waitForElement('[data-cy="ticketSaleDiscountInput"]');
|
||||
cy.dataCy('ticketSaleDiscountInput').find('input').focus();
|
||||
cy.dataCy('ticketSaleDiscountInput').find('input').type('10');
|
||||
cy.get('[data-cy="componentOption-17"]').click();
|
||||
cy.dataCy('saveManaBtn').click();
|
||||
cy.waitForElement('.q-notification__message');
|
||||
cy.checkNotification('Data saved');
|
||||
|
@ -175,7 +179,7 @@ describe('TicketSale', () => {
|
|||
});
|
||||
describe('Ticket to transfer #32', () => {
|
||||
beforeEach(() => {
|
||||
cy.login('developer');
|
||||
cy.login('salesPerson');
|
||||
cy.viewport(1920, 1080);
|
||||
cy.visit('/#/ticket/32/sale');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue