mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-04-24 00:00:03 +08:00
- 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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user