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

Updates to storage ui test suite #1433

Merged
merged 16 commits into from
Aug 19, 2021
Merged

Updates to storage ui test suite #1433

merged 16 commits into from
Aug 19, 2021

Conversation

asnaith
Copy link
Member

@asnaith asnaith commented Aug 10, 2021

Work towards #1283 (still a wip but submitting these changes now to keep the PRs small).

  • Update the storage ui test suite to use cypress session management like what was previously implemented for files
  • Updated some of the tests to match current behaviour (they haven't been running so some things eg default navigation changed)
  • Used safeClick on modal dialog confirmation buttons for increased reliability

Notes:

Still not ready to enable these tests because of issues with the apiTestHelper (see #1434). It is either not clearing pins (or it is but they aren't removed straight away because of the queuing system, I'm really not sure what's happening with it at the moment). This going to make it hard to build reliable ui tests for CID Pinning at least in the current structure. For example at the moment

  • I can't assert a CID was successfully pinned because there might already be one pinned at the beginning of the test so counting on the rows could be unreliable

  • I can't assert that the CID was deleted with the current test because the pin deletion is usually queued for a indeterminate period of time and not instantly removed from the UI (although sometimes it is so we can't just assert on "queued" status either!).

authenticationPage.showMoreButton().click()
authenticationPage.detectedWallet().click()
authenticationPage.web3SignInButton().safeClick()
bucketsPage.bucketsHeaderLabel().should("be.visible")
Copy link
Member Author

@asnaith asnaith Aug 10, 2021

Choose a reason for hiding this comment

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

Just an FYI - The last line here is required so that we don't exit the session block early before we have fully logged in, prevents us exiting before the session data is created and saved.

We haven't been waiting for the header label on Files in the session block because we also have to enter a password and not save the browser so I think that gives us a little bit of extra time to save the token. To avoid any potential timing issues though I’ve added a similar check for Files too

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks, the save browser modal in Files is certainly the one that helped (just a FYI because before the password is entered we haven't reconstructed the key, and the there's prob. not much of interest in the local and session storages.)

Copy link
Member Author

Choose a reason for hiding this comment

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

@Tbaut Ah, good to know the detail. Thanks 👍

@render
Copy link

render bot commented Aug 10, 2021

@render
Copy link

render bot commented Aug 10, 2021

@render
Copy link

render bot commented Aug 10, 2021

Copy link
Collaborator

@Tbaut Tbaut left a comment

Choose a reason for hiding this comment

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

Nice! I also removed rimraf now that we don't use it anywhere else :)

@Tbaut
Copy link
Collaborator

Tbaut commented Aug 12, 2021

Just a note, the 1st test is always failing

Bucket management
| desktop
| 1) can create a bucket

@asnaith
Copy link
Member Author

asnaith commented Aug 12, 2021

Just a note, the 1st test is always failing

Bucket management
| desktop
| 1) can create a bucket

Oops, that was my mistake. I didn't re-add the it.skip after updating the tests. We can't enable it at the moment until the apiTestHelper is clearing the storage bucket state (separate ticket). I've re-added the skip again

@asnaith asnaith enabled auto-merge (squash) August 18, 2021 20:37
@asnaith asnaith added the Status: Review Needed 👀 Added to PRs when they need more review label Aug 18, 2021
@asnaith asnaith merged commit 781f3d7 into dev Aug 19, 2021
@asnaith asnaith deleted the mnt/update-storage-tests-1283 branch August 19, 2021 09:07
@FSM1 FSM1 mentioned this pull request Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Review Needed 👀 Added to PRs when they need more review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants