Initial commit
This commit is contained in:
80
.dist/electron-e2e/app.spec.js
Normal file
80
.dist/electron-e2e/app.spec.js
Normal file
@@ -0,0 +1,80 @@
|
||||
/*import MainPage from './pageobjects/main.page';
|
||||
|
||||
describe('My Login application', () => {
|
||||
it('should login with valid credentials', async () => {
|
||||
await MainPage.open();
|
||||
/*await LoginPage.open();
|
||||
|
||||
await LoginPage.login('tomsmith', 'SuperSecretPassword!');
|
||||
await expect(SecurePage.flashAlert).toBeExisting();
|
||||
await expect(SecurePage.flashAlert).toHaveTextContaining(
|
||||
'You logged into a secure area!');* /
|
||||
});
|
||||
});* /
|
||||
|
||||
describe('application loading', () => {
|
||||
describe('App', () => {
|
||||
it('should launch the application', async () => {
|
||||
|
||||
console.log('==>', await browser.getTitle());
|
||||
// expect(title).toEqual('Test');
|
||||
});
|
||||
|
||||
// it('should pass args through to the launched application', async () => {
|
||||
// // custom args are set in the wdio.conf.js file as they need to be set before WDIO starts
|
||||
// const argv = await app.mainProcess.argv();
|
||||
// expect(argv).toContain('--foo');
|
||||
// expect(argv).toContain('--bar=baz');
|
||||
// });
|
||||
});
|
||||
}); */
|
||||
var __awaiter =
|
||||
(this && this.__awaiter) ||
|
||||
function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) {
|
||||
return value instanceof P
|
||||
? value
|
||||
: new P(function (resolve) {
|
||||
resolve(value);
|
||||
});
|
||||
}
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) {
|
||||
try {
|
||||
step(generator.next(value));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
}
|
||||
function rejected(value) {
|
||||
try {
|
||||
step(generator['throw'](value));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
}
|
||||
function step(result) {
|
||||
result.done
|
||||
? resolve(result.value)
|
||||
: adopt(result.value).then(fulfilled, rejected);
|
||||
}
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
describe('A simple test to check if app window is opened, visible and with expected title', () => {
|
||||
describe('App should', () => {
|
||||
it('show an initial window', () =>
|
||||
__awaiter(this, void 0, void 0, function* () {
|
||||
// Checking there is one visible window
|
||||
// expect(await browser.).toEqual(true);
|
||||
// Please note that getWindowHandles() will return 2 if `dev tools` is opened.
|
||||
const { length } = yield browser.getWindowHandles();
|
||||
expect(length).toEqual(1);
|
||||
}));
|
||||
it('have expected title', () =>
|
||||
__awaiter(this, void 0, void 0, function* () {
|
||||
expect(yield browser.getTitle()).toEqual('ElectronAngularQuickStart');
|
||||
}));
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=app.spec.js.map
|
||||
1
.dist/electron-e2e/app.spec.js.map
Normal file
1
.dist/electron-e2e/app.spec.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"app.spec.js","sourceRoot":"","sources":["../../workspaces/electron-e2e/app.spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6BM;;;;;;;;;;AAEN,QAAQ,CAAC,iFAAiF,EAAE,GAAG,EAAE;IAChG,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;QAC3B,EAAE,CAAC,wBAAwB,EAAE,GAAS,EAAE;YACvC,uCAAuC;YACvC,wCAAwC;YACxC,8EAA8E;YAC9E,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC,gBAAgB,EAAE,CAAC;YACpD,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC3B,CAAC,CAAA,CAAC,CAAC;QAEH,EAAE,CAAC,qBAAqB,EAAE,GAAS,EAAE;YACpC,MAAM,CAAC,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;QACvE,CAAC,CAAA,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
||||
54
.dist/electron-e2e/multiples.spec.js
Normal file
54
.dist/electron-e2e/multiples.spec.js
Normal file
@@ -0,0 +1,54 @@
|
||||
var __awaiter =
|
||||
(this && this.__awaiter) ||
|
||||
function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) {
|
||||
return value instanceof P
|
||||
? value
|
||||
: new P(function (resolve) {
|
||||
resolve(value);
|
||||
});
|
||||
}
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) {
|
||||
try {
|
||||
step(generator.next(value));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
}
|
||||
function rejected(value) {
|
||||
try {
|
||||
step(generator['throw'](value));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
}
|
||||
function step(result) {
|
||||
result.done
|
||||
? resolve(result.value)
|
||||
: adopt(result.value).then(fulfilled, rejected);
|
||||
}
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
import MultiplesPage from './pageobjects/multiples.page';
|
||||
describe('A simple test to check if a given input matches with computed multiples', () => {
|
||||
describe('Multiples component should', () => {
|
||||
it('show up on startup', () =>
|
||||
__awaiter(void 0, void 0, void 0, function* () {
|
||||
yield expect(MultiplesPage.root).toBeDisplayed();
|
||||
}));
|
||||
const number = Math.floor(Math.random() * 100) % 10;
|
||||
it(`display expected results on input (${number})`, () =>
|
||||
__awaiter(void 0, void 0, void 0, function* () {
|
||||
yield MultiplesPage.enterInput(number);
|
||||
const results = yield MultiplesPage.results;
|
||||
for (const index of results.keys()) {
|
||||
const ntimes = 1 + index;
|
||||
const expected = `${number} * ${ntimes} = ${number * ntimes}`;
|
||||
expect(yield results[index].getText()).toEqual(expected);
|
||||
}
|
||||
}));
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=multiples.spec.js.map
|
||||
1
.dist/electron-e2e/multiples.spec.js.map
Normal file
1
.dist/electron-e2e/multiples.spec.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"multiples.spec.js","sourceRoot":"","sources":["../../workspaces/electron-e2e/multiples.spec.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,aAAa,MAAM,8BAA8B,CAAC;AAEzD,QAAQ,CAAC,yEAAyE,EAAE,GAAG,EAAE;IACxF,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;QAC3C,EAAE,CAAC,oBAAoB,EAAE,GAAS,EAAE;YACnC,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;QAClD,CAAC,CAAA,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC;QACpD,EAAE,CAAC,sCAAsC,MAAM,GAAG,EAAE,GAAS,EAAE;YAC9D,MAAM,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACvC,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC;YAC5C,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,IAAI,EAAE,EAAE;gBACnC,MAAM,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC;gBACzB,MAAM,QAAQ,GAAG,GAAG,MAAM,MAAM,MAAM,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC;gBAC9D,MAAM,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;aACzD;QACF,CAAC,CAAA,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
||||
62
.dist/electron-e2e/pageobjects/multiples.page.js
Normal file
62
.dist/electron-e2e/pageobjects/multiples.page.js
Normal file
@@ -0,0 +1,62 @@
|
||||
var __awaiter =
|
||||
(this && this.__awaiter) ||
|
||||
function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) {
|
||||
return value instanceof P
|
||||
? value
|
||||
: new P(function (resolve) {
|
||||
resolve(value);
|
||||
});
|
||||
}
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) {
|
||||
try {
|
||||
step(generator.next(value));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
}
|
||||
function rejected(value) {
|
||||
try {
|
||||
step(generator['throw'](value));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
}
|
||||
function step(result) {
|
||||
result.done
|
||||
? resolve(result.value)
|
||||
: adopt(result.value).then(fulfilled, rejected);
|
||||
}
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
import AbstractPage from './page';
|
||||
class MultiplesPage extends AbstractPage {
|
||||
/**
|
||||
* Selectors using getter methods
|
||||
*/
|
||||
get root() {
|
||||
return $('#multiples');
|
||||
}
|
||||
get input() {
|
||||
return $('#input');
|
||||
}
|
||||
get results() {
|
||||
return $$('.results');
|
||||
}
|
||||
get buttonSubmit() {
|
||||
return $('button[type="submit"]');
|
||||
}
|
||||
/**
|
||||
* Wrapper method to interact with the page
|
||||
*/
|
||||
enterInput(number) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield this.input.setValue(number);
|
||||
yield this.buttonSubmit.click();
|
||||
});
|
||||
}
|
||||
}
|
||||
export default new MultiplesPage();
|
||||
//# sourceMappingURL=multiples.page.js.map
|
||||
1
.dist/electron-e2e/pageobjects/multiples.page.js.map
Normal file
1
.dist/electron-e2e/pageobjects/multiples.page.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"multiples.page.js","sourceRoot":"","sources":["../../../workspaces/electron-e2e/pageobjects/multiples.page.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAElC,MAAM,aAAc,SAAQ,YAAY;IACvC;;OAEG;IACH,IAAW,IAAI;QACd,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC;IACxB,CAAC;IAED,IAAW,KAAK;QACf,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;IACpB,CAAC;IAED,IAAW,OAAO;QACjB,OAAO,EAAE,CAAC,UAAU,CAAC,CAAC;IACvB,CAAC;IAED,IAAW,YAAY;QACtB,OAAO,CAAC,CAAC,uBAAuB,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACU,UAAU,CAAC,MAAc;;YACrC,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAClC,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QACjC,CAAC;KAAA;CACD;AAED,eAAe,IAAI,aAAa,EAAE,CAAC"}
|
||||
6
.dist/electron-e2e/pageobjects/page.js
Normal file
6
.dist/electron-e2e/pageobjects/page.js
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Abstract page object containing all methods, selectors and functionality
|
||||
* that is shared across all page objects
|
||||
*/
|
||||
export default class AbstractPage {}
|
||||
//# sourceMappingURL=page.js.map
|
||||
1
.dist/electron-e2e/pageobjects/page.js.map
Normal file
1
.dist/electron-e2e/pageobjects/page.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../workspaces/electron-e2e/pageobjects/page.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAgB,YAAY;CAEzC"}
|
||||
396
.dist/electron-e2e/webdriverio.config.js
Normal file
396
.dist/electron-e2e/webdriverio.config.js
Normal file
@@ -0,0 +1,396 @@
|
||||
var __awaiter =
|
||||
(this && this.__awaiter) ||
|
||||
function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) {
|
||||
return value instanceof P
|
||||
? value
|
||||
: new P(function (resolve) {
|
||||
resolve(value);
|
||||
});
|
||||
}
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) {
|
||||
try {
|
||||
step(generator.next(value));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
}
|
||||
function rejected(value) {
|
||||
try {
|
||||
step(generator['throw'](value));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
}
|
||||
function step(result) {
|
||||
result.done
|
||||
? resolve(result.value)
|
||||
: adopt(result.value).then(fulfilled, rejected);
|
||||
}
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
import path from 'node:path';
|
||||
// Path to local electron binary
|
||||
let electronPath = path.join(__dirname, '../../node_modules/.bin/electron');
|
||||
if (process.platform === 'win32') {
|
||||
electronPath += '.cmd';
|
||||
}
|
||||
// Starting hook
|
||||
const waitUntilWindowLoaded = () =>
|
||||
__awaiter(void 0, void 0, void 0, function* () {
|
||||
const timeout = 10000;
|
||||
yield browser.waitUntil(
|
||||
() =>
|
||||
__awaiter(void 0, void 0, void 0, function* () {
|
||||
return (yield browser.isLoading()) === false;
|
||||
}),
|
||||
{
|
||||
timeout: timeout,
|
||||
timeoutMsg: `Expected app to be loaded in less than ${timeout}ms`,
|
||||
}
|
||||
);
|
||||
});
|
||||
// Closing hook
|
||||
const closeApplication = () =>
|
||||
__awaiter(void 0, void 0, void 0, function* () {
|
||||
if (browser) {
|
||||
// Wait 1 second and close window
|
||||
yield new Promise((resolve) => setTimeout(resolve, 1000));
|
||||
yield browser.closeWindow();
|
||||
}
|
||||
});
|
||||
export const config = {
|
||||
//
|
||||
// ====================
|
||||
// Runner Configuration
|
||||
// ====================
|
||||
//
|
||||
//
|
||||
// =====================
|
||||
// ts-node Configurations
|
||||
// =====================
|
||||
//
|
||||
// You can write tests using TypeScript to get autocompletion and type safety.
|
||||
// You will need typescript and ts-node installed as devDependencies.
|
||||
// WebdriverIO will automatically detect if these dependencies are installed
|
||||
// and will compile your config and tests for you.
|
||||
// If you need to configure how ts-node runs please use the
|
||||
// environment variables for ts-node or use wdio config's autoCompileOpts section.
|
||||
//
|
||||
autoCompileOpts: {
|
||||
autoCompile: true,
|
||||
// see https://github.com/TypeStrong/ts-node#cli-and-programmatic-options
|
||||
// for all available options
|
||||
tsNodeOpts: {
|
||||
transpileOnly: true,
|
||||
project: 'workspaces/electron-e2e/tsconfig.json',
|
||||
},
|
||||
// tsconfig-paths is only used if "tsConfigPathsOpts" are provided, if you
|
||||
// do please make sure "tsconfig-paths" is installed as dependency
|
||||
// tsConfigPathsOpts: {
|
||||
// baseUrl: './'
|
||||
// }
|
||||
},
|
||||
//
|
||||
// ==================
|
||||
// Specify Test Files
|
||||
// ==================
|
||||
// Define which test specs should run. The pattern is relative to the directory
|
||||
// from which `wdio` was called.
|
||||
//
|
||||
// The specs are defined as an array of spec files (optionally using wildcards
|
||||
// that will be expanded). The test for each spec file will be run in a separate
|
||||
// worker process. In order to have a group of spec files run in the same worker
|
||||
// process simply enclose them in an array within the specs array.
|
||||
//
|
||||
// If you are calling `wdio` from an NPM script (see https://docs.npmjs.com/cli/run-script),
|
||||
// then the current working directory is where your `package.json` resides, so `wdio`
|
||||
// will be called from there.
|
||||
//
|
||||
specs: ['./workspaces/electron-e2e/**/*.spec.ts'],
|
||||
// Patterns to exclude.
|
||||
exclude: [
|
||||
// 'path/to/excluded/files'
|
||||
],
|
||||
//
|
||||
// ============
|
||||
// Capabilities
|
||||
// ============
|
||||
// Define your capabilities here. WebdriverIO can run multiple capabilities at the same
|
||||
// time. Depending on the number of capabilities, WebdriverIO launches several test
|
||||
// sessions. Within your capabilities you can overwrite the spec and exclude options in
|
||||
// order to group specific specs to a specific capability.
|
||||
//
|
||||
// First, you can define how many instances should be started at the same time. Let's
|
||||
// say you have 3 different capabilities (Chrome, Firefox, and Safari) and you have
|
||||
// set maxInstances to 1; wdio will spawn 3 processes. Therefore, if you have 10 spec
|
||||
// files and you set maxInstances to 10, all spec files will get tested at the same time
|
||||
// and 30 processes will get spawned. The property handles how many capabilities
|
||||
// from the same test should run tests.
|
||||
//
|
||||
maxInstances: 10,
|
||||
//
|
||||
// If you have trouble getting all important capabilities together, check out the
|
||||
// Sauce Labs platform configurator - a great tool to configure your capabilities:
|
||||
// https://saucelabs.com/platform/platform-configurator
|
||||
//
|
||||
capabilities: [
|
||||
{
|
||||
// maxInstances can get overwritten per capability. So if you have an in-house Selenium
|
||||
// grid with only 5 firefox instances available you can make sure that not more than
|
||||
// 5 instances get started at a time.
|
||||
maxInstances: 5,
|
||||
//
|
||||
browserName: 'chrome',
|
||||
acceptInsecureCerts: true,
|
||||
'goog:chromeOptions': {
|
||||
binary: electronPath,
|
||||
args: ['app=' + '.webpack/main/index.js'],
|
||||
},
|
||||
// If outputDir is provided WebdriverIO can capture driver session logs
|
||||
// it is possible to configure which logTypes to include/exclude.
|
||||
// excludeDriverLogs: ['*'], // pass '*' to exclude all driver session logs
|
||||
// excludeDriverLogs: ['bugreport', 'server'],
|
||||
},
|
||||
],
|
||||
//
|
||||
// ===================
|
||||
// Test Configurations
|
||||
// ===================
|
||||
// Define all options that are relevant for the WebdriverIO instance here
|
||||
//
|
||||
// Level of logging verbosity: trace | debug | info | warn | error | silent
|
||||
logLevel: 'info',
|
||||
//
|
||||
// Set specific log levels per logger
|
||||
// loggers:
|
||||
// - webdriver, webdriverio
|
||||
// - @wdio/browserstack-service, @wdio/devtools-service, @wdio/sauce-service
|
||||
// - @wdio/mocha-framework, @wdio/jasmine-framework
|
||||
// - @wdio/local-runner
|
||||
// - @wdio/sumologic-reporter
|
||||
// - @wdio/cli, @wdio/config, @wdio/utils
|
||||
// Level of logging verbosity: trace | debug | info | warn | error | silent
|
||||
// logLevels: {
|
||||
// webdriver: 'info',
|
||||
// '@wdio/appium-service': 'info'
|
||||
// },
|
||||
//
|
||||
// If you only want to run your tests until a specific amount of tests have failed use
|
||||
// bail (default is 0 - don't bail, run all tests).
|
||||
bail: 0,
|
||||
//
|
||||
// Set a base URL in order to shorten url command calls. If your `url` parameter starts
|
||||
// with `/`, the base url gets prepended, not including the path portion of your baseUrl.
|
||||
// If your `url` parameter starts without a scheme or `/` (like `some/path`), the base url
|
||||
// gets prepended directly.
|
||||
baseUrl: 'http://localhost',
|
||||
//
|
||||
// Default timeout for all waitFor* commands.
|
||||
waitforTimeout: 10000,
|
||||
//
|
||||
// Default timeout in milliseconds for request
|
||||
// if browser driver or grid doesn't send response
|
||||
connectionRetryTimeout: 120000,
|
||||
//
|
||||
// Default request retries count
|
||||
connectionRetryCount: 3,
|
||||
//
|
||||
// Test runner services
|
||||
// Services take over a specific job you don't want to take care of. They enhance
|
||||
// your test setup with almost no effort. Unlike plugins, they don't add new
|
||||
// commands. Instead, they hook themselves up into the test process.
|
||||
services: ['chromedriver'],
|
||||
// Framework you want to run your specs with.
|
||||
// The following are supported: Mocha, Jasmine, and Cucumber
|
||||
// see also: https://webdriver.io/docs/frameworks
|
||||
//
|
||||
// Make sure you have the wdio adapter package for the specific framework installed
|
||||
// before running any tests.
|
||||
framework: 'jasmine',
|
||||
//
|
||||
// The number of times to retry the entire specfile when it fails as a whole
|
||||
// specFileRetries: 1,
|
||||
//
|
||||
// Delay in seconds between the spec file retry attempts
|
||||
// specFileRetriesDelay: 0,
|
||||
//
|
||||
// Whether or not retried specfiles should be retried immediately or deferred to the end of the queue
|
||||
// specFileRetriesDeferred: false,
|
||||
//
|
||||
// Test reporter for stdout.
|
||||
// The only one supported by default is 'dot'
|
||||
// see also: https://webdriver.io/docs/dot-reporter
|
||||
reporters: ['spec', ['allure', { outputDir: 'allure-results' }]],
|
||||
//
|
||||
// Options to be passed to Jasmine.
|
||||
jasmineOpts: {
|
||||
// Jasmine default timeout
|
||||
defaultTimeoutInterval: 60000,
|
||||
//
|
||||
// The Jasmine framework allows interception of each assertion in order to log the state of the application
|
||||
// or website depending on the result. For example, it is pretty handy to take a screenshot every time
|
||||
// an assertion fails.
|
||||
expectationResultHandler: function (_passed, _assertion) {
|
||||
// do something
|
||||
},
|
||||
},
|
||||
//
|
||||
// =====
|
||||
// Hooks
|
||||
// =====
|
||||
// WebdriverIO provides several hooks you can use to interfere with the test process in order to enhance
|
||||
// it and to build services around it. You can either apply a single function or an array of
|
||||
// methods to it. If one of them returns with a promise, WebdriverIO will wait until that promise got
|
||||
// resolved to continue.
|
||||
/**
|
||||
* Gets executed once before all workers get launched.
|
||||
* @param {Object} config wdio configuration object
|
||||
* @param {Array.<Object>} capabilities list of capabilities details
|
||||
*/
|
||||
// onPrepare: function (config, capabilities) {
|
||||
// },
|
||||
/**
|
||||
* Gets executed before a worker process is spawned and can be used to initialise specific service
|
||||
* for that worker as well as modify runtime environments in an async fashion.
|
||||
* @param {String} cid capability id (e.g 0-0)
|
||||
* @param {[type]} caps object containing capabilities for session that will be spawn in the worker
|
||||
* @param {[type]} specs specs to be run in the worker process
|
||||
* @param {[type]} args object that will be merged with the main configuration once worker is initialized
|
||||
* @param {[type]} execArgv list of string arguments passed to the worker process
|
||||
*/
|
||||
// onWorkerStart: function (cid, caps, specs, args, execArgv) {
|
||||
// },
|
||||
/**
|
||||
* Gets executed just after a worker process has exited.
|
||||
* @param {String} cid capability id (e.g 0-0)
|
||||
* @param {Number} exitCode 0 - success, 1 - fail
|
||||
* @param {[type]} specs specs to be run in the worker process
|
||||
* @param {Number} retries number of retries used
|
||||
*/
|
||||
// onWorkerEnd: function (cid, exitCode, specs, retries) {
|
||||
// },
|
||||
/**
|
||||
* Gets executed just before initialising the webdriver session and test framework. It allows you
|
||||
* to manipulate configurations depending on the capability or spec.
|
||||
* @param {Object} config wdio configuration object
|
||||
* @param {Array.<Object>} capabilities list of capabilities details
|
||||
* @param {Array.<String>} specs List of spec file paths that are to be run
|
||||
* @param {String} cid worker id (e.g. 0-0)
|
||||
*/
|
||||
// beforeSession: function (config, capabilities, specs, cid) {
|
||||
// },
|
||||
/**
|
||||
* Gets executed before test execution begins. At this point you can access to all global
|
||||
* variables like `browser`. It is the perfect place to define custom commands.
|
||||
* @param {Array.<Object>} capabilities list of capabilities details
|
||||
* @param {Array.<String>} specs List of spec file paths that are to be run
|
||||
* @param {Object} browser instance of created browser/device session
|
||||
*/
|
||||
// before: function (capabilities, specs) {
|
||||
// },
|
||||
/**
|
||||
* Runs before a WebdriverIO command gets executed.
|
||||
* @param {String} commandName hook command name
|
||||
* @param {Array} args arguments that command would receive
|
||||
*/
|
||||
// beforeCommand: function (commandName, args) {
|
||||
// },
|
||||
/**
|
||||
* Hook that gets executed before the suite starts
|
||||
* @param {Object} suite suite details
|
||||
*/
|
||||
beforeSuite: (_suite) =>
|
||||
__awaiter(void 0, void 0, void 0, function* () {
|
||||
yield waitUntilWindowLoaded();
|
||||
}),
|
||||
/**
|
||||
* Function to be executed before a test (in Mocha/Jasmine) starts.
|
||||
*/
|
||||
// beforeTest: function (test, context) {
|
||||
// },
|
||||
/**
|
||||
* Hook that gets executed _before_ a hook within the suite starts (e.g. runs before calling
|
||||
* beforeEach in Mocha)
|
||||
*/
|
||||
// beforeHook: function (test, context) {
|
||||
// },
|
||||
/**
|
||||
* Hook that gets executed _after_ a hook within the suite starts (e.g. runs after calling
|
||||
* afterEach in Mocha)
|
||||
*/
|
||||
// afterHook: function (test, context, { error, result, duration, passed, retries }) {
|
||||
// },
|
||||
/**
|
||||
* Function to be executed after a test (in Mocha/Jasmine only)
|
||||
* @param {Object} test test object
|
||||
* @param {Object} context scope object the test was executed with
|
||||
* @param {Error} result.error error object in case the test fails, otherwise `undefined`
|
||||
* @param {Any} result.result return object of test function
|
||||
* @param {Number} result.duration duration of test
|
||||
* @param {Boolean} result.passed true if test has passed, otherwise false
|
||||
* @param {Object} result.retries informations to spec related retries, e.g. `{ attempts: 0, limit: 0 }`
|
||||
*/
|
||||
afterTest: function (_test, _context, result) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// result = { _error, _result, _duration, passed, _retries }
|
||||
if (!result.passed) {
|
||||
yield browser.takeScreenshot();
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Hook that gets executed after the suite has ended
|
||||
* @param {Object} suite suite details
|
||||
*/
|
||||
// afterSuite: async function (_suite) {
|
||||
// },
|
||||
/**
|
||||
* Runs after a WebdriverIO command gets executed
|
||||
* @param {String} commandName hook command name
|
||||
* @param {Array} args arguments that command would receive
|
||||
* @param {Number} result 0 - command success, 1 - command error
|
||||
* @param {Object} error error object if any
|
||||
*/
|
||||
// afterCommand: function (commandName, args, result, error) {
|
||||
// },
|
||||
/**
|
||||
* Gets executed after all tests are done. You still have access to all global variables from
|
||||
* the test.
|
||||
* @param {Number} result 0 - test pass, 1 - test fail
|
||||
* @param {Array.<Object>} capabilities list of capabilities details
|
||||
* @param {Array.<String>} specs List of spec file paths that ran
|
||||
*/
|
||||
after: (_result, _capabilities, _specs) =>
|
||||
__awaiter(void 0, void 0, void 0, function* () {
|
||||
yield closeApplication();
|
||||
}),
|
||||
/**
|
||||
* Gets executed right after terminating the webdriver session.
|
||||
* @param {Object} config wdio configuration object
|
||||
* @param {Array.<Object>} capabilities list of capabilities details
|
||||
* @param {Array.<String>} specs List of spec file paths that ran
|
||||
*/
|
||||
// afterSession: function (config, capabilities, specs) {
|
||||
// },
|
||||
/**
|
||||
* Gets executed after all workers got shut down and the process is about to exit. An error
|
||||
* thrown in the onComplete hook will result in the test run failing.
|
||||
* @param {Object} exitCode 0 - success, 1 - fail
|
||||
* @param {Object} config wdio configuration object
|
||||
* @param {Array.<Object>} capabilities list of capabilities details
|
||||
* @param {<Object>} results object containing test results
|
||||
*/
|
||||
// onComplete: function(_exitCode, _config, _capabilities, _results) {
|
||||
// },
|
||||
/**
|
||||
* Gets executed when a refresh happens.
|
||||
* @param {String} oldSessionId session ID of the old session
|
||||
* @param {String} newSessionId session ID of the new session
|
||||
*/
|
||||
// onReload: function(oldSessionId, newSessionId) {
|
||||
// }
|
||||
};
|
||||
//# sourceMappingURL=webdriverio.config.js.map
|
||||
1
.dist/electron-e2e/webdriverio.config.js.map
Normal file
1
.dist/electron-e2e/webdriverio.config.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"webdriverio.config.js","sourceRoot":"","sources":["../../workspaces/electron-e2e/webdriverio.config.ts"],"names":[],"mappings":";;;;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