test: refs #8441 ensure visibility checks for elements in vehicle invoice tests
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
138b3322b7
commit
20e99b5689
|
@ -21,7 +21,6 @@ describe('Vehicle Invoice In', () => {
|
|||
cy.viewport(1920, 1080);
|
||||
cy.login('deliveryAssistant');
|
||||
cy.visit(`/#/route/vehicle/1/invoice-in`);
|
||||
cy.get('.q-table').should('be.visible');
|
||||
});
|
||||
|
||||
it('Should show assigned tickets', () => {
|
||||
|
@ -38,31 +37,31 @@ describe('Vehicle Invoice In', () => {
|
|||
};
|
||||
cy.addBtnClick();
|
||||
cy.fillInForm(data);
|
||||
cy.dataCy('FormModelPopup_save').click();
|
||||
cy.dataCy('FormModelPopup_save').should('be.visible').click();
|
||||
cy.checkNotification('Data created');
|
||||
});
|
||||
|
||||
it('Should unassign an invoice', () => {
|
||||
cy.dataCy(selectors.unassignBtn).last().click();
|
||||
cy.dataCy(selectors.unassignBtn).should('be.visible').last().click();
|
||||
cy.clickConfirm();
|
||||
cy.checkNotification('Invoice unlinked');
|
||||
});
|
||||
|
||||
describe('Supplier pop-ups', () => {
|
||||
it('Should redirect to the supplier summary from the supplier descriptor pop-up', () => {
|
||||
cy.get(selectors.firstRowSupplier).click();
|
||||
cy.get(selectors.firstRowSupplier).should('be.visible').click();
|
||||
cy.containContent(selectors.descriptorTitle, data.supplier);
|
||||
cy.get(selectors.descriptorGoToSummaryBtn).click();
|
||||
cy.get(selectors.descriptorGoToSummaryBtn).should('be.visible').click();
|
||||
cy.url().should('include', '/supplier/1/summary');
|
||||
cy.containContent(selectors.summaryTitle, data.supplier);
|
||||
});
|
||||
|
||||
it('Should redirect to the supplier summary from summary pop-up from the supplier descriptor pop-up', () => {
|
||||
cy.get(selectors.firstRowSupplier).click();
|
||||
cy.get(selectors.firstRowSupplier).should('be.visible').click();
|
||||
cy.containContent(selectors.descriptorTitle, data.supplier);
|
||||
cy.get(selectors.descriptorOpenSummaryBtn).click();
|
||||
cy.get(selectors.descriptorOpenSummaryBtn).should('be.visible').click();
|
||||
cy.containContent(selectors.summaryTitle, data.supplier);
|
||||
cy.get(selectors.SummaryGoToSummaryBtn).click();
|
||||
cy.get(selectors.SummaryGoToSummaryBtn).should('be.visible').click();
|
||||
cy.url().should('include', '/supplier/1/summary');
|
||||
cy.containContent(selectors.summaryTitle, data.supplier);
|
||||
});
|
||||
|
@ -70,19 +69,19 @@ describe('Vehicle Invoice In', () => {
|
|||
|
||||
describe('Invoice pop-ups', () => {
|
||||
it('Should redirect to the invoiceIn summary from the invoice descriptor pop-up', () => {
|
||||
cy.get(selectors.firstRowInvoice).click();
|
||||
cy.get(selectors.firstRowInvoice).should('be.visible').click();
|
||||
cy.containContent(selectors.descriptorTitle, data.invoice);
|
||||
cy.get(selectors.descriptorGoToSummaryBtn).click();
|
||||
cy.get(selectors.descriptorGoToSummaryBtn).should('be.visible').click();
|
||||
cy.url().should('include', '/invoice-in/1/summary');
|
||||
cy.containContent(selectors.summaryTitle, data.supplier);
|
||||
});
|
||||
|
||||
it('Should redirect to the invoiceIn summary from summary pop-up from the invoice descriptor pop-up', () => {
|
||||
cy.get(selectors.firstRowInvoice).click();
|
||||
cy.get(selectors.firstRowInvoice).should('be.visible').click();
|
||||
cy.containContent(selectors.descriptorTitle, data.invoice);
|
||||
cy.get(selectors.descriptorOpenSummaryBtn).click();
|
||||
cy.get(selectors.descriptorOpenSummaryBtn).should('be.visible').click();
|
||||
cy.containContent(selectors.summaryTitle, data.supplier);
|
||||
cy.get(selectors.SummaryGoToSummaryBtn).click();
|
||||
cy.get(selectors.SummaryGoToSummaryBtn).should('be.visible').click();
|
||||
cy.url().should('include', '/invoice-in/1/summary');
|
||||
cy.containContent(selectors.summaryTitle, data.supplier);
|
||||
});
|
||||
|
|
|
@ -324,6 +324,7 @@ Cypress.Commands.add('validateContent', (selector, expectedValue) => {
|
|||
|
||||
Cypress.Commands.add('containContent', (selector, expectedValue) => {
|
||||
cy.get(selector)
|
||||
.should('be.visible')
|
||||
.invoke('text')
|
||||
.then((text) => {
|
||||
expect(text).to.include(expectedValue);
|
||||
|
|
Loading…
Reference in New Issue