-
Notifications
You must be signed in to change notification settings - Fork 13
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
O3-2413: (test) Setup playwright for automated tests in Fast Data Entry App #88
base: main
Are you sure you want to change the base?
Conversation
@jayasanka-sack , @NethmiRodrigo Can you review this please? |
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.
Found this in the failed build:
➤ YN0028: The lockfile would have been modified by this install, which is explicitly forbidden.
Run yarn install
locally and push changes to avoid the error message
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.
Thanks for the PR @dilankavishka ! I've left some comments, have a look when you are free. Also you need to update the jest config file as well, check this PR: openmrs/openmrs-esm-stock-management#231
@jayasanka-sack made the changes and need to write a small test for this. |
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.
Great! Include a very basic test for this PR and that would be enough. Ex the fast data entry app loads properly (just check only the title)
e2e/core/global-setup.ts
Outdated
await requestContext.dispose(); | ||
} | ||
|
||
export default globalSetup; |
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.
https://www.reddit.com/r/github/comments/w5765d/line_end_warning/?rdt=60285
This applies to other files as well.
"moduleNameMapper": { | ||
"\\.(s?css)$": "identity-obj-proxy", | ||
"@openmrs/esm-framework": "@openmrs/esm-framework/mock", | ||
"\\.(s?css)$": "identity-obj-proxy", | ||
"^lodash-es/(.*)$": "lodash/$1", | ||
"^uuid$": "<rootDir>/node_modules/uuid/dist/index.js", | ||
"^lodash-es$": "lodash", | ||
"^dexie$": "<rootDir>/node_modules/dexie", | ||
"lodash-es": "lodash" | ||
"^react-i18next$": "<rootDir>/__mocks__/react-i18next.js" | ||
}, | ||
"setupFilesAfterEnv": [ | ||
"<rootDir>/src/setup-tests.ts" | ||
], | ||
"setupFilesAfterEnv": ["<rootDir>/src/setup-tests.ts"], |
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.
Include changes that are only relevant to E2E tests.
@jayasanka-sack , while i'm trying to write an example test i have some challenges: after give yarn test-e2e --headed it's shows an error like this.
|
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.
@dilankavishka Seems like you are not running the server or haven't copied the environment variables file (or both). Check this doc:
https://openmrs.atlassian.net/wiki/spaces/docs/pages/150962731/Testing+Frontend+Modules+O3#Running-tests
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.
Also, add this section to the main readme file:
Line 104 to 111
https://github.com/openmrs/openmrs-esm-patient-chart/blob/a928b899060d6f347539c1491ed73e80de718e4f/README.md?plain=1#L104
The new link to the e2e links should be: https://openmrs.atlassian.net/wiki/spaces/docs/pages/150962731/Testing+Frontend+Modules+O3
Requirements
Summary
This PR is for setting up the fast data entry app for end-to-end testing.
Screenshots
Related Issue
https://openmrs.atlassian.net/browse/O3-2413
Other