ci: add cypress coverage

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2023-08-20 20:03:00 +02:00 committed by Erik Michelson
parent 017d754f2a
commit 4b01ff5f67
No known key found for this signature in database
GPG key ID: DB99ADDDC5C0AF82
3 changed files with 9 additions and 3 deletions

1
frontend/.gitignore vendored
View file

@ -11,6 +11,7 @@
# testing # testing
/coverage /coverage
/.nyc_output
# downloaded files during tests with cypress # downloaded files during tests with cypress
/cypress/downloads /cypress/downloads

View file

@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
* *
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only
*/ */
@ -13,6 +13,10 @@ export default defineConfig({
e2e: { e2e: {
baseUrl: 'http://127.0.0.1:3001/', baseUrl: 'http://127.0.0.1:3001/',
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}' specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
setupNodeEvents(on, config) {
require('@cypress/code-coverage/task')(on, config)
return config
},
} }
}) })

View file

@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
* *
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only
*/ */
@ -26,3 +26,4 @@ import './logout'
import './visit' import './visit'
import './visit-test-editor' import './visit-test-editor'
import 'cypress-commands' import 'cypress-commands'
import '@cypress/code-coverage/support'