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

Lexicon new project tests #1456

Merged
merged 6 commits into from
Oct 5, 2022
Merged

Lexicon new project tests #1456

merged 6 commits into from
Oct 5, 2022

Conversation

JeanneSon
Copy link
Contributor

@JeanneSon JeanneSon commented Sep 12, 2022

Description

Summary

These tests test

  • create a new project
  • navigate between the different steps
  • set-up a project from language depot
  • upload a file as initial data
  • language picker

Details

The following tests have been converted to playwright

Lexicon E2E New Project wizard app
✓ admin can get to wizard
✓ manager can get to wizard
✓ setup: user login and page contains a form
 
✓ cannot see Back or Next buttons
✓ can create a new project -> Can navigate to new project form and back
✓ can go back to Chooser page -> Can navigate to new project form and back
✓ can select Send and Receive -> Can navigate to Send and Receive form and back
✓ can go back to Chooser page -> Can navigate to Send and Receive form and back
 
✓ can get back to Send and Receive Credentials page
✓ cannot move on if Password is empty
✓ cannot move on if username is incorrect -> Cannot move on if username is incorrect and can go back to Chooser page, user and password preserved
✓ can go back to Chooser page, user and pass preserved -> Cannot move on if username is incorrect and can go back to Chooser page, user and password preserved
✓ cannot move on if Login is empty
✓ cannot move on if credentials are invalid
✓ can move on when the credentials are valid -> Can move on when the credentials are valid but cannot move further if no project is selected
✓ cannot move on if no project is selected -> Can move on when the credentials are valid but cannot move further if no project is selected
✓ cannot move on if not a manager of the project
✓ can move on when a managed project is selected
 
✓ can create a new project -> Cannot move on if name is invalid
✓ cannot move on if name is invalid -> Cannot move on if name is invalid
✓ finds the test project already exists
✓ with a cleared name does not show an error but is still invalid
✓ can verify that an unused project name is available
✓ can not edit project code by default
✓ can edit project code when enabled
✓ project code cannot be empty; does not show an error but is still invalid
✓ project code can be one character
✓ project code cannot be uppercase
✓ project code cannot start with a number
✓ project code cannot use non-alphanumeric -> Project code cannot use non-alphanumeric and reverts to default when Edit-project-code is disabled
✓ project code reverts to default when Edit-project-code is disabled -> Project code cannot use non-alphanumeric and reverts to default when Edit-project-code is disabled

The following tests were merged into one large test
Can create project, initial data page with upload & verify data
✓ can create project
✓ cannot see back button and defaults to uploading data -
✓ cannot upload large file
✓ cannot upload jpg
✓ can upload zip file
✓ displays stats
✓ displays non-critical errors
✓ can go to lexicon

✓ create: new empty project -> Create: new empty project & can skip uploading data 
✓ can skip uploading data -> Create: new empty project & can skip uploading data 
 
The following tests were merged into one large test
Primary Language page
✓ can go back to initial data page (then forward again)
✓ cannot move on if language is not selected
✓ can select language
✓ can search, select and add language

Deleted tests
✓ can clone project
✓ cannot move on while cloning

For details/remarks regarding the conversion of the tests, refer to the spreadsheet; https://docs.google.com/spreadsheets/d/1w9wjfm-02QHLhv0ObPAKKlqnDWeag379GIXwOcRU4W0/edit#gid=0

Type of Change

  • E2E test

Checklist

  • I have performed a self-review of my own code
  • I have reviewed the title/description of this PR which will be used as the squashed PR commit message
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works

@JeanneSon JeanneSon self-assigned this Sep 12, 2022
@JeanneSon JeanneSon added the testing Pertaining to unit or e2e testing label Sep 12, 2022
@github-actions
Copy link

github-actions bot commented Sep 12, 2022

Unit Test Results

368 tests   368 ✔️  7s ⏱️
    1 suites      0 💤
    1 files        0

Results for commit 02a3999.

♻️ This comment has been updated with latest results.

@JeanneSon JeanneSon force-pushed the chore/lexiconNewProjectTests branch 2 times, most recently from 74a322f to a0e4ce9 Compare September 15, 2022 11:46
@JeanneSon JeanneSon changed the title start converting lexicon-new-project tests Lexicon new project tests Sep 26, 2022
@JeanneSon JeanneSon marked this pull request as ready for review September 26, 2022 13:16
@JeanneSon JeanneSon enabled auto-merge (squash) September 26, 2022 13:45
Copy link
Collaborator

@myieye myieye left a comment

Choose a reason for hiding this comment

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

Didn't look through everything, but I need to stop for today. If the PR is still open on Wednesday I'll keep looking 😁.

test/e2e/components/mock-upload.component.ts Outdated Show resolved Hide resolved
test/e2e/pages/entries-list.page.ts Show resolved Hide resolved
test/e2e/lexicon-new-project.spec.ts Outdated Show resolved Hide resolved
test/e2e/lexicon-new-project.spec.ts Outdated Show resolved Hide resolved
test/e2e/pages/new-lex-project.page.ts Outdated Show resolved Hide resolved
@alex-larkin alex-larkin added the engineering Tasks which do not directly relate to a user-facing feature or fix label Sep 29, 2022
@megahirt
Copy link
Collaborator

@myieye I will approve this PR if you can fix it up per your comments. If you have ideas how to make the two lines that Hanna marked as flaky, that would be great as well. Thanks!

@megahirt megahirt added the blocked The task cannot be completed without additional input or help label Sep 30, 2022
@megahirt
Copy link
Collaborator

I'm marking this as blocked until @myieye can pick this work up.

@myieye myieye force-pushed the chore/lexiconNewProjectTests branch from 39dbf40 to 899038a Compare October 3, 2022 15:20
@myieye myieye removed the blocked The task cannot be completed without additional input or help label Oct 3, 2022
@myieye
Copy link
Collaborator

myieye commented Oct 3, 2022

@myieye I will approve this PR if you can fix it up per your comments. If you have ideas how to make the two lines that Hanna marked as flaky, that would be great as well. Thanks!

I wasn't able to make the flaky lines fail. So, we'll just wait and see.

JeanneSon and others added 6 commits October 4, 2022 11:00
Details on how to run tests using either the Playwright VSCode extension,
a make command, or mere commands in the command line.
The flaky tests are
* Manager can delete if owner
* Can successfully change user\'s password after form submission
E.g. "createUser" causes errors somtimes depending on user state and it's not at all obvious.
@myieye myieye force-pushed the chore/lexiconNewProjectTests branch from 13f1b9c to 02a3999 Compare October 4, 2022 09:00
@JeanneSon JeanneSon merged commit eb13dc5 into develop Oct 5, 2022
@JeanneSon JeanneSon deleted the chore/lexiconNewProjectTests branch October 5, 2022 10:26
@longrunningprocess
Copy link
Contributor

I confirmed these tests passed on their run toward staging: https://github.com/sillsdev/web-languageforge/actions/runs/3189085647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering Tasks which do not directly relate to a user-facing feature or fix testing Pertaining to unit or e2e testing
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants