test: test:e2e
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-07-03 01:47:14 +02:00
parent 5c2c9d0805
commit 7e374c258e
4 changed files with 24 additions and 4 deletions

View File

@ -88,6 +88,7 @@ const entriesTableColumns = computed(() => [
<QCardSection class="row items-center"> <QCardSection class="row items-center">
<VnPaginate <VnPaginate
ref="entryBuysPaginateRef" ref="entryBuysPaginateRef"
:limit="0"
data-key="EntryBuys" data-key="EntryBuys"
:url="`Entries/${entityId}/getBuys`" :url="`Entries/${entityId}/getBuys`"
auto-load auto-load

View File

@ -87,7 +87,7 @@ const printBuys = (rowId) => {
<div class="vn-card-list"> <div class="vn-card-list">
<VnTable <VnTable
ref="myEntriesRef" ref="myEntriesRef"
data-key="myentriesList" data-key="myEntriesList"
url="Entries/filter" url="Entries/filter"
:order="['landed DESC', 'id DESC']" :order="['landed DESC', 'id DESC']"
:columns="columns" :columns="columns"

View File

@ -0,0 +1,20 @@
describe('WagonTypeCreate', () => {
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/entry/my`, {
onBeforeLoad(win) {
cy.stub(win, 'open');
},
});
cy.waitForElement('.q-page', 6000);
});
it('should create edit and remove new dms', () => {
cy.get(
'[to="/null/2"] > .q-card > .column > .q-btn > .q-btn__content > .q-icon'
).click();
cy.get('.q-card__actions > .q-btn').click();
cy.window().its('open').should('be.called');
});
});

View File

@ -50,8 +50,8 @@ Cypress.Commands.add('login', (user) => {
}); });
}); });
Cypress.Commands.add('waitForElement', (element) => { Cypress.Commands.add('waitForElement', (element, timeout = 5000) => {
cy.get(element, { timeout: 5000 }).should('be.visible'); cy.get(element, { timeout }).should('be.visible');
}); });
Cypress.Commands.add('getValue', (selector) => { Cypress.Commands.add('getValue', (selector) => {
@ -241,4 +241,3 @@ Cypress.Commands.add('validateContent', (selector, expectedValue) => {
Cypress.Commands.add('openActionsDescriptor', () => { Cypress.Commands.add('openActionsDescriptor', () => {
cy.get('.descriptor > .header > .q-btn').click(); cy.get('.descriptor > .header > .q-btn').click();
}); });
// registerCommands();