test: refs #8484 rollback
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2025-02-17 15:19:36 +01:00
parent 6be01d48fd
commit cde262d640
1 changed files with 12 additions and 26 deletions

View File

@ -12,39 +12,25 @@ describe('Item type', () => {
}); });
it('should throw an error if the code already exists', () => { it('should throw an error if the code already exists', () => {
const data = {
Code: { val: 'ALS' },
Name: { val: 'Alstroemeria' },
Worker: { val: workerError, type: 'select' },
ItemCategory: { val: category, type: 'select' },
};
cy.dataCy('vnTableCreateBtn').click(); cy.dataCy('vnTableCreateBtn').click();
cy.fillInForm(data); cy.dataCy('codeInput').type('ALS');
// cy.dataCy('codeInput').type('ALS'); cy.dataCy('nameInput').type('Alstroemeria');
// cy.dataCy('nameInput').type('Alstroemeria'); cy.dataCy('vnWorkerSelect').type(workerError);
// cy.dataCy('vnWorkerSelect').type(workerError); cy.get('.q-menu .q-item').contains(workerError).click();
// cy.get('.q-menu .q-item').contains(workerError).click(); cy.dataCy('itemCategorySelect').type(category);
// cy.dataCy('itemCategorySelect').type(category); cy.get('.q-menu .q-item').contains(category).click();
// cy.get('.q-menu .q-item').contains(category).click();
cy.dataCy('FormModelPopup_save').click(); cy.dataCy('FormModelPopup_save').click();
cy.checkNotification('An item type with the same code already exists'); cy.checkNotification('An item type with the same code already exists');
}); });
it('should create a new type', () => { it('should create a new type', () => {
const data = {
Code: { val: 'LIL' },
Name: { val: 'Lilium' },
Worker: { val: worker, type: 'select' },
ItemCategory: { val: type, type: 'select' },
};
cy.dataCy('vnTableCreateBtn').click(); cy.dataCy('vnTableCreateBtn').click();
cy.fillInForm(data); cy.dataCy('codeInput').type('LIL');
// cy.dataCy('codeInput').type('LIL'); cy.dataCy('nameInput').type('Lilium');
// cy.dataCy('nameInput').type('Lilium'); cy.dataCy('vnWorkerSelect').type(worker);
// cy.dataCy('vnWorkerSelect').type(worker); cy.get('.q-menu .q-item').contains(worker).click();
// cy.get('.q-menu .q-item').contains(worker).click(); cy.dataCy('itemCategorySelect').type(type);
// cy.dataCy('itemCategorySelect').type(type); cy.get('.q-menu .q-item').contains(type).click();
// cy.get('.q-menu .q-item').contains(type).click();
cy.dataCy('FormModelPopup_save').click(); cy.dataCy('FormModelPopup_save').click();
cy.checkNotification('Data created'); cy.checkNotification('Data created');
}); });