build: Update wdio devDependencies

Change-Id: I2d51563517f88ffa50ddf76d1716d13024f21381
This commit is contained in:
Ed Sanders 2021-11-09 14:40:14 +00:00
parent 0a9598ec97
commit ef742a0d6a
6 changed files with 28226 additions and 4246 deletions

View file

@ -2,7 +2,7 @@
"extends": "stylelint-config-wikimedia",
"rules": {
"declaration-no-important": null,
"property-blacklist": "transition",
"property-disallowed-list": "transition",
"selector-list-comma-newline-after": null,
"value-keyword-case": null,
"declaration-property-unit-disallowed-list": null

32394
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -20,13 +20,13 @@
"devDependencies": {
"@babel/core": "7.7.7",
"@storybook/html": "5.2.8",
"@wdio/cli": "7.5.1",
"@wdio/cucumber-framework": "6.1.22",
"@wdio/dot-reporter": "7.6.0",
"@wdio/junit-reporter": "7.5.2",
"@wdio/local-runner": "7.5.1",
"@wdio/mocha-framework": "7.4.6",
"@wdio/sync": "7.5.1",
"@wdio/cli": "7.16.4",
"@wdio/cucumber-framework": "7.16.4",
"@wdio/dot-reporter": "7.16.4",
"@wdio/junit-reporter": "7.16.4",
"@wdio/local-runner": "7.16.4",
"@wdio/mocha-framework": "7.16.4",
"@wdio/sync": "7.16.4",
"babel-loader": "8.0.6",
"bundlesize": "0.18.1",
"eslint-config-wikimedia": "0.20.0",
@ -40,6 +40,6 @@
"stylelint-config-wikimedia": "0.11.1",
"svgo": "2.3.1",
"wdio-mediawiki": "1.1.1",
"webdriverio": "7.5.1"
"webdriverio": "7.16.4"
}
}

View file

@ -106,11 +106,11 @@
} );
QUnit.test( 'isAvailable() handles properly correct namespace', function ( assert ) {
assert.ok( this.isAvailable( VALID_UA ) );
assert.true( this.isAvailable( VALID_UA ) );
} );
QUnit.test( 'isAvailable() handles properly not supported namespace', function ( assert ) {
assert.notOk( isAvailable( windowChrome, this.page, VALID_UA, [ 9999 ] ) );
assert.false( isAvailable( windowChrome, this.page, VALID_UA, [ 9999 ] ) );
} );
QUnit.test( 'isAvailable() handles missing pages', function ( assert ) {
@ -119,7 +119,7 @@
title: 'Missing',
isMissing: true
} );
assert.notOk( isAvailable( windowChrome, page, VALID_UA, VALID_SUPPORTED_NAMESPACES ) );
assert.false( isAvailable( windowChrome, page, VALID_UA, VALID_SUPPORTED_NAMESPACES ) );
} );
QUnit.test( 'isAvailable() handles properly main page', function ( assert ) {
@ -129,63 +129,63 @@
isMissing: false,
isMainPage: true
} );
assert.notOk( isAvailable( windowChrome, page, VALID_UA, VALID_SUPPORTED_NAMESPACES ) );
assert.false( isAvailable( windowChrome, page, VALID_UA, VALID_SUPPORTED_NAMESPACES ) );
} );
QUnit.test( 'isAvailable() returns false for iOS', function ( assert ) {
this.sandbox.stub( browser, 'isIos' ).returns( true );
assert.notOk( this.isAvailable( VALID_UA ) );
assert.false( this.isAvailable( VALID_UA ) );
} );
QUnit.test( 'isAvailable() uses window.chrome to filter certain chrome-like browsers', function ( assert ) {
// Dolphin
assert.notOk( this.notChromeIsAvailable( ' Mozilla/5.0 (Linux; Android 7.0; SM-G950U1 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36' ) );
assert.false( this.notChromeIsAvailable( ' Mozilla/5.0 (Linux; Android 7.0; SM-G950U1 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36' ) );
// Opera
assert.notOk( this.notChromeIsAvailable( 'Mozilla/5.0 (Linux; Android 7.0; SM-G950U1 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.116 Mobile Safari/537.36 OPR/44.1.2246.123029' ) );
assert.false( this.notChromeIsAvailable( 'Mozilla/5.0 (Linux; Android 7.0; SM-G950U1 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.116 Mobile Safari/537.36 OPR/44.1.2246.123029' ) );
// Maxthon
assert.notOk( this.notChromeIsAvailable( 'Mozilla/5.0 (Linux; Android 7.0; SM-G950U1 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.111 Mobile Safari/537.36 MxBrowser/4.5.10.1300' ) );
assert.false( this.notChromeIsAvailable( 'Mozilla/5.0 (Linux; Android 7.0; SM-G950U1 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.111 Mobile Safari/537.36 MxBrowser/4.5.10.1300' ) );
} );
QUnit.test( 'isAvailable() handles properly browsers', function ( assert ) {
// IPhone 6 Safari
assert.notOk( this.isAvailable( 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_0_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13A405 Safari/601.1' ) );
assert.false( this.isAvailable( 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_0_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13A405 Safari/601.1' ) );
// Nokia Lumia 930 Windows Phone 8.1
assert.notOk( this.isAvailable( 'Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; Microsoft; Virtual) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537' ) );
assert.false( this.isAvailable( 'Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; Microsoft; Virtual) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537' ) );
// Firefox @ Ubuntu
assert.notOk( this.isAvailable( 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0' ) );
assert.false( this.isAvailable( 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0' ) );
} );
QUnit.test( 'isAvailable() handles properly non-chrome browsers', function ( assert ) {
// IPhone 6 Safari
assert.notOk( this.notChromeIsAvailable( 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_0_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13A405 Safari/601.1' ) );
assert.false( this.notChromeIsAvailable( 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_0_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13A405 Safari/601.1' ) );
// Nokia Lumia 930 Windows Phone 8.1
assert.notOk( this.notChromeIsAvailable( 'Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; Microsoft; Virtual) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537' ) );
assert.false( this.notChromeIsAvailable( 'Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; Microsoft; Virtual) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537' ) );
// Firefox @ Ubuntu
assert.notOk( this.notChromeIsAvailable( 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0' ) );
assert.false( this.notChromeIsAvailable( 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0' ) );
} );
QUnit.test( 'isAvailable() handles properly old devices', function ( assert ) {
// Samsung Galaxy S5, Android 4.4, Chrome 28
assert.notOk( this.isAvailable( 'Mozilla/5.0 (Linux; Android 4.4.2; en-us; SAMSUNG SM-G900F Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.6 Chrome/28.0.1500.94 Mobile Safari/537.36' ) );
assert.false( this.isAvailable( 'Mozilla/5.0 (Linux; Android 4.4.2; en-us; SAMSUNG SM-G900F Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.6 Chrome/28.0.1500.94 Mobile Safari/537.36' ) );
// Samsung Galaxyu S1, Android 4.2.2 Cyanogenmod + built in Samsung Browser
assert.notOk( this.isAvailable( 'Mozilla/5.0 (Linux; U; Android 4.2.2; en-ca; GT-I9000 Build/JDQ39E) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 CyanogenMod/10.1.0/galaxysmtd' ) );
assert.false( this.isAvailable( 'Mozilla/5.0 (Linux; U; Android 4.2.2; en-ca; GT-I9000 Build/JDQ39E) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 CyanogenMod/10.1.0/galaxysmtd' ) );
// Samsung Galaxy S3
assert.notOk( this.isAvailable( 'Mozilla/5.0 (Linux; Android 4.3; GT-I9300 Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36' ) );
assert.false( this.isAvailable( 'Mozilla/5.0 (Linux; Android 4.3; GT-I9300 Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36' ) );
} );
QUnit.test( 'isAvailable() handles properly supported browsers', function ( assert ) {
// Samsung Galaxy S7, Android 6, Chrome 44
assert.ok( this.isAvailable( 'Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG SM-G930F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36' ) );
assert.true( this.isAvailable( 'Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG SM-G930F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36' ) );
// Samsung Galaxy A5, Android 7, Samsung Browser 5.2
assert.ok( this.isAvailable( 'Mozilla/5.0 (Linux; Android 7.0; SAMSUNG SM-A510F Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/5.2 Chrome/51.0.2704.106 Mobile Safari/537.36' ) );
assert.true( this.isAvailable( 'Mozilla/5.0 (Linux; Android 7.0; SAMSUNG SM-A510F Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/5.2 Chrome/51.0.2704.106 Mobile Safari/537.36' ) );
// Galaxy J2, Android 5, Chrome 65
assert.ok( this.isAvailable( 'Mozilla/5.0 (Linux; Android 5.1.1; SM-J200G Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3320.0 Mobile Safari/537.36' ) );
assert.true( this.isAvailable( 'Mozilla/5.0 (Linux; Android 5.1.1; SM-J200G Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3320.0 Mobile Safari/537.36' ) );
// Desktop, Chrome 63
assert.ok( this.isAvailable( 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36' ) );
assert.true( this.isAvailable( 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36' ) );
// Desktop, Ubuntu, Chromium 61
assert.ok( this.isAvailable( 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/61.0.3163.100 Chrome/61.0.3163.100 Safari/537.36' ) );
assert.true( this.isAvailable( 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/61.0.3163.100 Chrome/61.0.3163.100 Safari/537.36' ) );
// Galaxy S8, Android 8, Samsung Browser 6.2
assert.ok( this.isAvailable( 'Mozilla/5.0 (Linux; Android 7.0; SAMSUNG SM-G950U1 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/6.2 Chrome/56.0.2924.87 Mobile Safari/537.36' ) );
assert.true( this.isAvailable( 'Mozilla/5.0 (Linux; Android 7.0; SAMSUNG SM-G950U1 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/6.2 Chrome/56.0.2924.87 Mobile Safari/537.36' ) );
} );
}( mw.mobileFrontend ) );

View file

@ -1,6 +1,6 @@
'use strict';
const { defineSupportCode } = require( 'cucumber' ),
const { defineSupportCode } = require( '@cucumber/cucumber' ),
{ iAmInAWikiThatHasCategories,
iAmOnAPageThatHasTheFollowingEdits,
iAmOnATalkPageWithNoTalkTopics,

View file

@ -9,7 +9,7 @@
'use strict';
const { After, Before } = require( 'cucumber' );
const { After, Before } = require( '@cucumber/cucumber' );
Before( function () {
// This hook will be executed before ALL scenarios