- chore: implement new test reporter to see more details on failed tests

- fix: fix broken e2e tests on Android 8+
This commit is contained in:
Sefa Ilkimen
2021-07-15 03:14:46 +02:00
parent 94126b9021
commit 9d6005af29
4 changed files with 238 additions and 5 deletions
+12 -4
View File
@@ -7,6 +7,9 @@ const testDefinitions = require('../e2e-specs');
global.should = chai.should();
let driver;
let allPassed = true;
describe('Advanced HTTP e2e test suite', function () {
const isSauceLabs = !!process.env.SAUCE_USERNAME;
const isBrowserStack = !!process.env.BROWSERSTACK_USERNAME;
@@ -17,9 +20,6 @@ describe('Advanced HTTP e2e test suite', function () {
const targetInfo = { isSauceLabs, isBrowserStack, isDevice, isAndroid };
const environment = isSauceLabs ? 'saucelabs' : isBrowserStack ? 'browserstack' : 'local';
let driver;
let allPassed = true;
this.timeout(15000);
this.slow(4000);
@@ -121,7 +121,15 @@ async function waitToBeFinished(driver, timeout) {
async function validateResult(driver, validationFunc, targetInfo) {
const result = await driver.safeExecute('app.lastResult');
validationFunc(driver, result, targetInfo);
try {
validationFunc(driver, result, targetInfo);
} catch (error) {
allPassed = false;
error.details = result;
throw error;
}
}
async function checkSkipped(driver) {