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

update(console): run e2e by docker for ci #2274

Merged
merged 2 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions console/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ install-dev-tools:
install-dependencies:
yarn

e2e-local:
cd playwright && yarn && npx playwright install && \
yarn test

e2e-docker:
docker run -it --rm --ipc=host -w /app -e PROXY=${PROXY} -v playwright:/app mcr.microsoft.com/playwright:v1.33.0-jammy yarn test || exit

prepare:
mkdir -p extensions && \
([ ! -f "extensions/index.tsx" ] && echo 'export default {}' > extensions/index.tsx) || echo 'extensions exists'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export function GridResizer({
flex: 1,
}}
>
{right()}
{gridMode !== 2 && right()}
</div>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function ConfigSimpleQuery({ columns, onChange, value }: PropsT) {
noStyle
style={{
marginBottom: 0,
minWidth: '170px',
minWidth: '190px',
}}
>
{/* @ts-ignore */}
Expand Down
4 changes: 3 additions & 1 deletion console/playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"license": "MIT",
"devDependencies": {
"@playwright/test": "^1.33",
"dotenv": "^16.0.3",
"fs-extra": "^11.1.1",
"yarn": "^1.22.19"
},
"scripts": {
Expand All @@ -18,4 +20,4 @@
"dependencies": {
"cross-env": "^7.0.3"
}
}
}
33 changes: 33 additions & 0 deletions console/playwright/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,44 @@ cross-spawn@^7.0.1:
shebang-command "^2.0.0"
which "^2.0.1"

dotenv@^16.0.3:
version "16.0.3"
resolved "https://registry.npmmirror.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07"
integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==

fs-extra@^11.1.1:
version "11.1.1"
resolved "https://registry.npmmirror.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d"
integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==
dependencies:
graceful-fs "^4.2.0"
jsonfile "^6.0.1"
universalify "^2.0.0"

fsevents@2.3.2:
version "2.3.2"
resolved "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==

graceful-fs@^4.1.6, graceful-fs@^4.2.0:
version "4.2.11"
resolved "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==

isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==

jsonfile@^6.0.1:
version "6.1.0"
resolved "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==
dependencies:
universalify "^2.0.0"
optionalDependencies:
graceful-fs "^4.1.6"

path-key@^3.1.0:
version "3.1.1"
resolved "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
Expand All @@ -65,6 +93,11 @@ shebang-regex@^3.0.0:
resolved "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==

universalify@^2.0.0:
version "2.0.0"
resolved "https://registry.npmmirror.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==

which@^2.0.1:
version "2.0.2"
resolved "https://registry.npmmirror.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
Expand Down
2 changes: 1 addition & 1 deletion console/src/pages/Evaluation/EvaluationListCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function EvaluationListCard() {
return <TextLink to={`/projects/${projectId}/evaluations/${id}/results`}>{id}</TextLink>
},
})
if (column.key === 'sys/duration')
if (column.key === 'sys/duration_ms')
return CustomColumn<RecordAttr, any>({
...column,
renderCell: ({ value }) => <p title={value.toString()}>{durationToStr(value.value)}</p>,
Expand Down
6 changes: 2 additions & 4 deletions scripts/e2e_test/start_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,8 @@ api_test() {
}

console_test() {
pushd ../../console/playwright
yarn install
npx playwright install
PROXY=$CONTROLLER_URL yarn test
pushd ../../console
docker run --rm --ipc=host -w /app -e PROXY=$CONTROLLER_URL -v ./playwright:/app mcr.microsoft.com/playwright:v1.33.0-jammy yarn test || exit
popd
}

Expand Down