test: refs #8581 update login role to 'administrative' in invoiceIn tests and add new invoiceInSerial test
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jorge Penadés 2025-03-05 17:29:55 +01:00
parent c6dcbcdae2
commit 7be2381299
6 changed files with 28 additions and 5 deletions

View File

@ -27,7 +27,7 @@ describe('InvoiceInBasicData', () => {
};
beforeEach(() => {
cy.login('developer');
cy.login('administrative');
cy.visit(`/#/invoice-in/1/basic-data`);
});

View File

@ -4,7 +4,7 @@ describe('InvoiceInDueDay', () => {
const addBtn = '.q-page-sticky > div > .q-btn > .q-btn__content';
beforeEach(() => {
cy.login('developer');
cy.login('administrative');
cy.visit(`/#/invoice-in/6/due-day`);
});

View File

@ -6,7 +6,7 @@ describe('InvoiceInIntrastat', () => {
const firstRowAmount = `${firstRow} > :nth-child(3)`;
beforeEach(() => {
cy.login('developer');
cy.login('administrative');
cy.visit(`/#/invoice-in/1/intrastat`);
});

View File

@ -15,7 +15,7 @@ describe('InvoiceInList', () => {
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
cy.login('administrative');
cy.visit(`/#/invoice-in/list`);
cy.get('#searchbar input').type('{enter}');
});

View File

@ -0,0 +1,23 @@
describe('InvoiceInSerial', () => {
beforeEach(() => {
cy.login('administrative');
cy.visit('#/invoice-in/serial');
});
it('should filter by serial number', () => {
cy.dataCy('serial_input').type('R{enter}');
cy.validateVnTableRows({ cols: [{ name: 'serial', val: 'r' }] });
});
it('should filter by last days ', () => {
let before;
cy.dataCy('vnTableCell_total')
.invoke('text')
.then((total) => (before = +total));
cy.dataCy('Last days_input').type('{selectall}1{enter}');
cy.dataCy('vnTableCell_total')
.invoke('text')
.then((total) => expect(+total).to.be.lessThan(before));
});
});

View File

@ -8,7 +8,7 @@ describe('InvoiceInVat', () => {
const randomInt = Math.floor(Math.random() * 100);
beforeEach(() => {
cy.login('developer');
cy.login('administrative');
cy.visit(`/#/invoice-in/1/vat`);
cy.intercept('GET', '/api/InvoiceIns/1/getTotals').as('lastCall');
cy.wait('@lastCall');