-
Notifications
You must be signed in to change notification settings - Fork 57
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
Playwright e2e reconfiguration #871
Playwright e2e reconfiguration #871
Conversation
…developer/DTaaS into 320-failing-e2e-tests
…2e cmd, rm relative paths
@atomicgamedeveloper Thanks for the PR. Please update the README as well. |
@atomicgamedeveloper please rebase to the latest commit on |
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.
@atomicgamedeveloper thanks for the PR. Please check the comments.
client/test/e2e/setup/mcr.config.ts
Outdated
const coverageOptions: CoverageReportOptions = { | ||
name: 'Playwright Monocart Coverage Report', | ||
|
||
reports: ['codecov', 'v8'], |
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.
please add 'console-summary' as well
client/test/README.md
Outdated
can run the tests by running `yarn test:e2e`. | ||
|
||
By default, Playwright launches the react client website as specified in `config/test.js` | ||
and terminates it afterwards. Running `yarn test:e2e:int` allows you to skip this so |
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.
Line length
client/test/README.md
Outdated
``` | ||
|
||
## OAuth Setup | ||
|
||
You can follow the instructions in | ||
[authorization page](../../docs/admin/client/auth.md) to setup oauth for the | ||
You can follow the instructions in [authorization page](../../docs/admin/client/auth.md) to setup OAuth for the |
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.
Line length
client/test/README.md
Outdated
@@ -35,8 +39,7 @@ the details of your testing environment. For instance, you need to adjust: | |||
* `REACT_APP_LOGOUT_REDIRECT_URI` | |||
|
|||
to reflect your test setup. More information on about the environment settings is | |||
available in [authorization](../../docs/admin/client/auth.md) and | |||
[client deployment](../../docs/admin/client/CLIENT.md) pages. | |||
available in [authorization](../../docs/admin/client/auth.md) and [client deployment](../../docs/admin/client/CLIENT.md) pages. |
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.
Line length
client/test/README.md
Outdated
@@ -48,6 +51,8 @@ REACT_APP_REDIRECT_URI="http://localhost:4000/Library" | |||
REACT_APP_LOGOUT_REDIRECT_URI="http://localhost:4000" | |||
``` | |||
|
|||
Finally, run `yarn config:test` to copy the config file into the `build` and `public` folders. |
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.
Line length
|
||
```bash | ||
yarn test:e2e | ||
``` | ||
Or with manual website launch: | ||
```bash |
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.
Fenced code blocks should be surrounded by blank lines
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.
@atomicgamedeveloper thanks for the update. Please see the comments.
.github/workflows/client.yml
Outdated
@@ -8,13 +8,14 @@ on: | |||
paths: | |||
- 'client/**' | |||
workflow_dispatch: | |||
paths: |
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.
Please keep this. Otherwise, this workflow runs too many times.
client/test/README.md
Outdated
|
||
By default, Playwright launches the react client website as specified in `config/test.js` | ||
and terminates it afterwards. Running `yarn test:e2e:int` allows you to skip this so | ||
you can host the website yourself. |
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.
Does this mean that we can host the client at a doman address (say sandbox.cps.digit.au.dk) and perform E2E tests?
@atomicgamedeveloper Thanks for updates on the PR. List of pending changes:
A quick question on the # update config/test.js
# Add test/.env file
yarn install
yarn build
yarn config:test
yarn test:e2e:ext My question is the need to perform build and config:test tasks if we are not running the client website ourselves. Is there a simple way to skip these two steps for the case of externally hosted client? Thanks for the clarification. |
@atomicgamedeveloper please increment the packqge version number to 0.4.1. |
Build and config:test are indeed not necessary for the case of the externally hosted client unless you are using |
Test setup:The tests on the external server are not running successfully for the following setup. DTaaS server: dtl-server-2.st.lab.au.dk The logs on my machine are:
Text CorrectionsThe The :bug: The end-to-end tests are extremely brittle.
They are not being used at present. |
Code Climate has analyzed commit b4abc81 and detected 0 issues on this pull request. View more on Code Climate. |
14fbd92
into
INTO-CPS-Association:feature/distributed-demo
Resolving issues #45 and #320 regarding the e2e tests using playwright needing to be setup, mitigating issues about gitlab's CAPTCHA's and missing CodeCov in git actions for e2e tests.