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

Chore: Playwright test improvements #28100

Merged
merged 7 commits into from
Feb 22, 2023
Merged

Conversation

rodrigok
Copy link
Member

@rodrigok rodrigok commented Feb 18, 2023

This changes aims to simplify the creation of users for the tests and the usage of those users and sessions.

It replaces the file sessions by a global map of preexistent users containing the same information that were saved on files.

It replaces the initial login flow (via UI, which was slowing down the test startup) by a pre seed of those users and sessions containing a tokens generated based on the users's usernames.

It was necessary to make a small change on e2e tests to handle the logout, which was removing the session token from the database and to handle the encryption key persistence between tests.

It improves the DRY goal on omnichannel tests making the function to create context a generic one.

It improve the typing of the ILoginToken and adapt the necessary places.

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

@rodrigok rodrigok force-pushed the improve/playwrigt-sessions branch 2 times, most recently from ab3f660 to d85b15a Compare February 18, 2023 15:49
@rodrigok rodrigok force-pushed the improve/playwrigt-sessions branch from d85b15a to ea6a30f Compare February 18, 2023 16:02
@codecov
Copy link

codecov bot commented Feb 18, 2023

Codecov Report

Merging #28100 (4ac16d6) into develop (4b2581d) will decrease coverage by 0.06%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #28100      +/-   ##
===========================================
- Coverage    44.88%   44.83%   -0.06%     
===========================================
  Files          766      766              
  Lines        14893    14894       +1     
  Branches      2067     2068       +1     
===========================================
- Hits          6684     6677       -7     
- Misses        7918     7925       +7     
- Partials       291      292       +1     
Flag Coverage Δ
e2e 44.78% <0.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@rodrigok rodrigok marked this pull request as ready for review February 18, 2023 17:04
@rodrigok rodrigok requested review from a team as code owners February 18, 2023 17:04
@rodrigok rodrigok force-pushed the improve/playwrigt-sessions branch from 29ba679 to 4ac16d6 Compare February 20, 2023 14:18
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: needs QA labels Feb 22, 2023
@ggazzo ggazzo merged commit 187a9c9 into develop Feb 22, 2023
@ggazzo ggazzo deleted the improve/playwrigt-sessions branch February 22, 2023 14:23
@sampaiodiego sampaiodiego mentioned this pull request Mar 9, 2023
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA skipped stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants