refactor: refs #8220 requested changes
This commit is contained in:
parent
a98c1b38e7
commit
843710255e
|
@ -37,7 +37,6 @@ onMounted(async () => {
|
|||
:label="t('Latin genus name')"
|
||||
v-model="data.name"
|
||||
:required="true"
|
||||
data-cy="AddGenusInput"
|
||||
/>
|
||||
</VnRow>
|
||||
</template>
|
||||
|
|
|
@ -37,7 +37,6 @@ onMounted(async () => {
|
|||
:label="t('Latin species name')"
|
||||
v-model="data.name"
|
||||
:required="true"
|
||||
data-cy="AddSpeciesInput"
|
||||
/>
|
||||
</VnRow>
|
||||
</template>
|
||||
|
|
|
@ -199,7 +199,6 @@ onMounted(async () => {
|
|||
dense
|
||||
outlined
|
||||
rounded
|
||||
data-cy="ItemFilterCategorySelect"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
|
@ -226,7 +225,6 @@ onMounted(async () => {
|
|||
dense
|
||||
outlined
|
||||
rounded
|
||||
data-cy="ItemFilterTypeSelect"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
|
|
|
@ -10,9 +10,7 @@ describe('Item shelving', () => {
|
|||
it('should throw an error if the barcode exists', () => {
|
||||
cy.get('[href="#/item/1/barcode"]').click();
|
||||
cy.get('.q-card > .q-btn > .q-btn__content > .q-icon').click();
|
||||
cy.get(
|
||||
':nth-child(4) > div.full-width > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Code_input"]'
|
||||
).type('1111111111');
|
||||
cy.dataCy('Code_input').eq(3).type('1111111111');
|
||||
cy.dataCy('crudModelDefaultSaveBtn').click();
|
||||
cy.checkNotification('Codes can not be repeated');
|
||||
});
|
||||
|
@ -20,9 +18,7 @@ describe('Item shelving', () => {
|
|||
it('should create a new barcode', () => {
|
||||
cy.get('[href="#/item/1/barcode"]').click();
|
||||
cy.get('.q-card > .q-btn > .q-btn__content > .q-icon').click();
|
||||
cy.get(
|
||||
':nth-child(4) > div.full-width > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Code_input"]'
|
||||
).type('1231231231');
|
||||
cy.dataCy('Code_input').eq(3).type('1231231231');
|
||||
cy.dataCy('crudModelDefaultSaveBtn').click();
|
||||
cy.checkNotification('Data saved');
|
||||
});
|
||||
|
|
|
@ -20,7 +20,7 @@ describe('Item botanical', () => {
|
|||
it('should create a new Genus', () => {
|
||||
cy.get('[href="#/item/1/botanical"]').click();
|
||||
cy.dataCy('Genus_icon').click();
|
||||
cy.dataCy('AddGenusInput').type('Test');
|
||||
cy.dataCy('Latin genus name_input').type('Test');
|
||||
cy.dataCy('FormModelPopup_save').click();
|
||||
cy.checkNotification('Data created');
|
||||
});
|
||||
|
@ -28,7 +28,7 @@ describe('Item botanical', () => {
|
|||
it('should create a new specie', () => {
|
||||
cy.get('[href="#/item/1/botanical"]').click();
|
||||
cy.dataCy('Species_icon').click();
|
||||
cy.dataCy('AddSpeciesInput').type('Test specie');
|
||||
cy.dataCy('Latin species name_input').type('Test specie');
|
||||
cy.dataCy('FormModelPopup_save').click();
|
||||
cy.checkNotification('Data created');
|
||||
});
|
||||
|
|
|
@ -9,9 +9,9 @@ describe('Item list', () => {
|
|||
});
|
||||
|
||||
it('should filter the items and redirect to the summary', () => {
|
||||
cy.dataCy('ItemFilterCategorySelect').type('Plant');
|
||||
cy.dataCy('Category_select').type('Plant');
|
||||
cy.get('.q-menu .q-item').contains('Plant').click();
|
||||
cy.dataCy('ItemFilterTypeSelect').type('Anthurium');
|
||||
cy.dataCy('Type_select').type('Anthurium');
|
||||
cy.get('.q-menu .q-item').contains('Anthurium').click();
|
||||
cy.get('.q-virtual-scroll__content > :nth-child(4) > :nth-child(4)').click();
|
||||
});
|
||||
|
|
|
@ -9,9 +9,7 @@ describe('Item tax', () => {
|
|||
|
||||
it('should modify the tax for Spain', () => {
|
||||
cy.get('[href="#/item/1/tax"]').click();
|
||||
cy.get(
|
||||
':nth-child(1) > .q-select > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > [data-cy="Class_select"]'
|
||||
).type('General VAT{enter}');
|
||||
cy.dataCy('Class_select').eq(1).type('General VAT{enter}');
|
||||
cy.dataCy('crudModelDefaultSaveBtn').click();
|
||||
cy.checkNotification('Data saved');
|
||||
});
|
||||
|
|
|
@ -16,17 +16,17 @@ describe('VnSearchBar', () => {
|
|||
});
|
||||
|
||||
it('should stay on the list page if there are several results or none', () => {
|
||||
cy.writeSearchbar('salesA{enter}');
|
||||
cy.typeSearchbar('salesA{enter}');
|
||||
checkTableLength(2);
|
||||
|
||||
cy.clearSearchbar();
|
||||
cy.writeSearchbar('0{enter}');
|
||||
cy.typeSearchbar('0{enter}');
|
||||
checkTableLength(0);
|
||||
});
|
||||
|
||||
const searchAndCheck = (searchTerm, expectedText) => {
|
||||
cy.clearSearchbar();
|
||||
cy.writeSearchbar(`${searchTerm}{enter}`);
|
||||
cy.typeSearchbar(`${searchTerm}{enter}`);
|
||||
cy.get(idGap).should('have.text', expectedText);
|
||||
};
|
||||
|
||||
|
|
|
@ -280,7 +280,7 @@ Cypress.Commands.add('clearSearchbar', (element) => {
|
|||
).clear();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('writeSearchbar', (value) => {
|
||||
Cypress.Commands.add('typeSearchbar', (value) => {
|
||||
cy.get('#searchbar > form > div:nth-child(1) > label > div:nth-child(1) input').type(
|
||||
value
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue