-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(ui): add cypress tests to github actions #2285
Closed
Closed
Changes from all commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
be35e1f
test: first commit to add cypress tests to github actions
TheoPascoli b8ca923
test: first commit to add cypress tests to github actions
TheoPascoli 5a3d727
test: first commit to add cypress tests to github actions
TheoPascoli 619f532
test: first commit to add cypress tests to github actions
TheoPascoli 7173b74
test: first commit to add cypress tests to github actions
TheoPascoli 4ad2c94
test: first commit to add cypress tests to github actions
TheoPascoli 3066c2d
test: first commit to add cypress tests to github actions
TheoPascoli 0d01a7e
test: first commit to add cypress tests to github actions
TheoPascoli 22327e6
test: first commit to add cypress tests to github actions
TheoPascoli 7438c87
test: first commit to add cypress tests to github actions
TheoPascoli a711dbb
Merge branch 'test/setup-cypress' of https://github.com/AntaresSimula…
TheoPascoli b0bfeee
test: first commit to add cypress tests to github actions
TheoPascoli 5e02359
test: first commit to add cypress tests to github actions
TheoPascoli e015945
test: first commit to add cypress tests to github actions
TheoPascoli ee07ed4
test: first commit to add cypress tests to github actions
TheoPascoli 06503d7
test: first commit to add cypress tests to github actions
TheoPascoli a9fa20a
test: first commit to add cypress tests to github actions
TheoPascoli ace09c0
test: first commit to add cypress tests to github actions
TheoPascoli 30dfa81
test: first commit to add cypress tests to github actions
TheoPascoli ad93e6f
test: first commit to add cypress tests to github actions
TheoPascoli 6af45b8
test: first commit to add cypress tests to github actions
TheoPascoli 600f7a1
test: first commit to add cypress tests to github actions
TheoPascoli 748ab69
test: first commit to add cypress tests to github actions
TheoPascoli d4badfb
test: first commit to add cypress tests to github actions
TheoPascoli d29f907
Merge branch 'test/setup-cypress' of https://github.com/AntaresSimula…
TheoPascoli 8e8eeba
test: first commit to add cypress tests to github actions
TheoPascoli e2ec24a
test: first commit to add cypress tests to github actions
TheoPascoli 934fca8
Merge remote-tracking branch 'origin/test/setup-cypress' into test/se…
TheoPascoli 763320e
Merge branch 'dev' into test/setup-cypress
TheoPascoli 1688e66
Merge branch 'dev' into test/setup-cypress
TheoPascoli 57a8606
test: first commit to add cypress tests to github actions
TheoPascoli 9876c9d
Merge branch 'dev' into test/setup-cypress
TheoPascoli f382a0e
Merge branch 'dev' into test/setup-cypress
TheoPascoli 444a568
Merge branch 'dev' into test/setup-cypress
TheoPascoli 17e184b
Merge branch 'dev' into test/setup-cypress
TheoPascoli e724f86
Merge branch 'dev' into test/setup-cypress
TheoPascoli 3cfb912
feat: move cypress inside webapp folder
TheoPascoli 14f5cd0
Merge remote-tracking branch 'origin/dev' into test/setup-cypress
TheoPascoli dbc94f5
feat: move cypress inside webapp folder
TheoPascoli 1595193
feat: move cypress inside webapp folder
TheoPascoli 77ac271
feat: move cypress inside webapp folder
TheoPascoli 9e0427f
feat: lint fix
TheoPascoli fa4bdf2
feat: lint fix
TheoPascoli c020055
feat: lint fix
TheoPascoli 59c564c
feat: lint fix
TheoPascoli a571a12
feat: lint fix
TheoPascoli a5a1c60
feat: lint fix
TheoPascoli 157e008
feat: lint fix
TheoPascoli 512e04c
feat: lint fix
TheoPascoli 00839b0
feat: lint fix
TheoPascoli 377bae5
feat: lint fix
TheoPascoli 7d75010
feat: lint fix
TheoPascoli 145241c
feat: lint fix
TheoPascoli 69694e8
feat: lint fix
TheoPascoli 31ffaf4
feat: lint fix
TheoPascoli fe7fb33
Merge branch 'dev' into test/setup-cypress
TheoPascoli 9c91a2a
feat: lint fix
TheoPascoli 7994dd0
feat: lint fix
TheoPascoli 3e54dfe
feat: lint fix
TheoPascoli 12de919
feat: lint fix
TheoPascoli f1e1e8f
feat: lint fix
TheoPascoli 61891d3
feat: lint fix
TheoPascoli 46183dd
feat: lint fix
TheoPascoli 07c2bb9
feat: lint fix
TheoPascoli db7a9f2
feat: lint fix
TheoPascoli 10712d7
feat: lint fix
TheoPascoli 63036b8
feat: lint fix
TheoPascoli 46ffe93
feat: lint fix
TheoPascoli b501079
feat: lint fix
TheoPascoli 5ff77f1
feat: lint fix
TheoPascoli fb66707
feat: lint fix
TheoPascoli 7a60117
feat: lint fix
TheoPascoli e196794
feat: lint fix
TheoPascoli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,4 +159,23 @@ jobs: | |
uses: sonarsource/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
|
||
cypress-run: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.13.0 | ||
- name: Verify Node.js version | ||
run: node --version | ||
- name: Install Node.js dependencies | ||
run: npm install | ||
working-directory: webapp | ||
- name: Cypress run | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
working-directory: webapp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Copyright (c) 2025, RTE (https://www.rte-france.com) | ||
* | ||
* See AUTHORS.txt | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
* | ||
* SPDX-License-Identifier: MPL-2.0 | ||
* | ||
* This file is part of the Antares project. | ||
*/ | ||
|
||
import { defineConfig } from "cypress"; | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Copyright (c) 2025, RTE (https://www.rte-france.com) | ||
* | ||
* See AUTHORS.txt | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
* | ||
* SPDX-License-Identifier: MPL-2.0 | ||
* | ||
* This file is part of the Antares project. | ||
*/ | ||
|
||
import { describe, it } from "mocha"; | ||
|
||
describe("template spec", () => { | ||
it("passes", () => { | ||
cy.visit("https://example.cypress.io"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "[email protected]", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* Copyright (c) 2025, RTE (https://www.rte-france.com) | ||
* | ||
* See AUTHORS.txt | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
* | ||
* SPDX-License-Identifier: MPL-2.0 | ||
* | ||
* This file is part of the Antares project. | ||
*/ | ||
|
||
console.log("setup commands here"); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* Copyright (c) 2025, RTE (https://www.rte-france.com) | ||
* | ||
* See AUTHORS.txt | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
* | ||
* SPDX-License-Identifier: MPL-2.0 | ||
* | ||
* This file is part of the Antares project. | ||
*/ | ||
|
||
// *********************************************************** | ||
// This example support/e2e.ts is processed and | ||
// loaded automatically before your test files. | ||
// | ||
// This is a great place to put global configuration and | ||
// behavior that modifies Cypress. | ||
// | ||
// You can change the location of this file or turn off | ||
// automatically serving support files with the | ||
// 'supportFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/configuration | ||
// *********************************************************** | ||
|
||
// Import commands.js using ES2015 syntax: | ||
import "./commands"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["es5", "dom"], | ||
"types": ["cypress", "node"] | ||
}, | ||
"include": ["**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ import jsdocPlugin from "eslint-plugin-jsdoc"; | |
import prettierPluginRecommended from "eslint-plugin-prettier/recommended"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only add this line: cypressPlugin.configs.recommended, before prettierPluginRecommended, // Must be the last one It includes all. |
||
import licenseHeaderPlugin from "eslint-plugin-license-header"; | ||
import reactRefreshPlugin from "eslint-plugin-react-refresh"; | ||
import cypressPlugin from "eslint-plugin-cypress"; | ||
|
||
export default [ | ||
// Must be defined here to be applied to all configurations. | ||
|
@@ -49,12 +50,14 @@ export default [ | |
globals: { | ||
...globals.browser, | ||
...globals.es2022, | ||
cy: true, | ||
}, | ||
}, | ||
plugins: { | ||
"license-header": licenseHeaderPlugin, | ||
"react-hooks": reactHookPlugin, | ||
"react-refresh": reactRefreshPlugin, | ||
cypress: cypressPlugin, | ||
}, | ||
rules: { | ||
...reactHookPlugin.configs.recommended.rules, | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use .ts for all test files instead to support TypeScript