Skip to content
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: setup and add e2e tests using playwright #3067

Merged
merged 150 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
2b06396
ignore .next in jest
BobanL Nov 25, 2024
33a8246
mute console error from jest results
BobanL Nov 25, 2024
b262450
rename app_env to nbs_auth
BobanL Nov 26, 2024
e7878dc
Remove app env check around s3 client
BobanL Nov 26, 2024
881700f
add collection variables for env groups
BobanL Nov 26, 2024
2e24379
fix typos in .env files
BobanL Nov 27, 2024
a1b3f0b
create single azure-storage image that contains both azurite and azur…
BobanL Nov 27, 2024
50a94be
add additional chaining to run specific collections
BobanL Nov 27, 2024
d267607
fix local-dev command to use collection
BobanL Nov 27, 2024
d11622e
update create-seed-data to use different configs depending on metadata
BobanL Nov 27, 2024
aaf6922
rename schemas
BobanL Nov 27, 2024
2c154e8
update .env.sample to include collection
BobanL Nov 27, 2024
0edacc9
remove azure-storage-init from orchestration
BobanL Nov 27, 2024
961555e
update orchestration docker compose to add collection
BobanL Nov 27, 2024
c2c1048
add metadata db schema in the env variable
BobanL Nov 29, 2024
15bf72e
remove undefined values
BobanL Dec 2, 2024
c53a3b9
remove nbs_auth value
BobanL Dec 2, 2024
48c65e2
Remove redundant variables
BobanL Dec 2, 2024
952e48c
change to aws non integrated and add timeout
BobanL Dec 2, 2024
8e7b765
Merge branch 'main' into boban/2873-env-variable-collections
BobanL Dec 3, 2024
4625ccc
add docker ignore
BobanL Dec 3, 2024
ac67fb2
Merge branch 'main' into boban/2873-env-variable-collections
BobanL Dec 4, 2024
18a92af
add more to docker ignore
BobanL Dec 4, 2024
787b6d7
Comment all from .env
BobanL Dec 4, 2024
b367cfb
fix tests that were relying on .env file
BobanL Dec 4, 2024
81f1de5
make metadata variables optional
BobanL Dec 4, 2024
1f27bfb
pull out saveFhirMetadata into it's own function
BobanL Dec 4, 2024
aaeb383
delete .env
BobanL Dec 4, 2024
8d44b5a
Use PersistenceResponse instead of Nextjs response
BobanL Dec 4, 2024
d091bf1
console log error messages
BobanL Dec 4, 2024
e2f133c
Do not close pool when done with mssql
BobanL Dec 4, 2024
8a95e9a
increase sqlserver timeout to 30 s
BobanL Dec 4, 2024
376c6ba
don't return anything from save ecr data query
BobanL Dec 5, 2024
af5a8a1
be more specific with env variable names
BobanL Dec 5, 2024
798710a
remove return for ecr data
BobanL Dec 5, 2024
d671092
update .env.sample variables
BobanL Dec 5, 2024
40f8e8d
remove .env
BobanL Dec 5, 2024
4181b19
Remove app_env from dockerfile
BobanL Dec 5, 2024
a7ac149
make metadata env variable optional
BobanL Dec 5, 2024
bd05152
fix tests without .env
BobanL Dec 5, 2024
35e08e3
move getDb from top level to be inside methods
BobanL Dec 5, 2024
a3e9296
add dockerignore
BobanL Dec 5, 2024
8915b91
Remove NEXT_PUBLIC_BASEPATH since it is determined at build time anyways
BobanL Dec 5, 2024
0e3ebee
fix first batch of seed script conflicts
BobanL Dec 6, 2024
b6782c6
use rewrite instead of redirect to keep url
BobanL Dec 6, 2024
b573195
set pool min to 1
BobanL Dec 8, 2024
cec7099
fix middleware test after changes to middleware rewrite to error page
BobanL Dec 9, 2024
dec9c71
replace dotenvx with next runtime env and instrumentation
BobanL Dec 9, 2024
d3989ce
Merge branch 'main' into boban/fix-empty-build
BobanL Dec 9, 2024
b53749f
remove console logs
BobanL Dec 9, 2024
9add37a
update collection in orchestration
BobanL Dec 9, 2024
4cc1fa1
Merge branch 'main' into boban/fix-empty-build
BobanL Dec 9, 2024
6ee5533
Merge branch 'boban/fix-empty-build' into boban/2873-env-variables-ne…
BobanL Dec 9, 2024
ad5cff3
change docker compose collection to default to sql server non integrated
BobanL Dec 10, 2024
7ed1ce7
Rename PersistenceResponse to SaveResponse
BobanL Dec 10, 2024
968fbd5
Remove build from convert-seed-data
BobanL Dec 10, 2024
b0f102a
Merge branch 'main' into boban/2873-env-variables-next-runtime-env
BobanL Dec 11, 2024
83f1081
remove useless console.error logs
BobanL Dec 11, 2024
0e2becc
update instrumentation tests
BobanL Dec 11, 2024
3c81132
fix middleware
BobanL Dec 12, 2024
46e5b17
permanently set base path in ecr-viewer
BobanL Dec 12, 2024
4a6d650
Rename middleware to be a .ts file
BobanL Dec 12, 2024
af2fd97
replace a tags with Next's Link tag
BobanL Dec 12, 2024
d186d5a
remove title from Header link
BobanL Dec 12, 2024
9a4bcab
retype base_path to be a string
BobanL Dec 12, 2024
b738627
fix metrics test
BobanL Dec 12, 2024
23c96fa
update header snapshot test
BobanL Dec 12, 2024
00ed3ab
address middleware tests
BobanL Dec 12, 2024
468ca7b
add back button to retrieval failed
BobanL Dec 12, 2024
cdc6e34
remove unused rewrite in next config
BobanL Dec 12, 2024
03b9a9e
update matcher
BobanL Dec 12, 2024
47d07a9
Prevent access to /api/fhir-data
BobanL Dec 12, 2024
2dec26e
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Dec 12, 2024
6fcc7ba
fix url in readme
BobanL Dec 12, 2024
baacad8
remove accident commited next-runtime-env
BobanL Dec 12, 2024
b333160
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Dec 12, 2024
b6d88da
Merge branch 'boban/set-ecr-viewer-path-permanently' into boban/2873-…
BobanL Dec 12, 2024
236b288
use next-runtime-env to access NEXT_PUBLIC_NON_INTEGRATED
BobanL Dec 12, 2024
ca6cc0d
Merge branch 'main' into boban/2873-env-variables-next-runtime-env
BobanL Dec 12, 2024
38edbb9
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Dec 12, 2024
6dc19e8
use proper variable name for middleware test
BobanL Dec 12, 2024
baf0b88
simplify clear-local command
BobanL Dec 12, 2024
e24d473
rename collection to CONFIG_NAME
BobanL Dec 12, 2024
8981c0a
update design script to handle config variable
BobanL Dec 12, 2024
49078f8
fix package.json
BobanL Dec 12, 2024
ff4b715
update lighthouse startup
BobanL Dec 13, 2024
f6cac3f
add dummy keys to .env.sample
BobanL Dec 13, 2024
469680b
Filter by conditions in eCR Library (frontend) (#2981)
angelathe Dec 12, 2024
789d555
fix base path for filters
BobanL Dec 13, 2024
58f3cb0
Merge branch 'boban/set-ecr-viewer-path-permanently' into boban/2873-…
BobanL Dec 13, 2024
5a41b81
update config name in create-seed-data
BobanL Dec 13, 2024
8086d8b
move start transaction in the if statement for saveMetadataToSqlServer
BobanL Dec 13, 2024
d45ce58
remove random transaction from conditons api sql server
BobanL Dec 13, 2024
93182c9
Merge branch 'main' into boban/set-ecr-viewer-path-permanently
BobanL Dec 13, 2024
3867e72
move start transaction in the if statement for saveMetadataToSqlServer
BobanL Dec 13, 2024
57377c5
remove random transaction from conditons api sql server
BobanL Dec 13, 2024
aa6f17f
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Dec 13, 2024
d1981cf
refactor service for condition to simplify logic
BobanL Dec 13, 2024
b233e2f
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Dec 13, 2024
35fa792
update filter test
BobanL Dec 13, 2024
043deb8
update jsdocs
BobanL Dec 13, 2024
0b90c1a
Merge branch 'main' into boban/2873-env-variables-next-runtime-env
BobanL Dec 13, 2024
bf2e436
Merge branch 'boban/fix-transactions' into boban/2873-env-variables-n…
BobanL Dec 13, 2024
4633626
Merge branch 'boban/set-ecr-viewer-path-permanently' into boban/2873-…
BobanL Dec 13, 2024
6da57fa
add nbs pub key to environment variables
BobanL Dec 13, 2024
837e55e
Merge branch 'main' into boban/2873-env-variables-next-runtime-env
BobanL Dec 13, 2024
6473185
add playwright init and tests
BobanL Dec 16, 2024
0dc07b2
ignore e2e for jest
BobanL Dec 16, 2024
d7cd02f
don't skip e2e test
BobanL Dec 16, 2024
7710d9d
set working directory for playwright tests
BobanL Dec 16, 2024
840a31a
convert data and start server for e2e tests
BobanL Dec 16, 2024
4bcd9e1
fix test command
BobanL Dec 16, 2024
7eddeef
set profile for logs
BobanL Dec 18, 2024
bd080ec
debug s3 client performance
BobanL Dec 18, 2024
9b8c4ce
update images
BobanL Dec 18, 2024
9f47748
remove snapshots
BobanL Dec 18, 2024
35d7541
replace snapshots with accessibility tests
BobanL Dec 18, 2024
53aee53
opt into fully parallel tests
BobanL Dec 18, 2024
83b465f
remove test:e2e:ci and snapshot related
BobanL Dec 18, 2024
d511beb
increase timeout for for first test
BobanL Dec 18, 2024
14d624b
delete cypress
BobanL Dec 19, 2024
b6a4bcf
Remove cypress config
BobanL Dec 19, 2024
06537e0
Update .dockerignore to replace 'cypress' with 'e2e'
BobanL Dec 19, 2024
cf3703f
Remove Cypress-related scripts and dependencies from package.json
BobanL Dec 19, 2024
d822708
Revert "debug s3 client performance"
BobanL Dec 19, 2024
9e0a2cf
Remove unnecessary dependency in e2e-tests workflow
BobanL Dec 19, 2024
3e94869
change base URL in playwright config
BobanL Dec 19, 2024
8a7ca22
remove cypress from gitignore
BobanL Dec 19, 2024
a10734c
remove makefile
BobanL Dec 19, 2024
a0c6525
Merge branch 'main' into boban/2969-e2e-tests
BobanL Jan 2, 2025
294a090
update server_host to be localhost
BobanL Jan 2, 2025
81788c8
update test:e2e command name
BobanL Jan 2, 2025
efb5338
fix broken tests and reorder them
BobanL Jan 2, 2025
362e996
Merge branch 'main' into boban/2969-e2e-tests
BobanL Jan 3, 2025
59807f4
remove cypress commands
BobanL Jan 3, 2025
f34aab9
rename .yml to .yaml
BobanL Jan 3, 2025
228f3aa
remove comments from playwright config
BobanL Jan 3, 2025
82c2456
add testing section for readme
BobanL Jan 3, 2025
b537f3a
update playwright config to include webserver
BobanL Jan 6, 2025
1568baf
update the tests to be more clear
BobanL Jan 6, 2025
fa60b58
remove extra playwright browser install
BobanL Jan 6, 2025
1416e4b
update playwright test command
BobanL Jan 6, 2025
9e54910
actually don't reuse, but remove starting service
BobanL Jan 6, 2025
52ef3a0
Revert "update server_host to be localhost"
BobanL Jan 6, 2025
ae6136d
Merge branch 'main' into boban/2969-e2e-tests
BobanL Jan 6, 2025
3a3b33a
Delete another cypress folder
BobanL Jan 6, 2025
0b88001
update read me to include assumption around stored data
BobanL Jan 6, 2025
940d85c
Update containers/ecr-viewer/README.md
BobanL Jan 6, 2025
724773c
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Jan 6, 2025
97291ed
Merge branch 'main' into boban/2969-e2e-tests
BobanL Jan 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion containers/ecr-viewer/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ DATABASE_URL=postgres://postgres:pw@localhost:5432/ecr_viewer_db
# SQL Server
SQL_SERVER_USER=sa
SQL_SERVER_PASSWORD=Password1!
SQL_SERVER_HOST=localhost
# SQL_SERVER_HOST=sqlserver


# Auth - For testing use only
Expand Down
9 changes: 5 additions & 4 deletions containers/ecr-viewer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@ Running tests:


#### End to End Testing
End to end test utilize the Playwright framerwork.
End to end test utilize the Playwright framerwork.
Running Tests:
* `npm run test:e2e` to run the tests against http://localhost:3000/ecr-viewer.
* If the service isn't available, Playwright is [configured to spin it up](https://playwright.dev/docs/test-webserver).
* If you would prefer to spin up the service manually, you can run `npm run local-dev` or `npm run local-docker`.
1. `npm run convert-seed-data:build` to save all required eCRs necessary for e2e tests. The tests require all eCRs located in `/seed-scripts/baseECR/LA` have been saved.
BobanL marked this conversation as resolved.
Show resolved Hide resolved
2. `npm run test:e2e` to run the tests against http://localhost:3000/ecr-viewer.
- If the service isn't available, Playwright is [configured to spin it up](https://playwright.dev/docs/test-webserver).
- If you would prefer to spin up the service manually, you can run `npm run local-dev` or `npm run local-docker`.

Other useful playwright tools/commands
* [Playwright VScode extension](https://playwright.dev/docs/getting-started-vscode) - Can be used to record tests, run specific tests, and much more!
Expand Down
2 changes: 1 addition & 1 deletion containers/ecr-viewer/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
# SQL Server
- SQL_SERVER_USER=${SQL_SERVER_USER:-sa}
- SQL_SERVER_PASSWORD=${SQL_SERVER_PASSWORD:-Password1!}
- SQL_SERVER_HOST=sqlserver
- SQL_SERVER_HOST=${SQL_SERVER_HOST:-sqlserver}
profiles:
- ecr-viewer

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading