38 lines
1.4 KiB
JavaScript
38 lines
1.4 KiB
JavaScript
|
import selectors from '../../helpers/selectors.js';
|
||
|
import getBrowser from '../../helpers/puppeteer';
|
||
|
|
||
|
// #2434 [E2E] entry.create
|
||
|
// esto explota por ahora al guardar con el error:
|
||
|
// Possibly unhandled rejection:
|
||
|
// {"$id":0,"type":4,"message":"This transition is invalid","detail":"Could not resolve 'entry.card.basicData' from state 'entry.create'"}
|
||
|
xdescribe('Entry create path', () => {
|
||
|
let browser;
|
||
|
let page;
|
||
|
|
||
|
beforeAll(async() => {
|
||
|
browser = await getBrowser();
|
||
|
page = browser.page;
|
||
|
await page.loginAndModule('buyer', 'entry');
|
||
|
});
|
||
|
|
||
|
afterAll(async() => {
|
||
|
await browser.close();
|
||
|
});
|
||
|
|
||
|
it('should click the create entry button to open the form', async() => {
|
||
|
await page.waitToClick(selectors.entryIndex.createEntryButton);
|
||
|
await page.waitForState('entry.create');
|
||
|
});
|
||
|
|
||
|
it('should fill the form to create a valid entry', async() => {
|
||
|
await page.autocompleteSearch(selectors.entryIndex.newEntrySupplier, '2');
|
||
|
await page.autocompleteSearch(selectors.entryIndex.newEntryTravel, 'Warehouse Three');
|
||
|
await page.autocompleteSearch(selectors.entryIndex.newEntryCompany, 'ORN');
|
||
|
await page.waitToClick(selectors.entryIndex.saveNewEntry);
|
||
|
});
|
||
|
|
||
|
it('should check the new state is a summary or a basicData for a created entry', async() => {
|
||
|
expect(true).toBe(false); // to flag this isn't quite finished yet.
|
||
|
});
|
||
|
});
|