E2E fixes
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2020-04-02 18:55:07 +02:00
parent 81d50c92ae
commit a33bbd428f
5 changed files with 9 additions and 15 deletions

View File

@ -143,7 +143,11 @@ let actions = {
}, state);
if (nested) {
await this.waitToClick('vn-left-menu vn-item-section > vn-icon[icon=keyboard_arrow_down]');
let selector = 'vn-left-menu vn-item-section > vn-icon[icon=keyboard_arrow_down]';
await this.evaluate(selector => {
document.querySelector(selector).scrollIntoViewIfNeeded();
}, selector);
await this.waitToClick(selector);
await this.wait('vn-left-menu .expanded');
}

View File

@ -1,8 +1,7 @@
import selectors from '../../helpers/selectors';
import getBrowser from '../../helpers/puppeteer';
// 2215 Don't work in windows
xdescribe('Client Edit billing data path', () => {
describe('Client Edit billing data path', () => {
let browser;
let page;
beforeAll(async() => {
@ -33,10 +32,6 @@ xdescribe('Client Edit billing data path', () => {
});
it(`should create a new BIC code`, async() => {
// XXX: Windows fix, entity code doesn't get the focus, so the text
// '9999' is written in entity name.
await page.waitFor(500);
await page.waitToClick(selectors.clientBillingData.newBankEntityButton);
await page.write(selectors.clientBillingData.newBankEntityName, 'Gotham City Bank');
await page.write(selectors.clientBillingData.newBankEntityCode, '9999');
@ -65,7 +60,6 @@ xdescribe('Client Edit billing data path', () => {
});
it(`should save the form with all its new data`, async() => {
await page.waitFor(3000);
await page.waitForWatcherData(selectors.clientBillingData.watcher);
await page.waitToClick(selectors.clientBillingData.saveButton);
let snackbarMessage = await page.waitForLastSnackbar();

View File

@ -27,10 +27,8 @@ describe('Client Edit web access path', () => {
});
it('should confirm web access is now unchecked', async() => {
await page.waitToClick(selectors.clientBasicData.basicDataButton);
await page.wait(selectors.clientBasicData.name);
await page.waitToClick(selectors.clientsIndex.othersButton);
await page.waitToClick(selectors.clientWebAccess.webAccessButton);
await page.accessToSection('client.card.basicData');
await page.accessToSection('client.card.webAccess');
const result = await page.checkboxState(selectors.clientWebAccess.enableWebAccessCheckbox);
expect(result).toBe('unchecked');

View File

@ -26,8 +26,7 @@ describe('Client log path', () => {
});
it('should navigate to the log section', async() => {
await page.waitToClick(selectors.clientLog.logButton);
await page.waitForState('client.card.log');
await page.accessToSection('client.card.log');
});
it('should check the previous value of the last logged change', async() => {

View File

@ -34,7 +34,6 @@ describe('Ticket log path', () => {
it('should navigate to the log section', async() => {
await page.accessToSection('ticket.card.log');
await page.waitForState('ticket.card.log');
});
it('should set the viewport width to 1920 to see the table full width', async() => {