fix(tests): fix failing cypress tests and update cypress
* test: update cypress and migrate configs * test: fix codeBlockLowlight test * test: bump cypress actions
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -89,7 +89,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run tests with Cypress
|
- name: Run tests with Cypress
|
||||||
id: cypress
|
id: cypress
|
||||||
uses: cypress-io/github-action@v2
|
uses: cypress-io/github-action@v4.2.0
|
||||||
with:
|
with:
|
||||||
cache-key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
|
cache-key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
start: npm run start
|
start: npm run start
|
||||||
|
|||||||
26
package-lock.json
generated
26
package-lock.json
generated
@@ -26,7 +26,7 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
||||||
"@typescript-eslint/parser": "^5.10.2",
|
"@typescript-eslint/parser": "^5.10.2",
|
||||||
"babel-loader": "^8.2.3",
|
"babel-loader": "^8.2.3",
|
||||||
"cypress": "^9.4.1",
|
"cypress": "^10.8.0",
|
||||||
"eslint": "^8.17.0",
|
"eslint": "^8.17.0",
|
||||||
"eslint-config-airbnb-base": "^15.0.0",
|
"eslint-config-airbnb-base": "^15.0.0",
|
||||||
"eslint-plugin-cypress": "^2.12.1",
|
"eslint-plugin-cypress": "^2.12.1",
|
||||||
@@ -8917,10 +8917,11 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/cypress": {
|
"node_modules/cypress": {
|
||||||
"version": "9.7.0",
|
"version": "10.8.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/cypress/-/cypress-10.8.0.tgz",
|
||||||
|
"integrity": "sha512-QVse0dnLm018hgti2enKMVZR9qbIO488YGX06nH5j3Dg1isL38DwrBtyrax02CANU6y8F4EJUuyW6HJKw1jsFA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cypress/request": "^2.88.10",
|
"@cypress/request": "^2.88.10",
|
||||||
"@cypress/xvfb": "^1.2.4",
|
"@cypress/xvfb": "^1.2.4",
|
||||||
@@ -8941,7 +8942,7 @@
|
|||||||
"dayjs": "^1.10.4",
|
"dayjs": "^1.10.4",
|
||||||
"debug": "^4.3.2",
|
"debug": "^4.3.2",
|
||||||
"enquirer": "^2.3.6",
|
"enquirer": "^2.3.6",
|
||||||
"eventemitter2": "^6.4.3",
|
"eventemitter2": "6.4.7",
|
||||||
"execa": "4.1.0",
|
"execa": "4.1.0",
|
||||||
"executable": "^4.1.1",
|
"executable": "^4.1.1",
|
||||||
"extract-zip": "2.0.1",
|
"extract-zip": "2.0.1",
|
||||||
@@ -10498,9 +10499,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eventemitter2": {
|
"node_modules/eventemitter2": {
|
||||||
"version": "6.4.5",
|
"version": "6.4.7",
|
||||||
"dev": true,
|
"resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz",
|
||||||
"license": "MIT"
|
"integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/eventemitter3": {
|
"node_modules/eventemitter3": {
|
||||||
"version": "4.0.7",
|
"version": "4.0.7",
|
||||||
@@ -26308,7 +26310,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"cypress": {
|
"cypress": {
|
||||||
"version": "9.7.0",
|
"version": "10.8.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/cypress/-/cypress-10.8.0.tgz",
|
||||||
|
"integrity": "sha512-QVse0dnLm018hgti2enKMVZR9qbIO488YGX06nH5j3Dg1isL38DwrBtyrax02CANU6y8F4EJUuyW6HJKw1jsFA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@cypress/request": "^2.88.10",
|
"@cypress/request": "^2.88.10",
|
||||||
@@ -26330,7 +26334,7 @@
|
|||||||
"dayjs": "^1.10.4",
|
"dayjs": "^1.10.4",
|
||||||
"debug": "^4.3.2",
|
"debug": "^4.3.2",
|
||||||
"enquirer": "^2.3.6",
|
"enquirer": "^2.3.6",
|
||||||
"eventemitter2": "^6.4.3",
|
"eventemitter2": "6.4.7",
|
||||||
"execa": "4.1.0",
|
"execa": "4.1.0",
|
||||||
"executable": "^4.1.1",
|
"executable": "^4.1.1",
|
||||||
"extract-zip": "2.0.1",
|
"extract-zip": "2.0.1",
|
||||||
@@ -27351,7 +27355,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"eventemitter2": {
|
"eventemitter2": {
|
||||||
"version": "6.4.5",
|
"version": "6.4.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz",
|
||||||
|
"integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"eventemitter3": {
|
"eventemitter3": {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
||||||
"@typescript-eslint/parser": "^5.10.2",
|
"@typescript-eslint/parser": "^5.10.2",
|
||||||
"babel-loader": "^8.2.3",
|
"babel-loader": "^8.2.3",
|
||||||
"cypress": "^9.4.1",
|
"cypress": "^10.8.0",
|
||||||
"eslint": "^8.17.0",
|
"eslint": "^8.17.0",
|
||||||
"eslint-config-airbnb-base": "^15.0.0",
|
"eslint-config-airbnb-base": "^15.0.0",
|
||||||
"eslint-plugin-cypress": "^2.12.1",
|
"eslint-plugin-cypress": "^2.12.1",
|
||||||
|
|||||||
12
tests/cypress.config.js
Normal file
12
tests/cypress.config.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
const { defineConfig } = require('cypress')
|
||||||
|
|
||||||
|
module.exports = defineConfig({
|
||||||
|
defaultCommandTimeout: 15000,
|
||||||
|
e2e: {
|
||||||
|
setupNodeEvents(on, config) {
|
||||||
|
return require('./cypress/plugins/index.js')(on, config)
|
||||||
|
},
|
||||||
|
baseUrl: 'http://localhost:3000',
|
||||||
|
specPattern: '../{demos,tests}/**/*.spec.{js,ts}',
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"baseUrl": "http://localhost:3000",
|
|
||||||
"integrationFolder": "../",
|
|
||||||
"testFiles": "{demos,tests}/**/*.spec.{js,ts}",
|
|
||||||
"defaultCommandTimeout": 15000
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@ import { CodeBlockLowlight } from '@tiptap/extension-code-block-lowlight'
|
|||||||
import { Document } from '@tiptap/extension-document'
|
import { Document } from '@tiptap/extension-document'
|
||||||
import { Paragraph } from '@tiptap/extension-paragraph'
|
import { Paragraph } from '@tiptap/extension-paragraph'
|
||||||
import { Text } from '@tiptap/extension-text'
|
import { Text } from '@tiptap/extension-text'
|
||||||
import * as lowlight from 'lowlight'
|
import { lowlight } from 'lowlight'
|
||||||
|
|
||||||
describe('code block highlight', () => {
|
describe('code block highlight', () => {
|
||||||
let Frontmatter
|
let Frontmatter
|
||||||
|
|||||||
Reference in New Issue
Block a user