salix-front/test/cypress/integration/item/itemBotanical.spec.js

36 lines
1.3 KiB
JavaScript
Raw Normal View History

2024-12-03 12:00:16 +00:00
/// <reference types="cypress" />
describe('Item botanical', () => {
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/item/list`);
cy.typeSearchbar('1{enter}');
2024-12-03 12:00:16 +00:00
});
it('should modify the botanical', () => {
cy.get('[href="#/item/1/botanical"]').click();
cy.dataCy('AddGenusSelectDialog').type('Abies');
2024-12-03 12:00:16 +00:00
cy.get('.q-menu .q-item').contains('Abies').click();
cy.dataCy('AddSpeciesSelectDialog').type('dealbata');
2024-12-03 12:00:16 +00:00
cy.get('.q-menu .q-item').contains('dealbata').click();
cy.get('.q-btn-group > .q-btn--standard').click();
cy.checkNotification('Data saved');
});
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('FormModelPopup_save').click();
2024-12-03 12:00:16 +00:00
cy.checkNotification('Data created');
});
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('FormModelPopup_save').click();
2024-12-03 12:00:16 +00:00
cy.checkNotification('Data created');
});
});