test: refs #8484 await main content loaded #1318

Merged
alexm merged 54 commits from 8484-waitToDomContentLoadedInTests into dev 2025-02-27 06:19:45 +00:00
1 changed files with 12 additions and 26 deletions
Showing only changes of commit cde262d640 - Show all commits

View File

@ -12,39 +12,25 @@ describe('Item type', () => {
});
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.fillInForm(data);
// cy.dataCy('codeInput').type('ALS');
// cy.dataCy('nameInput').type('Alstroemeria');
// cy.dataCy('vnWorkerSelect').type(workerError);
// cy.get('.q-menu .q-item').contains(workerError).click();
// cy.dataCy('itemCategorySelect').type(category);
// cy.get('.q-menu .q-item').contains(category).click();
cy.dataCy('codeInput').type('ALS');
cy.dataCy('nameInput').type('Alstroemeria');
cy.dataCy('vnWorkerSelect').type(workerError);
cy.get('.q-menu .q-item').contains(workerError).click();
cy.dataCy('itemCategorySelect').type(category);
cy.get('.q-menu .q-item').contains(category).click();
cy.dataCy('FormModelPopup_save').click();
cy.checkNotification('An item type with the same code already exists');
});
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.fillInForm(data);
// cy.dataCy('codeInput').type('LIL');
// cy.dataCy('nameInput').type('Lilium');
// cy.dataCy('vnWorkerSelect').type(worker);
// cy.get('.q-menu .q-item').contains(worker).click();
// cy.dataCy('itemCategorySelect').type(type);
// cy.get('.q-menu .q-item').contains(type).click();
cy.dataCy('codeInput').type('LIL');
cy.dataCy('nameInput').type('Lilium');
cy.dataCy('vnWorkerSelect').type(worker);
cy.get('.q-menu .q-item').contains(worker).click();
cy.dataCy('itemCategorySelect').type(type);
cy.get('.q-menu .q-item').contains(type).click();
cy.dataCy('FormModelPopup_save').click();
cy.checkNotification('Data created');
});