Skip to content

Commit

Permalink
wdio-mediawiki 2.4.0 - Remove Local Patches (#494)
Browse files Browse the repository at this point in the history
* Local Copy

* SuiteLoginPage

* Page Patch

* Screenshot

* docs: notes about publishing (#496)

* docs: add links for github and docker hub access tokens

* docs(publishing): local.env example

* docs: remove note about tagging

* chore: update build metadata for wmde.12 release (#500)

* Wikibase (#498)

* T348616: 1.39.5 (#489)

* feat: initial 1.39.5 env

* fix: workflow to pickup wmde13

* docs: change log

* docs: url

* docs: fix wikibase changelog link

* docs: add github run number

* chore: add build metadata

* chore: update example dir to wmde.13

* fix: update test from versions

* fix: add missing env files for upgrade tests

* feat(publishing): warn about missing github token (#497)

* Login Changes

* Update

* Organize

* Version Published

---------

Co-authored-by: rti <[email protected]>
  • Loading branch information
RickiJay-WMDE and rti authored Nov 17, 2023
1 parent df3804d commit 671819d
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 155 deletions.
53 changes: 0 additions & 53 deletions test/helpers/WDIOMediawikiScreenshotPatch.js

This file was deleted.

47 changes: 0 additions & 47 deletions test/helpers/pages/SuiteLoginPage.js

This file was deleted.

32 changes: 0 additions & 32 deletions test/helpers/pages/WDIOMediawikiPagePatch.js

This file was deleted.

8 changes: 4 additions & 4 deletions test/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"stylelint-config-wikimedia": "0.16.1",
"ts-node": "^10.9.1",
"typescript": "^5.2.2",
"wdio-mediawiki": "^2.3.0",
"wdio-mediawiki": "2.4.0",
"wdio-wikibase": "^6.0.1"
},
"browserslist": [
Expand Down
4 changes: 2 additions & 2 deletions test/specs/repo/extensions/babel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from 'assert';
import SuiteLoginPage from '../../../helpers/pages/SuiteLoginPage.js';
import LoginPage from 'wdio-mediawiki/LoginPage.js';
import { skipIfExtensionNotPresent } from '../../../helpers/default-functions.js';

describe( 'Babel', function () {
Expand All @@ -8,7 +8,7 @@ describe( 'Babel', function () {
} );

it( 'Should be able to update the user page with language skills', async () => {
await SuiteLoginPage.loginAdmin();
await LoginPage.login( process.env.MW_ADMIN_NAME, process.env.MW_ADMIN_PASS );

const executionContent = await browser.editPage(
process.env.MW_SERVER,
Expand Down
4 changes: 2 additions & 2 deletions test/specs/repo/extensions/nuke.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from 'assert';
import SuiteLoginPage from '../../../helpers/pages/SuiteLoginPage.js';
import LoginPage from 'wdio-mediawiki/LoginPage.js';
import { skipIfExtensionNotPresent } from '../../../helpers/default-functions.js';

describe( 'Nuke', function () {
Expand All @@ -23,7 +23,7 @@ describe( 'Nuke', function () {

assert.strictEqual( pageExistsResult.status, 200 );

await SuiteLoginPage.loginAdmin();
await LoginPage.login( process.env.MW_ADMIN_NAME, process.env.MW_ADMIN_PASS );
await browser.url( process.env.MW_SERVER + '/wiki/Special:Nuke' );

await $( 'button.oo-ui-inputWidget-input' ).click();
Expand Down
4 changes: 2 additions & 2 deletions test/specs/repo/extensions/wikibase-local-media.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from 'assert';
import SuiteLoginPage from '../../../helpers/pages/SuiteLoginPage.js';
import LoginPage from 'wdio-mediawiki/LoginPage.js';
import { skipIfExtensionNotPresent } from '../../../helpers/default-functions.js';
import WikibaseApi from 'wdio-wikibase/wikibase.api.js';

Expand All @@ -11,7 +11,7 @@ describe( 'WikibaseLocalMedia', function () {
} );

it( 'Should allow to upload an image', async () => {
await SuiteLoginPage.loginAdmin();
await LoginPage.login( process.env.MW_ADMIN_NAME, process.env.MW_ADMIN_PASS );

await browser.url( process.env.MW_SERVER + '/wiki/Special:Upload/' );

Expand Down
4 changes: 2 additions & 2 deletions test/specs/repo/queryservice.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import assert from 'assert';
import { stringify } from 'querystring';
import LoginPage from 'wdio-mediawiki/LoginPage.js';
import { getTestString } from 'wdio-mediawiki/Util.js';
import WikibaseApi from 'wdio-wikibase/wikibase.api.js';
import SuiteLoginPage from '../../helpers/pages/SuiteLoginPage.js';
import QueryServiceUI from '../../helpers/pages/queryservice-ui/queryservice-ui.page.js';

describe( 'QueryService', () => {
Expand Down Expand Up @@ -116,7 +116,7 @@ describe( 'QueryService', () => {
// TODO make an item using the UI
const itemId = await WikibaseApi.createItem( getTestString( 'T267743-' ) );

await SuiteLoginPage.loginAdmin();
await LoginPage.login( process.env.MW_ADMIN_NAME, process.env.MW_ADMIN_PASS );

// goto delete page
const query = { action: 'delete', title: 'Item:' + itemId };
Expand Down
4 changes: 2 additions & 2 deletions test/specs/repo_client/extensions/scribunto-item.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getTestString } from 'wdio-mediawiki/Util.js';
import assert from 'assert';
import SuiteLoginPage from '../../../helpers/pages/SuiteLoginPage.js';
import LoginPage from 'wdio-mediawiki/LoginPage.js';
import { stringify } from 'querystring';
import { readFile } from 'fs/promises';
import { skipIfExtensionNotPresent } from '../../../helpers/default-functions.js';
Expand Down Expand Up @@ -71,7 +71,7 @@ describe( 'Scribunto Item', function () {

// This will generate a change that will dispatch
it( 'Should be able to delete the item on repo', async () => {
await SuiteLoginPage.loginAdmin();
await LoginPage.login( process.env.MW_ADMIN_NAME, process.env.MW_ADMIN_PASS );

// goto delete page
const query = { action: 'delete', title: 'Item:' + itemId };
Expand Down
4 changes: 2 additions & 2 deletions test/specs/repo_client/item.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import assert from 'assert';
import { stringify } from 'querystring';
import LoginPage from 'wdio-mediawiki/LoginPage.js';
import { getTestString } from 'wdio-mediawiki/Util.js';
import WikibaseApi from 'wdio-wikibase/wikibase.api.js';
import SuiteLoginPage from '../../helpers/pages/SuiteLoginPage.js';
import ExternalChange from '../../helpers/types/external-change.js';

const itemLabel = getTestString( 'The Item' );
Expand Down Expand Up @@ -105,7 +105,7 @@ describe( 'Item', function () {

// This will generate a change that will dispatch
it( 'Should be able to delete the item on repo', async () => {
await SuiteLoginPage.loginAdmin();
await LoginPage.login( process.env.MW_ADMIN_NAME, process.env.MW_ADMIN_PASS );

// goto delete page
const query = { action: 'delete', title: 'Item:' + itemId };
Expand Down
12 changes: 6 additions & 6 deletions test/wdio.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* See also: http://webdriver.io/guide/testrunner/configurationfile.html
*/

import { Frameworks, Options } from '@wdio/types';
import { existsSync, mkdir, rm } from 'fs';
import JsonReporter from './helpers/json-reporter.js';
import { defaultFunctions as defaultFunctionsInit } from './helpers/default-functions.js';
import saveScreenshot from './helpers/WDIOMediawikiScreenshotPatch.js';
import { saveScreenshot } from 'wdio-mediawiki';
import WikibaseApi from 'wdio-wikibase/wikibase.api.js';
import { Options, Frameworks } from '@wdio/types';
import { defaultFunctions as defaultFunctionsInit } from './helpers/default-functions.js';
import JsonReporter from './helpers/json-reporter.js';

const resultsDir = process.env.RESULTS_DIR;
const screenshotPath = `${resultsDir}/screenshots`;
Expand Down Expand Up @@ -55,7 +55,7 @@ export const config: WebdriverIO.Config = {

// Level of verbosity: "trace", "debug", "info", "warn", "error", "silent"
logLevel:
( process.env.SELENIUM_LOG_LEVEL as Options.WebDriverLogTypes ) || 'error',
( process.env.SELENIUM_LOG_LEVEL as Options.WebDriverLogTypes ) || 'error',

// Default timeout for each waitFor* command.
waitforTimeout: 30 * 1000,
Expand Down Expand Up @@ -131,7 +131,7 @@ export const config: WebdriverIO.Config = {
const screenshotFilename = `${testFile}__${test.title}`;

try {
saveScreenshot( screenshotPath, screenshotFilename );
saveScreenshot( screenshotFilename, screenshotPath );
} catch ( error ) {
console.error( 'failed writing screenshot ...' );
console.error( error );
Expand Down

0 comments on commit 671819d

Please sign in to comment.