-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat: e2e combined improvements #1998
Conversation
BREAKING CHANGE: Removed ButtonOld Component, use Button instead
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1998 +/- ##
==========================================
- Coverage 46.39% 46.36% -0.03%
==========================================
Files 673 672 -1
Lines 38770 38764 -6
Branches 9818 9819 +1
==========================================
- Hits 17988 17974 -14
- Misses 20729 20737 +8
Partials 53 53
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…nd contrast colors
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.
Just marking as needing change so that this doesn't merge until we cut a release/branch for V+.
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.
I only reviewed the CI and docker files
tests/context-menu.spec.ts-snapshots/advanced-filters-6-firefox-linux.png
Outdated
Show resolved
Hide resolved
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.
LGTM
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.
Good to merge, added a comment to remove the VITE_PLAYWRIGHT_CSS junk
// load addional css for playwright docker tests | ||
if (import.meta.env.VITE_PLAYWRIGHT_CSS === '1') { | ||
await import('./Playwright.css'); | ||
} | ||
|
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.
We should follow up to see if we can fix this in Playwright with some sort of global hook to inject CSS to a page as it loads
Maybe we can use https://playwright.dev/docs/api/class-page#page-add-style-tag
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.
I believe this gets statically replaced and then stripped out at build time if the condition resolves to false
, so may not be an issue to leave this here. I did some experimenting, and the code does only seem to be present in the output when VITE_PLAYWRIGHT_CSS=1
. It does still appear in the source maps, but this is presumably part of mapping to the original source.
@dsmmcken tests pass locally for me now |
depends_on: | ||
dhc-server: | ||
condition: service_healthy | ||
|
||
web-ui-update-snapshots: | ||
extends: | ||
service: web-ui-tests | ||
entrypoint: 'npm run e2e:update-snapshots -- --config=playwright-ci.config.ts' | ||
entrypoint: '/bin/bash --login -i -c "npm run e2e:update-snapshots -- --config=playwright-ci.config.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.
It seems we can no longer pass in additional args to constrain this command e.g. before I could
npm run e2e:update-ci-snapshots styleguide
or
npm run e2e:update-ci-snapshots -- -g "some test name"
Not sure if this is the culprit, but it doesn't seem to be working anymore
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.
This is the culprit. The params just get passed to the entrypoint, so now it's passing those params at the end of the bash command instead of in the npm command.
Might be fixed by adding $@ to the end of the npm command in the quotes
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.
I've tried this a few different ways but can't get the $@ args to get included
tests/docker-scripts/Dockerfile
Outdated
@@ -19,28 +26,20 @@ RUN fc-list : family; | |||
COPY .nvmrc . | |||
|
|||
# Set the default shell so the correct node/npm is used after install | |||
# https://stackoverflow.com/a/60137919 | |||
# Based on https://stackoverflow.com/a/60137919 |
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.
I think I found away to avoid the interactive shell here:
SHELL ["/bin/bash", "--login", "-c"]
# Nvm appends its config to `.bashrc` if it exists, but the default `.bashrc`
# bails if not in an interactive shell, which causes `nvm` to never actually get
# configured. To avoid having to use `-i` interactive shell, we overwrite the
# `.bashrc` file with a version that doesn't bail.
# https://github.com/nvm-sh/nvm/issues/1985#issuecomment-813189002
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
RUN echo 'export NVM_DIR="$HOME/.nvm"' > /root/.bashrc
RUN echo 'source "$NVM_DIR/nvm.sh" --install' >> /root/.bashrc
RUN source /root/.bashrc
RUN nvm install
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.
Actually this would be simpler:
SHELL ["/bin/bash", "--login", "-c"]
# The default `.bashrc` bails on the first line if not in interactive shell.
# We can just empty it so that the nvm install below will actually run when sourcing
# `.bashrc`
RUN echo "" > /root/.bashrc
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
RUN source /root/.bashrc && nvm install
# Now clobber the default node installed by the playwright | ||
# image so that the commands in docker compose entrypoint will | ||
# also use the correct version of node without running in bash | ||
RUN ln -s $(which node) /usr/local/bin/nodejs |
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.
Kudos. This simplifies things.
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.
Tests are passing in CI and locally except for a timeout when I ran everything. Re-running the test in isolation passed, so I think we are good to go.
Contains several changes that all touch many snapshots. Combined to reduce snapshot churn.
The primary goal was to address webkit kerning issues caused by: microsoft/playwright#20203
Recommend to review using
.
vscode mode and initially collapsing all snapshot folders.Moves e2e test to execute inside docker container so enviroment is consitent between ci and local
Removes deprecated ButtonOld
Disable kerning and smoothing in webkit playwright tests:
Optimize ThemeColors section in style guide
Run golden-layout tests in parallel
BREAKING CHANGE: Removed ButtonOld component, use Button instead.