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

32 lines
1.1 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');
2025-01-07 12:16:05 +00:00
cy.visit(`/#/item/1/botanical`);
2024-12-03 12:00:16 +00:00
});
it('should modify the botanical', () => {
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.dataCy('Genus_icon').click();
2024-12-31 07:07:47 +00:00
cy.dataCy('Latin genus name_input').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.dataCy('Species_icon').click();
2024-12-31 07:07:47 +00:00
cy.dataCy('Latin species name_input').type('Test specie');
cy.dataCy('FormModelPopup_save').click();
2024-12-03 12:00:16 +00:00
cy.checkNotification('Data created');
});
});