-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix tests #1361
Conversation
ptbrowne
commented
Feb 22, 2024
- fix: Color mapping test
- fix: Temporal filter test broken
- fixed: After layout adjustments we now use different test-id
- fix: Order of default filters has changed on this cube
The functionality seem to have completely changed, I do not really understand why we cannot select moderate danger here, so I have changed the test to open the filters and deselect Canton Zurich
Fixed by re-recording test, I suppose this was broken due to change to a YearPicker
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 @ptbrowne, the situation looks much better now :)
Would it also make sense to remove the below part of GitHub Action?
visualization-tool/.github/workflows/e2e.yml
Lines 36 to 62 in 7c05360
- name: E2E tests ✅ | |
if: ${{ success() }} | |
# set the merge commit status check | |
# using GitHub REST API | |
# see https://docs.github.com/en/rest/reference/repos#create-a-commit-status | |
run: | | |
curl --request POST \ | |
--url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} \ | |
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ | |
--header 'content-type: application/json' \ | |
--data '{ | |
"context": "e2e", | |
"state": "success", | |
"description": "E2E tests passed" | |
}' | |
- name: E2E tests 🚨 | |
if: ${{ failure() }} | |
run: | | |
curl --request POST \ | |
--url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} \ | |
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ | |
--header 'content-type: application/json' \ | |
--data '{ | |
"context": "e2e", | |
"state": "failure", | |
"description": "E2E tests failed" | |
}' |
It looks like the state is mirrored between this and built-in check status in PRs, or maybe I'm missing something 💭
@@ -46,9 +46,9 @@ export const createSelectors = ({ screen, page, within }: Ctx) => { | |||
}, | |||
}, | |||
panels: { | |||
left: () => screen.getByTestId("panel-left"), | |||
left: () => screen.getByTestId("panel-body-L"), |
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.
Wondering if we could maybe extract this to a const and reuse it here and in the layout file, so we can't forget about updating it in the future? Maybe it could be adapted for all test-ids across the app, what do you think? Or should the "testId" name automatically ring a bell to update an e2e test? 😅
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 the broken test should automatically ring a bell 😁 I will try to make a const file 👍
Yes it seems like so, I don't remember know why we have this 😅 |
We do not know why there are two statuses and it seems like these lines are duplicated