diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 650d8d485..e3cc3953f 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -84,7 +84,7 @@ jobs: name: next-build path: .next - - uses: cypress-io/github-action@v2 + - uses: cypress-io/github-action@v4 with: browser: ${{ matrix.browser }} start: 'yarn start:ci' diff --git a/cypress.config.ts b/cypress.config.ts new file mode 100644 index 000000000..02868d3cd --- /dev/null +++ b/cypress.config.ts @@ -0,0 +1,18 @@ +/* + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { defineConfig } from 'cypress' + +export default defineConfig({ + defaultCommandTimeout: 15000, + video: false, + projectId: 'ht3vbo', + + e2e: { + baseUrl: 'http://127.0.0.1:3001/', + specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}' + } +}) diff --git a/cypress.json b/cypress.json deleted file mode 100644 index 735f87e94..000000000 --- a/cypress.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "baseUrl": "http://127.0.0.1:3001/", - "defaultCommandTimeout": 15000, - "video": false, - "projectId": "ht3vbo" -} diff --git a/cypress.json.license b/cypress.json.license deleted file mode 100644 index 078e5a9ac..000000000 --- a/cypress.json.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) - -SPDX-License-Identifier: CC0-1.0 diff --git a/cypress/integration/deleteNote.spec.ts b/cypress/e2e/deleteNote.spec.ts similarity index 96% rename from cypress/integration/deleteNote.spec.ts rename to cypress/e2e/deleteNote.spec.ts index 12953a4ea..9240db8e7 100644 --- a/cypress/integration/deleteNote.spec.ts +++ b/cypress/e2e/deleteNote.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/diagrams.spec.ts b/cypress/e2e/diagrams.spec.ts similarity index 90% rename from cypress/integration/diagrams.spec.ts rename to cypress/e2e/diagrams.spec.ts index 5c898d188..a682436e3 100644 --- a/cypress/integration/diagrams.spec.ts +++ b/cypress/e2e/diagrams.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/document-read-only-page.spec.ts b/cypress/e2e/document-read-only-page.spec.ts similarity index 82% rename from cypress/integration/document-read-only-page.spec.ts rename to cypress/e2e/document-read-only-page.spec.ts index da5410752..18d83e9ba 100644 --- a/cypress/integration/document-read-only-page.spec.ts +++ b/cypress/e2e/document-read-only-page.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/documentTitle.spec.ts b/cypress/e2e/documentTitle.spec.ts similarity index 98% rename from cypress/integration/documentTitle.spec.ts rename to cypress/e2e/documentTitle.spec.ts index 65f26fe87..6edc80931 100644 --- a/cypress/integration/documentTitle.spec.ts +++ b/cypress/e2e/documentTitle.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/editorMode.spec.ts b/cypress/e2e/editorMode.spec.ts similarity index 92% rename from cypress/integration/editorMode.spec.ts rename to cypress/e2e/editorMode.spec.ts index d27937759..a1f70adb2 100644 --- a/cypress/integration/editorMode.spec.ts +++ b/cypress/e2e/editorMode.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/export.spec.ts b/cypress/e2e/export.spec.ts similarity index 95% rename from cypress/integration/export.spec.ts rename to cypress/e2e/export.spec.ts index 08787e550..1d87f0f0d 100644 --- a/cypress/integration/export.spec.ts +++ b/cypress/e2e/export.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/fileUpload.spec.ts b/cypress/e2e/fileUpload.spec.ts similarity index 100% rename from cypress/integration/fileUpload.spec.ts rename to cypress/e2e/fileUpload.spec.ts diff --git a/cypress/integration/helpDialog.spec.ts b/cypress/e2e/helpDialog.spec.ts similarity index 82% rename from cypress/integration/helpDialog.spec.ts rename to cypress/e2e/helpDialog.spec.ts index 6bb1e5683..a709ad497 100644 --- a/cypress/integration/helpDialog.spec.ts +++ b/cypress/e2e/helpDialog.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/history.spec.ts b/cypress/e2e/history.spec.ts similarity index 98% rename from cypress/integration/history.spec.ts rename to cypress/e2e/history.spec.ts index c1eb428ec..aafcdf522 100644 --- a/cypress/integration/history.spec.ts +++ b/cypress/e2e/history.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/iframe-capsule.ts b/cypress/e2e/iframe-capsule.ts similarity index 88% rename from cypress/integration/iframe-capsule.ts rename to cypress/e2e/iframe-capsule.ts index 2000352a2..45d64be6d 100644 --- a/cypress/integration/iframe-capsule.ts +++ b/cypress/e2e/iframe-capsule.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/import.spec.ts b/cypress/e2e/import.spec.ts similarity index 95% rename from cypress/integration/import.spec.ts rename to cypress/e2e/import.spec.ts index 65cd716bd..36863ea16 100644 --- a/cypress/integration/import.spec.ts +++ b/cypress/e2e/import.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/intro.spec.ts b/cypress/e2e/intro.spec.ts similarity index 96% rename from cypress/integration/intro.spec.ts rename to cypress/e2e/intro.spec.ts index a6729b51f..015a31c94 100644 --- a/cypress/integration/intro.spec.ts +++ b/cypress/e2e/intro.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/language.spec.ts b/cypress/e2e/language.spec.ts similarity index 92% rename from cypress/integration/language.spec.ts rename to cypress/e2e/language.spec.ts index 7808a2354..74c363479 100644 --- a/cypress/integration/language.spec.ts +++ b/cypress/e2e/language.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/linkEmbedder.spec.ts b/cypress/e2e/linkEmbedder.spec.ts similarity index 89% rename from cypress/integration/linkEmbedder.spec.ts rename to cypress/e2e/linkEmbedder.spec.ts index 651065a82..632c8cdea 100644 --- a/cypress/integration/linkEmbedder.spec.ts +++ b/cypress/e2e/linkEmbedder.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/linkSchemes.spec.ts b/cypress/e2e/linkSchemes.spec.ts similarity index 97% rename from cypress/integration/linkSchemes.spec.ts rename to cypress/e2e/linkSchemes.spec.ts index 348502dee..e4ccf1888 100644 --- a/cypress/integration/linkSchemes.spec.ts +++ b/cypress/e2e/linkSchemes.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/maxLength.spec.ts b/cypress/e2e/maxLength.spec.ts similarity index 94% rename from cypress/integration/maxLength.spec.ts rename to cypress/e2e/maxLength.spec.ts index 228348be7..c6680a512 100644 --- a/cypress/integration/maxLength.spec.ts +++ b/cypress/e2e/maxLength.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/motd.spec.ts b/cypress/e2e/motd.spec.ts similarity index 98% rename from cypress/integration/motd.spec.ts rename to cypress/e2e/motd.spec.ts index 06b9a187a..507429595 100644 --- a/cypress/integration/motd.spec.ts +++ b/cypress/e2e/motd.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/profile.spec.ts b/cypress/e2e/profile.spec.ts similarity index 97% rename from cypress/integration/profile.spec.ts rename to cypress/e2e/profile.spec.ts index af7d4de5a..ed869e15c 100644 --- a/cypress/integration/profile.spec.ts +++ b/cypress/e2e/profile.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/quote-extra.spec.ts b/cypress/e2e/quote-extra.spec.ts similarity index 96% rename from cypress/integration/quote-extra.spec.ts rename to cypress/e2e/quote-extra.spec.ts index 5f0ec2bf6..4f8edb50a 100644 --- a/cypress/integration/quote-extra.spec.ts +++ b/cypress/e2e/quote-extra.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/renderer-mode.spec.ts b/cypress/e2e/renderer-mode.spec.ts similarity index 92% rename from cypress/integration/renderer-mode.spec.ts rename to cypress/e2e/renderer-mode.spec.ts index 1141d5e09..af268486e 100644 --- a/cypress/integration/renderer-mode.spec.ts +++ b/cypress/e2e/renderer-mode.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/signInButton.spec.ts b/cypress/e2e/signInButton.spec.ts similarity index 97% rename from cypress/integration/signInButton.spec.ts rename to cypress/e2e/signInButton.spec.ts index 3faf7abb1..d267fc9e1 100644 --- a/cypress/integration/signInButton.spec.ts +++ b/cypress/e2e/signInButton.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/slideshow-only-page.spec.ts b/cypress/e2e/slideshow-only-page.spec.ts similarity index 81% rename from cypress/integration/slideshow-only-page.spec.ts rename to cypress/e2e/slideshow-only-page.spec.ts index 6b5987a4d..42febfe7b 100644 --- a/cypress/integration/slideshow-only-page.spec.ts +++ b/cypress/e2e/slideshow-only-page.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/taskLists.spec.ts b/cypress/e2e/taskLists.spec.ts similarity index 97% rename from cypress/integration/taskLists.spec.ts rename to cypress/e2e/taskLists.spec.ts index 00f0e36a6..07cdd1b27 100644 --- a/cypress/integration/taskLists.spec.ts +++ b/cypress/e2e/taskLists.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/word-count.spec.ts b/cypress/e2e/word-count.spec.ts similarity index 95% rename from cypress/integration/word-count.spec.ts rename to cypress/e2e/word-count.spec.ts index 2fb674da3..7323d7bcd 100644 --- a/cypress/integration/word-count.spec.ts +++ b/cypress/e2e/word-count.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/integration/yamlArrayDeprecationMessage.spec.ts b/cypress/e2e/yamlArrayDeprecationMessage.spec.ts similarity index 92% rename from cypress/integration/yamlArrayDeprecationMessage.spec.ts rename to cypress/e2e/yamlArrayDeprecationMessage.spec.ts index 0e65fcc56..3aa7f9294 100644 --- a/cypress/integration/yamlArrayDeprecationMessage.spec.ts +++ b/cypress/e2e/yamlArrayDeprecationMessage.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/support/index.ts b/cypress/support/e2e.ts similarity index 92% rename from cypress/support/index.ts rename to cypress/support/e2e.ts index cd5c942ad..2f446feba 100644 --- a/cypress/support/index.ts +++ b/cypress/support/e2e.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json index 5bf928fb9..7ae23c190 100644 --- a/cypress/tsconfig.json +++ b/cypress/tsconfig.json @@ -1,7 +1,8 @@ { + "extends": "../tsconfig.json", "compilerOptions": { + "noEmit": true, "strict": true, - "baseUrl": "../node_modules", "target": "es6", "lib": [ "es6", @@ -14,6 +15,8 @@ ] }, "include": [ - "**/*.ts" - ] + "../node_modules/cypress", + "./**/*.ts" + ], + "exclude": [] } diff --git a/package.json b/package.json index 6b364d7f1..0e02c4769 100644 --- a/package.json +++ b/package.json @@ -136,7 +136,7 @@ "@types/uuid": "8.3.4", "@typescript-eslint/eslint-plugin": "5.27.0", "@typescript-eslint/parser": "5.27.0", - "cypress": "9.7.0", + "cypress": "10.0.3", "cypress-commands": "2.0.1", "cypress-fill-command": "1.0.2", "eslint": "8.17.0", diff --git a/tsconfig.json b/tsconfig.json index 6a2a1e987..a3d7aca8d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,5 +16,5 @@ "incremental": true }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], - "exclude": ["node_modules", "cypress"] + "exclude": ["node_modules", "cypress", "cypress.config.ts"] } diff --git a/yarn.lock b/yarn.lock index 919d4b8e3..4e75c0b3b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2036,7 +2036,7 @@ __metadata: bootstrap: 4.6.1 copy-webpack-plugin: 11.0.0 cross-env: 7.0.3 - cypress: 9.7.0 + cypress: 10.0.3 cypress-commands: 2.0.1 cypress-fill-command: 1.0.2 d3-graphviz: 4.1.1 @@ -7589,9 +7589,9 @@ __metadata: languageName: node linkType: hard -"cypress@npm:9.7.0": - version: 9.7.0 - resolution: "cypress@npm:9.7.0" +"cypress@npm:10.0.3": + version: 10.0.3 + resolution: "cypress@npm:10.0.3" dependencies: "@cypress/request": ^2.88.10 "@cypress/xvfb": ^1.2.4 @@ -7637,7 +7637,7 @@ __metadata: yauzl: ^2.10.0 bin: cypress: bin/cypress - checksum: 45df7c85bc7ec2e187153ff2b98bf5106d2313d70e2367a5742b5269a9e82d3fdd730d5bbc32ac8da72aeb120a52f9384c2ba4e2fc86b532f68440f22d700fc9 + checksum: b65ed7aba0b767b760d6b3103c5d93d4ba78c195650c0ffed5af0d26454fe35455b17c452882db6826bc88245e75925c5f6c333ae962d5813a4db274ab7fd55f languageName: node linkType: hard