Skip to content

Commit ca87a36

Browse files
Update playwright test config (#389)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Enabled fully parallel test execution to speed up runs and remove CI-specific worker limits. * Switched build/install workflow to Yarn and updated lockfile handling; removed legacy lockfile tooling. * **Tests** * Updated an end-to-end test to interact with the correct UI control type, improving reliability. * **Refactor** * Adjusted server logger configuration shape without changing runtime behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 2d0db6a commit ca87a36

File tree

6 files changed

+15
-67
lines changed

6 files changed

+15
-67
lines changed

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ current_active_region = "us-east-2"
66
src_directory_root = src/
77
dist_ui_directory_root = dist_ui/
88
integration_test_directory_root = tests/live_integration/
9-
npm_install_params = --omit=dev --target_arch=arm64 --target_platform=linux --target_libc=glibc --cpu arm64 --os linux --arch=arm64
9+
yarn_install_params = --production --frozen-lockfile
10+
yarn_env = npm_config_arch=arm64 npm_config_platform=linux npm_config_libc=glibc
1011
GIT_HASH := $(shell git rev-parse --short HEAD)
1112

1213
.PHONY: clean
@@ -32,18 +33,19 @@ build: src/
3233
cp -r src/api/resources/ dist/api/resources
3334
rm -rf dist/lambda/sqs
3435
docker run --rm -v "$(shell pwd)/dist/lambda":/var/task public.ecr.aws/sam/build-nodejs22.x:latest \
35-
sh -c "npm install $(npm_install_params) && \
36+
sh -c "npm i -g yarn && $(yarn_env) yarn $(yarn_install_params) && \
3637
rm -rf node_modules/aws-crt/dist/bin/{darwin*,linux-x64*,linux-arm64-musl} && \
3738
rm -rf node_modules/argon2/prebuilds/{darwin*,freebsd*,linux-arm,linux-x64*,win32-x64*} && \
3839
rm -rf node_modules/argon2/prebuilds/linux-arm64/argon2.armv8.musl.node"
3940

4041
docker run --rm -v "$(shell pwd)/dist/sqsConsumer":/var/task public.ecr.aws/sam/build-nodejs22.x:latest \
41-
sh -c "npm install $(npm_install_params) && \
42+
sh -c "npm i -g yarn && $(yarn_env) yarn $(yarn_install_params) && \
4243
rm -rf node_modules/aws-crt/dist/bin/{darwin*,linux-x64*,linux-arm64-musl} && \
4344
rm -rf node_modules/argon2/prebuilds/{darwin*,freebsd*,linux-arm,linux-x64*,win32-x64*} && \
4445
rm -rf node_modules/argon2/prebuilds/linux-arm64/argon2.armv8.musl.node"
4546

4647
local:
48+
mkdir -p dist_devel/
4749
VITE_BUILD_HASH=$(GIT_HASH) yarn run dev
4850

4951
deploy_prod:

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
"build": "concurrently --names 'api,ui,archival,linkryEdge' 'yarn workspace infra-core-api run build' 'yarn workspace infra-core-ui run build' 'yarn workspace infra-core-archival run build' 'yarn workspace infra-core-linkry-edge run build'",
1717
"postbuild": "node src/api/createLambdaPackage.js && yarn lockfile-manage",
1818
"dev": "cross-env DISABLE_AUDIT_LOG=true concurrently --names 'api,ui' 'yarn workspace infra-core-api run dev' 'yarn workspace infra-core-ui run dev'",
19-
"lockfile-manage": "synp --with-workspace --source-file yarn.lock",
20-
"postlockfile-manage": "cp package-lock.json dist/lambda/ && cp package-lock.json dist/sqsConsumer/ && cp src/api/package.lambda.json dist/lambda/package.json && cp src/api/package.lambda.json dist/sqsConsumer/package.json && rm package-lock.json",
19+
"lockfile-manage": "cp src/api/package.lambda.json dist/lambda/package.json && cp src/api/package.lambda.json dist/sqsConsumer/package.json && cp yarn.lock dist/lambda/ && cp yarn.lock dist/sqsConsumer/",
2120
"prettier": "yarn workspaces run prettier && prettier --check tests/**/*.ts",
2221
"prettier:write": "yarn workspaces run prettier:write && prettier --write tests/**/*.ts",
2322
"lint": "yarn workspaces run lint",
@@ -83,7 +82,6 @@
8382
"stylelint": "^16.23.1",
8483
"stylelint-config-standard-scss": "^15.0.1",
8584
"supertest": "^7.1.4",
86-
"synp": "^1.9.14",
8785
"tsx": "^4.20.4",
8886
"typescript": "^5.9.2",
8987
"typescript-eslint": "^8.40.0",
@@ -95,4 +93,4 @@
9593
"pdfjs-dist": "^4.8.69",
9694
"form-data": "^4.0.4"
9795
}
98-
}
96+
}

playwright.config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ import { defineConfig, devices } from '@playwright/test';
33
export default defineConfig({
44
testDir: './tests/e2e/',
55
/* Run tests in files in parallel */
6-
fullyParallel: false,
6+
fullyParallel: true,
77
/* Fail the build on CI if you accidentally left test.only in the source code. */
88
forbidOnly: !!process.env.CI,
99
/* Retry on CI only */
1010
retries: process.env.CI ? 2 : 0,
11-
/* Opt out of parallel tests on CI. */
12-
workers: process.env.CI ? 1 : undefined,
1311
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
1412
reporter: process.env.CI ? 'github' : 'html',
1513
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */

src/api/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ async function init(prettyPrint: boolean = false, initClients: boolean = true) {
9191
level: process.env.LOG_LEVEL || "info",
9292
transport,
9393
},
94-
ignoreTrailingSlash: true,
95-
ignoreDuplicateSlashes: true,
94+
routerOptions: {
95+
ignoreTrailingSlash: true,
96+
ignoreDuplicateSlashes: true,
97+
},
9698
disableRequestLogging: true,
9799
genReqId: (request) => {
98100
const header = request.headers["x-apigateway-event"];

tests/e2e/docs.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe("Docs tests", () => {
2828
page.getByRole("heading", { name: "ACM @ UIUC Core API" }),
2929
).toBeDefined();
3030
await page
31-
.getByRole("link", { name: "Retrieve calendar events with" })
31+
.getByRole("button", { name: "Retrieve calendar events with" })
3232
.click();
3333
await page
3434
.getByRole("button", { name: "Test Request (get /api/v1/events)" })

yarn.lock

Lines changed: 2 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -4154,11 +4154,6 @@
41544154
resolved "https://registry.yarnpkg.com/@vladfrangu/async_event_emitter/-/async_event_emitter-2.4.6.tgz#508b6c45b03f917112a9008180b308ba0e4d1805"
41554155
integrity sha512-RaI5qZo6D2CVS6sTHFKg1v5Ohq/+Bo2LZ5gzUEwZ/WkHhwtGTCB/sVLw8ijOkAUxasZ+WshN/Rzj4ywsABJ5ZA==
41564156

4157-
"@yarnpkg/lockfile@^1.1.0":
4158-
version "1.1.0"
4159-
resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31"
4160-
integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==
4161-
41624157
"@zxing/browser@0.0.7":
41634158
version "0.0.7"
41644159
resolved "https://registry.yarnpkg.com/@zxing/browser/-/browser-0.0.7.tgz#5fa7680a867b660f48d3288fdf63e0174ad531c7"
@@ -4866,28 +4861,13 @@ colorette@^2.0.7:
48664861
resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a"
48674862
integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==
48684863

4869-
colors@1.4.0:
4870-
version "1.4.0"
4871-
resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78"
4872-
integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==
4873-
48744864
combined-stream@^1.0.8:
48754865
version "1.0.8"
48764866
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
48774867
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
48784868
dependencies:
48794869
delayed-stream "~1.0.0"
48804870

4881-
commander@^2.11.0:
4882-
version "2.20.3"
4883-
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
4884-
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
4885-
4886-
commander@^7.2.0:
4887-
version "7.2.0"
4888-
resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
4889-
integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==
4890-
48914871
commist@^1.0.0:
48924872
version "1.1.0"
48934873
resolved "https://registry.yarnpkg.com/commist/-/commist-1.1.0.tgz#17811ec6978f6c15ee4de80c45c9beb77cee35d5"
@@ -5427,11 +5407,6 @@ env-paths@^2.2.1:
54275407
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2"
54285408
integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==
54295409

5430-
eol@^0.10.0:
5431-
version "0.10.0"
5432-
resolved "https://registry.yarnpkg.com/eol/-/eol-0.10.0.tgz#51b35c6b9aa0329a26d102b6ddc454be8654739b"
5433-
integrity sha512-+w3ktYrOphcIqC1XKmhQYvM+o2uxgQFiimL7B6JPZJlWVxf7Lno9e/JWLPIgbHo7DoZ+b7jsf/NzrUcNe6ZTZQ==
5434-
54355410
error-ex@^1.3.1:
54365411
version "1.3.2"
54375412
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
@@ -7602,7 +7577,7 @@ lodash.truncate@^4.4.2:
76027577
resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193"
76037578
integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==
76047579

7605-
lodash@4.17.21, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.21:
7580+
lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.21:
76067581
version "4.17.21"
76077582
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
76087583
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
@@ -7953,13 +7928,6 @@ nise@^6.0.0:
79537928
just-extend "^6.2.0"
79547929
path-to-regexp "^8.1.0"
79557930

7956-
nmtree@^1.0.6:
7957-
version "1.0.6"
7958-
resolved "https://registry.yarnpkg.com/nmtree/-/nmtree-1.0.6.tgz#953e057ad545e9e627f1275bd25fea4e92c1cf63"
7959-
integrity sha512-SUPCoyX5w/lOT6wD/PZEymR+J899984tYEOYjuDqQlIOeX5NSb1MEsCcT0az+dhZD0MLAj5hGBZEpKQxuDdniA==
7960-
dependencies:
7961-
commander "^2.11.0"
7962-
79637931
node-addon-api@^8.5.0:
79647932
version "8.5.0"
79657933
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-8.5.0.tgz#c91b2d7682fa457d2e1c388150f0dff9aafb8f3f"
@@ -9211,7 +9179,7 @@ semver@^6.1.2, semver@^6.3.0, semver@^6.3.1:
92119179
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
92129180
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
92139181

9214-
semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.2, semver@^7.6.3, semver@^7.7.1:
9182+
semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.2, semver@^7.7.1:
92159183
version "7.7.3"
92169184
resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946"
92179185
integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==
@@ -9404,11 +9372,6 @@ sonic-boom@^4.0.1:
94049372
dependencies:
94059373
atomic-sleep "^1.0.0"
94069374

9407-
sort-object-keys@^1.1.3:
9408-
version "1.1.3"
9409-
resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.3.tgz#bff833fe85cab147b34742e45863453c1e190b45"
9410-
integrity sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==
9411-
94129375
source-map-js@^1.0.1, source-map-js@^1.2.0, source-map-js@^1.2.1:
94139376
version "1.2.1"
94149377
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46"
@@ -9871,21 +9834,6 @@ synckit@^0.11.7:
98719834
dependencies:
98729835
"@pkgr/core" "^0.2.4"
98739836

9874-
synp@^1.9.14:
9875-
version "1.9.14"
9876-
resolved "https://registry.yarnpkg.com/synp/-/synp-1.9.14.tgz#1feb222d273f6092c6c264746277e95655c60717"
9877-
integrity sha512-0e4u7KtrCrMqvuXvDN4nnHSEQbPlONtJuoolRWzut0PfuT2mEOvIFnYFHEpn5YPIOv7S5Ubher0b04jmYRQOzQ==
9878-
dependencies:
9879-
"@yarnpkg/lockfile" "^1.1.0"
9880-
colors "1.4.0"
9881-
commander "^7.2.0"
9882-
eol "^0.10.0"
9883-
fast-glob "^3.3.2"
9884-
lodash "4.17.21"
9885-
nmtree "^1.0.6"
9886-
semver "^7.6.3"
9887-
sort-object-keys "^1.1.3"
9888-
98899837
tabbable@^6.0.0:
98909838
version "6.2.0"
98919839
resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-6.2.0.tgz#732fb62bc0175cfcec257330be187dcfba1f3b97"

0 commit comments

Comments
 (0)