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

Fix tests #1361

Merged
merged 6 commits into from
Feb 22, 2024
Merged

Fix tests #1361

merged 6 commits into from
Feb 22, 2024

Conversation

ptbrowne
Copy link
Collaborator

  • 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
Copy link

vercel bot commented Feb 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 22, 2024 4:34pm

Copy link
Collaborator

@bprusinowski bprusinowski left a 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?

- 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"),
Copy link
Collaborator

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? 😅

Copy link
Collaborator Author

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 👍

@ptbrowne
Copy link
Collaborator Author

Would it also make sense to remove the below part of GitHub Action?

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
@ptbrowne ptbrowne merged commit f3b037b into main Feb 22, 2024
6 checks passed
@ptbrowne ptbrowne deleted the fix/tests branch February 22, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants