8000 Evolution: Add inputCheckboxTest for test UI by samuel-duhaime · Pull Request #511 · chairemobilite/evolution · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Evolution: Add inputCheckboxTest for test UI #511

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

Merged
merged 1 commit into from
May 23, 2024
Merged

Conversation

samuel-duhaime
Copy link
Collaborator

Pull request

Justification

We need to test inputCheckbox for some of our surveys (MJ, for example).

Description

Add inputCheckboxTest
Format testHelper.ts

@samuel-duhaime samuel-duhaime requested a review from tahini May 23, 2024 18:11
Copy link
Contributor
@tahini tahini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Soit faire la modif ou ajouter un TODO.

const checkbox = context.page.locator(`id=survey-question__${newPath}_${value}__input-checkbox__${value}`);
await checkbox.scrollIntoViewIfNeeded();
await checkbox.click();
await expect(checkbox).toBeChecked();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je me demande s'il ne faudrait pas checker l'état checked à la toute fin seulement? (tout d'in coup qu'on s'attendait à avoir 3 valeurs checked, mais que le widget a "accidentellement" décoché les valeurs cochées précédemment...)

En fait, on peut garder le check ici, et après la boucle for, il faudrait aller chercher les éléments checked et valider qu'ils correspondent à la valeur. Tu peux juste mettre un TODO ici au pire.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bonne idée. C'est fait.

Add inputCheckboxTest
Format testHelper.ts
@samuel-duhaime samuel-duhaime force-pushed the addInputCheckboxTest branch from bf2cf0c to a0bd67c Compare May 23, 2024 19:00
@samuel-duhaime samuel-duhaime requested a review from tahini May 23, 2024 19:03
@tahini tahini merged commit 45abe2e into main May 23, 2024
4 checks passed
@tahini tahini deleted the addInputCheckboxTest branch May 23, 2024 19:32
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
0