Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
philipwalton committed Dec 27, 2023
1 parent e07c7a7 commit cefea72
Show file tree
Hide file tree
Showing 7 changed files with 8,149 additions and 4,383 deletions.
12,345 changes: 8,030 additions & 4,315 deletions package-lock.json

Large diffs are not rendered by default.

41 changes: 20 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,31 +152,30 @@
"singleQuote": true
},
"devDependencies": {
"@babel/core": "^7.21.0",
"@babel/preset-env": "^7.20.2",
"@rollup/plugin-replace": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^5.54.1",
"@wdio/cli": "^7.30.2",
"@wdio/local-runner": "^7.30.2",
"@wdio/mocha-framework": "^7.30.2",
"@wdio/selenium-standalone-service": "^7.32.4",
"@wdio/spec-reporter": "^7.30.2",
"@babel/core": "^7.23.6",
"@babel/preset-env": "^7.23.6",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"@wdio/cli": "^8.27.0",
"@wdio/local-runner": "^8.27.0",
"@wdio/mocha-framework": "^8.27.0",
"@wdio/spec-reporter": "^8.27.0",
"body-parser": "^1.20.2",
"chromedriver": "^119.0.1",
"eslint": "^8.35.0",
"chromedriver": "^120.0.1",
"eslint": "^8.56.0",
"express": "^4.18.2",
"fs-extra": "^10.1.0",
"fs-extra": "^11.2.0",
"husky": "^8.0.3",
"lint-staged": "^13.1.2",
"lint-staged": "^15.2.0",
"npm-run-all": "^4.1.5",
"nunjucks": "^3.2.3",
"prettier": "^2.8.4",
"rollup": "^2.79.1",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-terser": "^7.0.2",
"selenium-standalone": "^8.3.0",
"typescript": "^4.9.5",
"nunjucks": "^3.2.4",
"prettier": "^3.1.1",
"rollup": "^4.9.1",
"selenium-standalone": "^9.3.1",
"typescript": "^5.3.3",
"wdio-chromedriver-service": "^8.1.1"
},
"lint-staged": {
Expand Down
5 changes: 3 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
limitations under the License.
*/

import babel from '@rollup/plugin-babel';
import replace from '@rollup/plugin-replace';
import {terser} from 'rollup-plugin-terser';
import babel from 'rollup-plugin-babel';
import terser from '@rollup/plugin-terser';

const configurePlugins = ({module, polyfill = false}) => {
return [
babel({
babelHelpers: 'bundled',
presets: [
[
'@babel/preset-env',
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/onFID-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('onFID()', async function () {
assert.match(fid.entries[0].name, /(mouse|pointer)down/);
});

it('reports the correct value after input', async function () {
it('reports the correct value after input when script is loaded late', async function () {
if (!browserSupportsFID) this.skip();

await browser.url('/test/fid?loadAfterInput=1');
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/onINP-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe('onINP()', async function () {
assert.match(inp.navigationType, /navigate|reload/);
});

it('reports the correct value when loaded late (reportAllChanges === false)', async function () {
it('reports the correct value when script is loaded late (reportAllChanges === false)', async function () {
if (!browserSupportsINP) this.skip();

await browser.url('/test/inp?click=100&loadAfterInput=1');
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"composite": true,
"declaration": true,
"lib": ["es2017", "DOM"],
"module": "esnext",
"module": "nodenext",
"moduleResolution": "nodenext",
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
Expand Down
135 changes: 93 additions & 42 deletions wdio.conf.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,28 @@ module.exports.config = {
// ====================
// Runner Configuration
// ====================
//
// WebdriverIO allows it to run your tests in arbitrary locations (e.g. locally or
// on a remote machine).
// WebdriverIO supports running e2e tests as well as unit and component tests.
runner: 'local',
//
// Override default path ('/wd/hub') for chromedriver service.
// path: '/',
path: '/wd/hub',
//
// ==================
// Specify Test Files
// ==================
// Define which test specs should run. The pattern is relative to the directory
// from which `wdio` was called. Notice that, 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.
// of the configuration file being run.
//
// 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.
//
specs: ['test/e2e/*-test.js'],
// 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: [
// 'test/e2e/*-test.js'
'test/e2e/onFCP-test.js',
],
// Patterns to exclude.
exclude: [
// 'path/to/excluded/files'
Expand All @@ -60,7 +64,7 @@ module.exports.config = {
//
// If you have trouble getting all important capabilities together, check out the
// Sauce Labs platform configurator - a great tool to configure your capabilities:
// https://docs.saucelabs.com/reference/platforms-configurator
// https://saucelabs.com/platform/platform-configurator
//
capabilities: [
{
Expand Down Expand Up @@ -104,15 +108,15 @@ module.exports.config = {
// Set specific log levels per logger
// loggers:
// - webdriver, webdriverio
// - @wdio/applitools-service, @wdio/browserstack-service, @wdio/devtools-service, @wdio/sauce-service
// - @wdio/browserstack-service, @wdio/devtools-service, @wdio/sauce-service
// - @wdio/mocha-framework, @wdio/jasmine-framework
// - @wdio/local-runner, @wdio/lambda-runner
// - @wdio/local-runner
// - @wdio/sumologic-reporter
// - @wdio/cli, @wdio/config, @wdio/sync, @wdio/utils
// - @wdio/cli, @wdio/config, @wdio/utils
// Level of logging verbosity: trace | debug | info | warn | error | silent
// logLevels: {
// webdriver: 'info',
// '@wdio/applitools-service': 'info'
// '@wdio/appium-service': 'info'
// },
//
// If you only want to run your tests until a specific amount of tests have failed use
Expand All @@ -130,7 +134,7 @@ module.exports.config = {
//
// Default timeout in milliseconds for request
// if browser driver or grid doesn't send response
connectionRetryTimeout: 90000,
connectionRetryTimeout: 120000,
//
// Default request retries count
connectionRetryCount: 3,
Expand All @@ -139,33 +143,38 @@ module.exports.config = {
// 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: ['selenium-standalone'],
// NOTE(philipwalton): use `chromedriver` for faster chrome-only testing.
// services: ['chromedriver'],
// services: [],
//
// Framework you want to run your specs with.
// The following are supported: Mocha, Jasmine, and Cucumber
// see also: https://webdriver.io/docs/frameworks.html
// 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: 'mocha',

//
// 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 spec files 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.html
// see also: https://webdriver.io/docs/dot-reporter
reporters: ['spec'],

//
// Options to be passed to Mocha.
// See the full list at http://mochajs.org/
mochaOpts: {
ui: 'bdd',
timeout: 60000,
},

//
// =====
// Hooks
Expand All @@ -176,38 +185,60 @@ module.exports.config = {
// resolved to continue.
/**
* Gets executed once before all workers get launched.
* @param {Object} config wdio configuration object
* @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 initialize 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 {object} caps object containing capabilities for session that will be spawn in the worker
* @param {object} specs specs to be run in the worker process
* @param {object} args object that will be merged with the main configuration once worker is initialized
* @param {object} 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 {object} 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 {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) {
// 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 {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 {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
* @param {object} suite suite details
*/
// beforeSuite: function (suite) {
// },
Expand All @@ -220,46 +251,54 @@ module.exports.config = {
* Hook that gets executed _before_ a hook within the suite starts (e.g. runs before calling
* beforeEach in Mocha)
*/
// beforeHook: function (test, context) {
// beforeHook: function (test, context, hookName) {
// },
/**
* 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 }) {
// afterHook: function (test, context, { error, result, duration, passed, retries }, hookName) {
// },
/**
* Function to be executed after a test (in Mocha/Jasmine).
* 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 {*} 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 information about spec related retries, e.g. `{ attempts: 0, limit: 0 }`
*/
// afterTest: function(test, context, { error, result, duration, passed, retries }) {
// },

/**
* Hook that gets executed after the suite has ended
* @param {Object} suite suite details
* @param {object} suite suite details
*/
// afterSuite: function (suite) {
// },
/**
* Runs after a WebdriverIO command gets executed
* @param {String} commandName hook command name
* @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
* @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 {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: function (result, capabilities, specs) {
// },
/**
* Gets executed right after terminating the webdriver session.
* @param {Object} config wdio configuration object
* @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
*/
Expand All @@ -268,18 +307,30 @@ module.exports.config = {
/**
* 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 {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
* @param {string} oldSessionId session ID of the old session
* @param {string} newSessionId session ID of the new session
*/
// onReload: function(oldSessionId, newSessionId) {
// }
/**
* Hook that gets executed before a WebdriverIO assertion happens.
* @param {object} params information about the assertion to be executed
*/
// beforeAssertion: function(params) {
// }
/**
* Hook that gets executed after a WebdriverIO assertion happened.
* @param {object} params information about the assertion that was executed, including its results
*/
// afterAssertion: function(params) {
// }
};

0 comments on commit cefea72

Please sign in to comment.