Merge pull request 'fix: refs #6943 e2e clientList, formModel' (!1506) from 6943-fixClientTestE2E into dev
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #1506 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
257068f50f
|
@ -225,7 +225,7 @@ const toModule = computed(() =>
|
|||
<div class="icons">
|
||||
<slot name="icons" :entity="entity" />
|
||||
</div>
|
||||
<div class="actions justify-center">
|
||||
<div class="actions justify-center" data-cy="descriptor_actions">
|
||||
<slot name="actions" :entity="entity" />
|
||||
</div>
|
||||
<slot name="after" />
|
||||
|
|
|
@ -1,16 +1,9 @@
|
|||
<script setup>
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
import WorkerDepartmentTree from './WorkerDepartmentTree.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnSection data-key="WorkerDepartment" :search-bar="false">
|
||||
<template #body>
|
||||
<div class="flex flex-center q-pa-md">
|
||||
<WorkerDepartmentTree />
|
||||
</div>
|
||||
</template>
|
||||
</VnSection>
|
||||
<QPage class="q-pa-md flex justify-center"> <WorkerDepartmentTree /> </QPage>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/// <reference types="cypress" />
|
||||
describe.skip('Client list', () => {
|
||||
describe('Client list', () => {
|
||||
beforeEach(() => {
|
||||
cy.viewport(1280, 720);
|
||||
cy.login('developer');
|
||||
cy.visit('/#/customer/list', {
|
||||
timeout: 5000,
|
||||
|
@ -28,7 +27,7 @@ describe.skip('Client list', () => {
|
|||
Email: { val: `user.test${randomInt}@cypress.com` },
|
||||
'Sales person': { val: 'salesPerson', type: 'select' },
|
||||
Location: { val: '46000', type: 'select' },
|
||||
'Business type': { val: 'Otros', type: 'select' },
|
||||
'Business type': { val: 'others', type: 'select' },
|
||||
};
|
||||
cy.fillInForm(data);
|
||||
|
||||
|
@ -37,6 +36,7 @@ describe.skip('Client list', () => {
|
|||
cy.checkNotification('Data created');
|
||||
cy.url().should('include', '/summary');
|
||||
});
|
||||
|
||||
it('Client list search client', () => {
|
||||
const search = 'Jessica Jones';
|
||||
cy.searchByLabel('Name', search);
|
||||
|
@ -59,6 +59,7 @@ describe.skip('Client list', () => {
|
|||
cy.checkValueForm(1, search);
|
||||
cy.checkValueForm(2, search);
|
||||
});
|
||||
|
||||
it('Client founded create order', () => {
|
||||
const search = 'Jessica Jones';
|
||||
cy.searchByLabel('Name', search);
|
||||
|
|
|
@ -329,8 +329,13 @@ Cypress.Commands.add('openUserPanel', () => {
|
|||
Cypress.Commands.add('checkNotification', (text) => {
|
||||
cy.get('.q-notification', { timeout: 10000 })
|
||||
.should('be.visible')
|
||||
.filter((_, el) => Cypress.$(el).text().includes(text))
|
||||
.should('have.length.greaterThan', 0);
|
||||
.should('have.length.greaterThan', 0)
|
||||
.should(($elements) => {
|
||||
const found = $elements
|
||||
.toArray()
|
||||
.some((el) => Cypress.$(el).text().includes(text));
|
||||
expect(found).to.be.true;
|
||||
});
|
||||
});
|
||||
|
||||
Cypress.Commands.add('openActions', (row) => {
|
||||
|
@ -376,7 +381,13 @@ Cypress.Commands.add('clickButtonWith', (type, value) => {
|
|||
}
|
||||
});
|
||||
Cypress.Commands.add('clickButtonWithIcon', (iconClass) => {
|
||||
cy.get(`.q-icon.${iconClass}`).parent().click();
|
||||
cy.waitForElement('[data-cy="descriptor_actions"]');
|
||||
cy.get('[data-cy="loading-spinner"]', { timeout: 10000 }).should('not.be.visible');
|
||||
cy.get('.q-btn')
|
||||
.filter((index, el) => Cypress.$(el).find('.q-icon.' + iconClass).length > 0)
|
||||
.then(($btn) => {
|
||||
cy.wrap($btn).click();
|
||||
});
|
||||
});
|
||||
Cypress.Commands.add('clickButtonWithText', (buttonText) => {
|
||||
cy.get('.q-btn').contains(buttonText).click();
|
||||
|
|
Loading…
Reference in New Issue