2020-11-23 17:27:32 +00:00
|
|
|
import selectors from '../../helpers/selectors.js';
|
|
|
|
import getBrowser from '../../helpers/puppeteer';
|
|
|
|
|
|
|
|
describe('Travel extra community path', () => {
|
|
|
|
let browser;
|
|
|
|
let page;
|
|
|
|
|
|
|
|
beforeAll(async() => {
|
|
|
|
browser = await getBrowser();
|
|
|
|
page = browser.page;
|
|
|
|
await page.loginAndModule('buyer', 'travel');
|
|
|
|
await page.accessToSection('travel.extraCommunity');
|
|
|
|
});
|
|
|
|
|
|
|
|
afterAll(async() => {
|
|
|
|
await browser.close();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should edit the travel reference', async() => {
|
|
|
|
await page.waitToClick(selectors.travelExtraCommunity.removeContinentFilter);
|
2020-12-30 13:54:51 +00:00
|
|
|
await page.waitForSpinnerLoad();
|
2020-11-23 17:27:32 +00:00
|
|
|
await page.writeOnEditableTD(selectors.travelExtraCommunity.firstTravelReference, 'edited reference');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should reload the index and confirm the reference was edited', async() => {
|
|
|
|
await page.accessToSection('travel.index');
|
|
|
|
await page.accessToSection('travel.extraCommunity');
|
|
|
|
await page.waitToClick(selectors.travelExtraCommunity.removeContinentFilter);
|
|
|
|
await page.waitForTextInElement(selectors.travelExtraCommunity.firstTravelReference, 'edited reference');
|
|
|
|
const reference = await page.getProperty(selectors.travelExtraCommunity.firstTravelReference, 'innerText');
|
|
|
|
|
|
|
|
expect(reference).toContain('edited reference');
|
|
|
|
});
|
|
|
|
});
|