finished e2e path for botanical
This commit is contained in:
parent
0288e07638
commit
3eaec1bba9
|
@ -1,7 +1,7 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import createNightmare from '../../helpers/helpers';
|
||||
|
||||
fdescribe('create item botanical path', () => {
|
||||
describe('create item botanical path', () => {
|
||||
const nightmare = createNightmare();
|
||||
|
||||
it('should access to the items index by clicking the items button', () => {
|
||||
|
@ -38,7 +38,7 @@ fdescribe('create item botanical path', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it(`should click create a new botanical for the item with id Mjolnir`, () => {
|
||||
it(`should create a new botanical for the item with id Mjolnir`, () => {
|
||||
return nightmare
|
||||
.type(selectors.itemBotanical.botanicalInput, 'Cicuta maculata')
|
||||
.waitToClick(selectors.itemBotanical.genusSelect)
|
||||
|
@ -81,4 +81,49 @@ fdescribe('create item botanical path', () => {
|
|||
expect(result).toEqual('dealbata');
|
||||
});
|
||||
});
|
||||
|
||||
it(`should edit botanical for the item with id Mjolnir`, () => {
|
||||
return nightmare
|
||||
.clearInput(selectors.itemBotanical.botanicalInput)
|
||||
.type(selectors.itemBotanical.botanicalInput, 'Herp Derp')
|
||||
.waitToClick(selectors.itemBotanical.genusSelect)
|
||||
.waitToClick(selectors.itemBotanical.genusSelectOptionTwo)
|
||||
.waitToClick(selectors.itemBotanical.speciesSelect)
|
||||
.waitToClick(selectors.itemBotanical.speciesSelectOptionTwo)
|
||||
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
|
||||
.waitForSnackbar()
|
||||
.then(result => {
|
||||
expect(result).toContain('Data saved!');
|
||||
});
|
||||
});
|
||||
|
||||
it(`should confirm the botanical for item 5 was edited`, () => {
|
||||
return nightmare
|
||||
.click(selectors.itemBasicData.basicDataButton)
|
||||
.wait(selectors.itemBasicData.nameInput)
|
||||
.click(selectors.itemBotanical.botanicalButton)
|
||||
.wait(200)
|
||||
.getInputValue(selectors.itemBotanical.botanicalInput)
|
||||
.then(result => {
|
||||
expect(result).toEqual('Herp Derp');
|
||||
});
|
||||
});
|
||||
|
||||
it(`should confirm the Genus for item 5 was edited`, () => {
|
||||
return nightmare
|
||||
.wait(200)
|
||||
.getInputValue(selectors.itemBotanical.genusSelect)
|
||||
.then(result => {
|
||||
expect(result).toEqual('Abies');
|
||||
});
|
||||
});
|
||||
|
||||
it(`should confirm the Species for item 5 was edited`, () => {
|
||||
return nightmare
|
||||
.wait(200)
|
||||
.getInputValue(selectors.itemBotanical.speciesSelect)
|
||||
.then(result => {
|
||||
expect(result).toEqual('decurrens');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue