forked from verdnatura/salix-front
Merge branch 'dev' into 6242-AddHasRoundingField
This commit is contained in:
commit
f88fb130c6
144
package.json
144
package.json
|
@ -1,74 +1,74 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "25.06.0",
|
"version": "25.08.0",
|
||||||
"description": "Salix frontend",
|
"description": "Salix frontend",
|
||||||
"productName": "Salix",
|
"productName": "Salix",
|
||||||
"author": "Verdnatura",
|
"author": "Verdnatura",
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "pnpm@8.15.1",
|
"packageManager": "pnpm@8.15.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"resetDatabase": "cd ../salix && gulp docker",
|
"resetDatabase": "cd ../salix && gulp docker",
|
||||||
"lint": "eslint --ext .js,.vue ./",
|
"lint": "eslint --ext .js,.vue ./",
|
||||||
"format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore",
|
"format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore",
|
||||||
"test:e2e": "cypress open",
|
"test:e2e": "cypress open",
|
||||||
"test:e2e:ci": "npm run resetDatabase && cd ../salix-front && cypress run",
|
"test:e2e:ci": "npm run resetDatabase && cd ../salix-front && cypress run",
|
||||||
"test": "echo \"See package.json => scripts for available tests.\" && exit 0",
|
"test": "echo \"See package.json => scripts for available tests.\" && exit 0",
|
||||||
"test:unit": "vitest",
|
"test:unit": "vitest",
|
||||||
"test:unit:ci": "vitest run",
|
"test:unit:ci": "vitest run",
|
||||||
"commitlint": "commitlint --edit",
|
"commitlint": "commitlint --edit",
|
||||||
"prepare": "npx husky install",
|
"prepare": "npx husky install",
|
||||||
"addReferenceTag": "node .husky/addReferenceTag.js",
|
"addReferenceTag": "node .husky/addReferenceTag.js",
|
||||||
"docs:dev": "vitepress dev docs",
|
"docs:dev": "vitepress dev docs",
|
||||||
"docs:build": "vitepress build docs",
|
"docs:build": "vitepress build docs",
|
||||||
"docs:preview": "vitepress preview docs"
|
"docs:preview": "vitepress preview docs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@quasar/cli": "^2.4.1",
|
"@quasar/cli": "^2.4.1",
|
||||||
"@quasar/extras": "^1.16.16",
|
"@quasar/extras": "^1.16.16",
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
"chromium": "^3.0.3",
|
"chromium": "^3.0.3",
|
||||||
"croppie": "^2.6.5",
|
"croppie": "^2.6.5",
|
||||||
"moment": "^2.30.1",
|
"moment": "^2.30.1",
|
||||||
"pinia": "^2.1.3",
|
"pinia": "^2.1.3",
|
||||||
"quasar": "^2.17.7",
|
"quasar": "^2.17.7",
|
||||||
"validator": "^13.9.0",
|
"validator": "^13.9.0",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
"vue-i18n": "^9.3.0",
|
"vue-i18n": "^9.3.0",
|
||||||
"vue-router": "^4.2.5"
|
"vue-router": "^4.2.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^19.2.1",
|
"@commitlint/cli": "^19.2.1",
|
||||||
"@commitlint/config-conventional": "^19.1.0",
|
"@commitlint/config-conventional": "^19.1.0",
|
||||||
"@intlify/unplugin-vue-i18n": "^0.8.2",
|
"@intlify/unplugin-vue-i18n": "^0.8.2",
|
||||||
"@pinia/testing": "^0.1.2",
|
"@pinia/testing": "^0.1.2",
|
||||||
"@quasar/app-vite": "^2.0.8",
|
"@quasar/app-vite": "^2.0.8",
|
||||||
"@quasar/quasar-app-extension-qcalendar": "^4.0.2",
|
"@quasar/quasar-app-extension-qcalendar": "^4.0.2",
|
||||||
"@quasar/quasar-app-extension-testing-unit-vitest": "^0.4.0",
|
"@quasar/quasar-app-extension-testing-unit-vitest": "^0.4.0",
|
||||||
"@vue/test-utils": "^2.4.4",
|
"@vue/test-utils": "^2.4.4",
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.14",
|
||||||
"cypress": "^13.6.6",
|
"cypress": "^13.6.6",
|
||||||
"cypress-mochawesome-reporter": "^3.8.2",
|
"cypress-mochawesome-reporter": "^3.8.2",
|
||||||
"eslint": "^9.18.0",
|
"eslint": "^9.18.0",
|
||||||
"eslint-config-prettier": "^10.0.1",
|
"eslint-config-prettier": "^10.0.1",
|
||||||
"eslint-plugin-cypress": "^4.1.0",
|
"eslint-plugin-cypress": "^4.1.0",
|
||||||
"eslint-plugin-vue": "^9.32.0",
|
"eslint-plugin-vue": "^9.32.0",
|
||||||
"husky": "^8.0.0",
|
"husky": "^8.0.0",
|
||||||
"postcss": "^8.4.23",
|
"postcss": "^8.4.23",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.4.2",
|
||||||
"sass": "^1.83.4",
|
"sass": "^1.83.4",
|
||||||
"vitepress": "^1.6.3",
|
"vitepress": "^1.6.3",
|
||||||
"vitest": "^0.34.0"
|
"vitest": "^0.34.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20 || ^18 || ^16",
|
"node": "^20 || ^18 || ^16",
|
||||||
"npm": ">= 8.1.2",
|
"npm": ">= 8.1.2",
|
||||||
"yarn": ">= 1.21.1",
|
"yarn": ">= 1.21.1",
|
||||||
"bun": ">= 1.0.25"
|
"bun": ">= 1.0.25"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"@vitejs/plugin-vue": "^5.2.1",
|
"@vitejs/plugin-vue": "^5.2.1",
|
||||||
"vite": "^6.0.11",
|
"vite": "^6.0.11",
|
||||||
"vitest": "^0.31.1"
|
"vitest": "^0.31.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -192,6 +192,7 @@ const debtWarning = computed(() => {
|
||||||
query: {
|
query: {
|
||||||
createForm: JSON.stringify({
|
createForm: JSON.stringify({
|
||||||
clientFk: entity.id,
|
clientFk: entity.id,
|
||||||
|
addressId: entity.defaultAddressFk,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
}"
|
}"
|
||||||
|
|
|
@ -125,7 +125,7 @@ onMounted(async () => {
|
||||||
inventoriedDate.value =
|
inventoriedDate.value =
|
||||||
(await axios.get('Configs/findOne')).data?.inventoried || today;
|
(await axios.get('Configs/findOne')).data?.inventoried || today;
|
||||||
|
|
||||||
if (query.warehouseFk) ref.warehouseFk = query.warehouseFk;
|
if (query.warehouseFk) ref.warehouseFk = +query.warehouseFk;
|
||||||
else if (!ref.warehouseFk && user.value) ref.warehouseFk = user.value.warehouseFk;
|
else if (!ref.warehouseFk && user.value) ref.warehouseFk = user.value.warehouseFk;
|
||||||
if (ref.date) showWhatsBeforeInventory.value = true;
|
if (ref.date) showWhatsBeforeInventory.value = true;
|
||||||
ref.itemFk = route.params.id;
|
ref.itemFk = route.params.id;
|
||||||
|
@ -143,7 +143,7 @@ onMounted(async () => {
|
||||||
const fetchItemBalances = async () => await arrayDataItemBalances.fetch({});
|
const fetchItemBalances = async () => await arrayDataItemBalances.fetch({});
|
||||||
|
|
||||||
const getBadgeAttrs = (_date) => {
|
const getBadgeAttrs = (_date) => {
|
||||||
const isSameDate = date.isSameDate(today.value, _date);
|
const isSameDate = date.isSameDate(today, _date);
|
||||||
const attrs = {
|
const attrs = {
|
||||||
'text-color': isSameDate ? 'black' : 'white',
|
'text-color': isSameDate ? 'black' : 'white',
|
||||||
color: isSameDate ? 'warning' : 'transparent',
|
color: isSameDate ? 'warning' : 'transparent',
|
||||||
|
@ -153,8 +153,6 @@ const getBadgeAttrs = (_date) => {
|
||||||
|
|
||||||
const scrollToToday = async () => {
|
const scrollToToday = async () => {
|
||||||
await nextTick();
|
await nextTick();
|
||||||
const today = Date.vnNew();
|
|
||||||
today.setHours(0, 0, 0, 0);
|
|
||||||
const todayCell = document.querySelector(`td[data-date="${today.toISOString()}"]`);
|
const todayCell = document.querySelector(`td[data-date="${today.toISOString()}"]`);
|
||||||
if (todayCell) {
|
if (todayCell) {
|
||||||
todayCell.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
todayCell.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||||
|
|
|
@ -81,7 +81,7 @@ const columns = computed(() => [
|
||||||
label: t('module.created'),
|
label: t('module.created'),
|
||||||
component: 'date',
|
component: 'date',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
format: (row) => toDateTimeFormat(row?.landed),
|
format: (row) => toDateTimeFormat(row?.created),
|
||||||
columnField: {
|
columnField: {
|
||||||
component: null,
|
component: null,
|
||||||
},
|
},
|
||||||
|
|
|
@ -44,6 +44,7 @@ const shelvingCard = {
|
||||||
path: ':id',
|
path: ':id',
|
||||||
component: () => import('pages/Shelving/Card/ShelvingCard.vue'),
|
component: () => import('pages/Shelving/Card/ShelvingCard.vue'),
|
||||||
redirect: { name: 'ShelvingSummary' },
|
redirect: { name: 'ShelvingSummary' },
|
||||||
|
meta: { menu: ['ShelvingBasicData', 'ShelvingLog'] },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
name: 'ShelvingSummary',
|
name: 'ShelvingSummary',
|
||||||
|
@ -81,13 +82,10 @@ export default {
|
||||||
title: 'shelving',
|
title: 'shelving',
|
||||||
icon: 'vn:inventory',
|
icon: 'vn:inventory',
|
||||||
moduleName: 'Shelving',
|
moduleName: 'Shelving',
|
||||||
|
menu: ['ShelvingList', 'ParkingMain'],
|
||||||
},
|
},
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'ShelvingMain' },
|
redirect: { name: 'ShelvingMain' },
|
||||||
menus: {
|
|
||||||
main: ['ShelvingList', 'ParkingMain'],
|
|
||||||
card: ['ShelvingBasicData', 'ShelvingLog'],
|
|
||||||
},
|
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
|
|
|
@ -62,10 +62,9 @@ describe('Client list', () => {
|
||||||
it('Client founded create order', () => {
|
it('Client founded create order', () => {
|
||||||
const search = 'Jessica Jones';
|
const search = 'Jessica Jones';
|
||||||
cy.searchByLabel('Name', search);
|
cy.searchByLabel('Name', search);
|
||||||
cy.openActionDescriptor('New order');
|
cy.clickButtonWith('icon', 'icon-basketadd');
|
||||||
cy.waitForElement('#formModel');
|
cy.waitForElement('#formModel');
|
||||||
cy.waitForElement('.q-form');
|
cy.waitForElement('.q-form');
|
||||||
cy.checkValueForm(1, search);
|
cy.checkValueForm(1, search);
|
||||||
cy.checkValueForm(2, search);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,6 +7,5 @@ describe('Client notes', () => {
|
||||||
});
|
});
|
||||||
it('Should load layout', () => {
|
it('Should load layout', () => {
|
||||||
cy.get('.q-page').should('be.visible');
|
cy.get('.q-page').should('be.visible');
|
||||||
cy.get('.q-page > :nth-child(2) > :nth-child(1)').should('be.visible');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,7 +11,7 @@ describe('EntryMy when is supplier', () => {
|
||||||
|
|
||||||
it('should open buyLabel when is supplier', () => {
|
it('should open buyLabel when is supplier', () => {
|
||||||
cy.get(
|
cy.get(
|
||||||
'[to="/null/3"] > .q-card > .column > .q-btn > .q-btn__content > .q-icon'
|
'[to="/null/3"] > .q-card > :nth-child(2) > .q-btn > .q-btn__content > .q-icon'
|
||||||
).click();
|
).click();
|
||||||
cy.dataCy('printLabelsBtn').click();
|
cy.dataCy('printLabelsBtn').click();
|
||||||
cy.window().its('open').should('be.called');
|
cy.window().its('open').should('be.called');
|
||||||
|
|
|
@ -12,28 +12,22 @@ describe('Item tag', () => {
|
||||||
cy.get('.q-page-sticky > div').click();
|
cy.get('.q-page-sticky > div').click();
|
||||||
cy.dataCy('Tag_select').eq(7).type('Tallos');
|
cy.dataCy('Tag_select').eq(7).type('Tallos');
|
||||||
cy.get('.q-menu .q-item').contains('Tallos').click();
|
cy.get('.q-menu .q-item').contains('Tallos').click();
|
||||||
cy.get(
|
cy.get(':nth-child(8) > [label="Value"]').type('1');
|
||||||
':nth-child(8) > [label="Value"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Value_input"]'
|
|
||||||
).type('1');
|
|
||||||
+cy.dataCy('crudModelDefaultSaveBtn').click();
|
+cy.dataCy('crudModelDefaultSaveBtn').click();
|
||||||
cy.checkNotification("The tag or priority can't be repeated for an item");
|
cy.checkNotification("The tag or priority can't be repeated for an item");
|
||||||
});
|
});
|
||||||
// https://redmine.verdnatura.es/issues/8422
|
|
||||||
it.skip('should add a new tag', () => {
|
it('should add a new tag', () => {
|
||||||
cy.get('.q-page').should('be.visible');
|
cy.get('.q-page').should('be.visible');
|
||||||
cy.get('.q-page-sticky > div').click();
|
cy.get('.q-page-sticky > div').click();
|
||||||
cy.get('.q-page-sticky > div').click();
|
cy.get('.q-page-sticky > div').click();
|
||||||
cy.dataCy('Tag_select').eq(7).click();
|
cy.dataCy('Tag_select').eq(7).click();
|
||||||
cy.get('.q-menu .q-item').contains('Ancho de la base').click();
|
cy.get('.q-menu .q-item').contains('Ancho de la base').type('{enter}');
|
||||||
cy.get(
|
cy.get(':nth-child(8) > [label="Value"]').type('50');
|
||||||
':nth-child(8) > [label="Value"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Value_input"]'
|
|
||||||
).type('50');
|
|
||||||
cy.dataCy('crudModelDefaultSaveBtn').click();
|
cy.dataCy('crudModelDefaultSaveBtn').click();
|
||||||
cy.checkNotification('Data saved');
|
cy.checkNotification('Data saved');
|
||||||
cy.get(
|
cy.dataCy('itemTags').children(':nth-child(8)').find('.justify-center > .q-icon').click();
|
||||||
'[data-cy="itemTags"] > :nth-child(7) > .justify-center > .q-icon'
|
|
||||||
).click();
|
|
||||||
cy.dataCy('VnConfirm_confirm').click();
|
cy.dataCy('VnConfirm_confirm').click();
|
||||||
cy.checkNotification('Data saved');
|
cy.checkNotification('Data saved');
|
||||||
});
|
});
|
||||||
});
|
});
|
|
@ -5,7 +5,7 @@ describe('ParkingBasicData', () => {
|
||||||
const sectorOpt = '.q-menu .q-item';
|
const sectorOpt = '.q-menu .q-item';
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/parking/1/basic-data`);
|
cy.visit(`/#/shelving/parking/1/basic-data`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should edit the code and sector', () => {
|
it('should edit the code and sector', () => {
|
||||||
|
|
|
@ -11,7 +11,7 @@ describe('ParkingList', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/parking/list`);
|
cy.visit(`/#/shelving/parking/list`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should redirect on clicking a parking', () => {
|
it('should redirect on clicking a parking', () => {
|
||||||
|
|
|
@ -8,16 +8,16 @@ describe('WagonCreate', () => {
|
||||||
it('should create and delete a new wagon', () => {
|
it('should create and delete a new wagon', () => {
|
||||||
cy.dataCy('vnTableCreateBtn').click();
|
cy.dataCy('vnTableCreateBtn').click();
|
||||||
cy.get(
|
cy.get(
|
||||||
'.grid-create > [label="Label"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Label_input"]'
|
'.grid-create > [label="Label"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Label_input"]',
|
||||||
).type('1234');
|
).type('1234');
|
||||||
cy.get(
|
cy.get(
|
||||||
'.grid-create > [label="Plate"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Plate_input"]'
|
'.grid-create > [label="Plate"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Plate_input"]',
|
||||||
).type('1234ABCD');
|
).type('1234ABCD');
|
||||||
cy.get(
|
cy.get(
|
||||||
'.grid-create > [label="Volume"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Volume_input"]'
|
'.grid-create > [label="Volume"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Volume_input"]',
|
||||||
).type('100');
|
).type('100');
|
||||||
cy.dataCy('Type_select').type('{downarrow}{enter}');
|
cy.dataCy('Type_select').type('{downarrow}{enter}');
|
||||||
// // Delete wagon type created
|
|
||||||
cy.get('[to="/null/1"] > .q-card > .column > [title="Remove"]').click();
|
cy.get('[title="Remove"] > .q-btn__content > .q-icon').click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,14 +6,10 @@ describe('WagonTypeCreate', () => {
|
||||||
cy.waitForElement('.q-page', 6000);
|
cy.waitForElement('.q-page', 6000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create a new wagon type', () => {
|
it('should create a new wagon type and then delete it', () => {
|
||||||
cy.get('.q-page-sticky > div > .q-btn').click();
|
cy.get('.q-page-sticky > div > .q-btn').click();
|
||||||
cy.get('input').first().type('Example for testing');
|
cy.get('input').first().type('Example for testing');
|
||||||
cy.get('button[type="submit"]').click();
|
cy.get('button[type="submit"]').click();
|
||||||
});
|
cy.get('[title="Remove"] > .q-btn__content > .q-icon').first().click();
|
||||||
it('delete a wagon type', () => {
|
|
||||||
cy.get(
|
|
||||||
'[to="/null/2"] > .q-card > .column > [title="Remove"] > .q-btn__content > .q-icon'
|
|
||||||
).click();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -289,40 +289,13 @@ Cypress.Commands.add('openActionDescriptor', (opt) => {
|
||||||
cy.openActionsDescriptor();
|
cy.openActionsDescriptor();
|
||||||
const listItem = '[role="menu"] .q-list .q-item';
|
const listItem = '[role="menu"] .q-list .q-item';
|
||||||
cy.contains(listItem, opt).click();
|
cy.contains(listItem, opt).click();
|
||||||
1;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('openActionsDescriptor', () => {
|
Cypress.Commands.add('openActionsDescriptor', () => {
|
||||||
cy.get('[data-cy="descriptor-more-opts"]').click();
|
cy.get('[data-cy="descriptor-more-opts"]').click();
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('clickButtonsDescriptor', (id) => {
|
Cypress.Commands.add('clickButtonDescriptor', (id) => {
|
||||||
cy.get(`.actions > .q-card__actions> .q-btn:nth-child(${id})`)
|
|
||||||
.invoke('removeAttr', 'target')
|
|
||||||
.click();
|
|
||||||
});
|
|
||||||
|
|
||||||
Cypress.Commands.add('openActionDescriptor', (opt) => {
|
|
||||||
cy.openActionsDescriptor();
|
|
||||||
const listItem = '[role="menu"] .q-list .q-item';
|
|
||||||
cy.contains(listItem, opt).click();
|
|
||||||
1;
|
|
||||||
});
|
|
||||||
|
|
||||||
Cypress.Commands.add('clickButtonsDescriptor', (id) => {
|
|
||||||
cy.get(`.actions > .q-card__actions> .q-btn:nth-child(${id})`)
|
|
||||||
.invoke('removeAttr', 'target')
|
|
||||||
.click();
|
|
||||||
});
|
|
||||||
|
|
||||||
Cypress.Commands.add('openActionDescriptor', (opt) => {
|
|
||||||
cy.openActionsDescriptor();
|
|
||||||
const listItem = '[role="menu"] .q-list .q-item';
|
|
||||||
cy.contains(listItem, opt).click();
|
|
||||||
1;
|
|
||||||
});
|
|
||||||
|
|
||||||
Cypress.Commands.add('clickButtonsDescriptor', (id) => {
|
|
||||||
cy.get(`.actions > .q-card__actions> .q-btn:nth-child(${id})`)
|
cy.get(`.actions > .q-card__actions> .q-btn:nth-child(${id})`)
|
||||||
.invoke('removeAttr', 'target')
|
.invoke('removeAttr', 'target')
|
||||||
.click();
|
.click();
|
||||||
|
@ -374,3 +347,21 @@ Cypress.Commands.add('addBtnClick', () => {
|
||||||
.and('be.visible')
|
.and('be.visible')
|
||||||
.click();
|
.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Cypress.Commands.add('clickButtonWith', (type, value) => {
|
||||||
|
switch (type) {
|
||||||
|
case 'icon':
|
||||||
|
cy.clickButtonWithIcon(value);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
cy.clickButtonWithText(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Cypress.Commands.add('clickButtonWithIcon', (iconClass) => {
|
||||||
|
cy.get(`.q-icon.${iconClass}`).parent().click();
|
||||||
|
});
|
||||||
|
Cypress.Commands.add('clickButtonWithText', (buttonText) => {
|
||||||
|
cy.get('.q-btn').contains(buttonText).click();
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue