Skip to content

Commit

Permalink
test(Playwright): Adapt to Jest Update
Browse files Browse the repository at this point in the history
Tried to update Jest Playwright to Jest 28 but failed
due to playwright-community/jest-playwright#796.

Instead of updating to Jest 28, rolled back to Jest 27
for Playwright tests for now.

Commit also contains an update to Jest 28.1.0, which
was one of the trials to possibly get rid of the issue.
  • Loading branch information
mmichaelis committed May 16, 2022
1 parent a2664ea commit 53c072a
Show file tree
Hide file tree
Showing 16 changed files with 1,353 additions and 417 deletions.
2 changes: 1 addition & 1 deletion itest/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const sharedBabelConf = require('../shared-babel.config');
const sharedBabelConf = require('@coremedia-internal/ckeditor5-babel-config');

module.exports = sharedBabelConf;
22 changes: 5 additions & 17 deletions itest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coremedia/ckeditor5-coremedia-itest",
"version": "5.0.0",
"version": "5.0.1-rc.0",
"description": "Integration Tests for CKEditor 5",
"keywords": [
"coremedia"
Expand All @@ -16,40 +16,28 @@
"devDependencies": {
"@babel/cli": "^7.16.0",
"@babel/core": "^7.16.0",
"@babel/plugin-proposal-class-properties": "^7.16.0",
"@babel/plugin-proposal-object-rest-spread": "^7.16.0",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-arrow-functions": "^7.16.0",
"@babel/plugin-transform-computed-properties": "^7.16.0",
"@babel/plugin-transform-for-of": "^7.16.0",
"@babel/plugin-transform-parameters": "^7.16.3",
"@babel/plugin-transform-shorthand-properties": "^7.16.0",
"@babel/plugin-transform-typescript": "^7.16.1",
"@babel/preset-env": "^7.16.0",
"@babel/preset-typescript": "^7.16.0",
"@ckeditor/ckeditor5-core": "^32.0.0",
"@coremedia/types-ckeditor__ckeditor5-core": "^5.0.0",
"@coremedia/types-ckeditor__ckeditor5-core": "^5.0.1-rc.0",
"@coremedia-internal/ckeditor5-babel-config": "^1.0.0",
"@coremedia-internal/ckeditor5-jest-test-helpers": "^1.0.0",
"@types/express": "^4.17.13",
"@types/jest": "^27.0.2",
"@types/node": "^16.11.26",
"@typescript-eslint/eslint-plugin": "^5.9.1",
"@typescript-eslint/parser": "^5.9.1",
"babel-jest": "^27.3.1",
"eslint": "^8.6.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-tsdoc": "^0.2.14",
"expect-playwright": "^0.8.0",
"express": "^4.18.1",
"get-port": "^6.1.2",
"jest": "^27.3.1",
"jest": "^27.5.1",
"jest-circus": "^27.5.1",
"jest-config": "^27.3.1",
"jest-config": "^27.5.1",
"jest-environment-node": "^27.5.1",
"jest-playwright-preset": "^1.7.0",
"jest-runner": "^27.5.1",
"jest-transform-stub": "^2.0.0",
"playwright": "^1.22.0",
"playwright-core": "^1.22.0",
"prettier": "^2.4.1",
Expand Down
18 changes: 14 additions & 4 deletions itest/src/aut/ApplicationConsole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,24 @@ expect.extend({
});

/**
* JEST Extension: Declare extension for TypeScript.
* Extension to matchers for Application Console.
*/
export interface ApplicationConsoleMatchers<R = unknown> {
toHaveNoErrorsOrWarnings(): R;
}

/**
* Tell TypeScript to know of new matchers.
*/
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace jest {
interface Matchers<R> {
toHaveNoErrorsOrWarnings(): CustomMatcherResult;
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface Expect extends ApplicationConsoleMatchers {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface Matchers<R> extends ApplicationConsoleMatchers<R> {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface InverseAsymmetricMatchers extends ApplicationConsoleMatchers {}
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/ckeditor5-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-tsdoc": "^0.2.14",
"jest": "^28.0.2",
"jest-config": "^27.3.1",
"jest": "^28.1.0",
"jest-config": "^28.1.0",
"prettier": "^2.4.1",
"rimraf": "^3.0.2",
"typescript": "^4.4.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-tsdoc": "^0.2.14",
"jest": "^28.0.2",
"jest": "^28.1.0",
"jest-each": "^28.0.2",
"jest-xml-matcher": "^1.2.0",
"prettier": "^2.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-coremedia-images/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"eslint": "^8.2.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^28.0.2",
"jest": "^28.1.0",
"jest-each": "^28.0.2",
"jest-xml-matcher": "^1.2.0",
"prettier": "^2.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-coremedia-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-tsdoc": "^0.2.14",
"jest": "^28.0.2",
"jest": "^28.1.0",
"jest-each": "^28.0.2",
"jest-xml-matcher": "^1.2.0",
"prettier": "^2.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-coremedia-richtext-support/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-tsdoc": "^0.2.14",
"jest": "^28.0.2",
"jest": "^28.1.0",
"jest-each": "^28.0.2",
"jest-xml-matcher": "^1.2.0",
"prettier": "^2.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-coremedia-richtext/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-tsdoc": "^0.2.14",
"jest": "^28.0.2",
"jest": "^28.1.0",
"jest-each": "^28.0.2",
"jest-xml-matcher": "^1.2.0",
"prettier": "^2.4.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-tsdoc": "^0.2.14",
"jest": "^28.0.2",
"jest": "^28.1.0",
"jest-each": "^28.0.2",
"jest-xml-matcher": "^1.2.0",
"prettier": "^2.4.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-tsdoc": "^0.2.14",
"jest": "^28.0.2",
"jest": "^28.1.0",
"jest-each": "^28.0.2",
"jest-xml-matcher": "^1.2.0",
"prettier": "^2.4.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-tsdoc": "^0.2.14",
"jest": "^28.0.2",
"jest": "^28.1.0",
"jest-each": "^28.0.2",
"jest-xml-matcher": "^1.2.0",
"prettier": "^2.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-dataprocessor-support/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-tsdoc": "^0.2.14",
"jest": "^28.0.2",
"jest": "^28.1.0",
"jest-each": "^28.0.2",
"jest-xml-matcher": "^1.2.0",
"prettier": "^2.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-logging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-tsdoc": "^0.2.14",
"jest": "^28.0.2",
"jest": "^28.1.0",
"prettier": "^2.4.1",
"rimraf": "^3.0.2",
"typescript": "^4.4.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-symbol-on-paste-mapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-tsdoc": "^0.2.14",
"jest": "^28.0.2",
"jest": "^28.1.0",
"prettier": "^2.4.1",
"rimraf": "^3.0.2",
"typescript": "^4.4.4",
Expand Down
Loading

0 comments on commit 53c072a

Please sign in to comment.