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

Test file upload #1035

Merged
merged 11 commits into from
May 20, 2021
Merged

Test file upload #1035

merged 11 commits into from
May 20, 2021

Conversation

Tbaut
Copy link
Collaborator

@Tbaut Tbaut commented May 18, 2021

closes #1021

  • web3login
  • click on "upload files"
  • select 2 files
  • click on cancel
  • open the modal again
  • select 2 files
  • click on a cross to remove a file in the upload list
  • select a new file
  • perform the upload
  • verify that the files uploaded are listed in the UI (should be 2).

Sugar on the cake, extend the web3Login method to be able to clean the csf bucket programmatically, so that we land on a clear ground and our tests aren't flaky.

@Tbaut Tbaut requested review from RyRy79261, tanmoyAtb and FSM1 May 18, 2021 15:54
@render
Copy link

render bot commented May 18, 2021

@Tbaut Tbaut added the Status: Review Needed 👀 Added to PRs when they need more review label May 18, 2021
@FSM1
Copy link
Contributor

FSM1 commented May 18, 2021

Sugar on the cake, extend the web3Login method to be able to clean the csf bucket programmatically, so that we land on a clear ground and our tests aren't flaky.

Just a thought, but if we want unique, reporoducible tests, it is much easier to just generate a random private key for each run

@Tbaut
Copy link
Collaborator Author

Tbaut commented May 18, 2021

Yup, this is something I thought about, but the whole login flow then takes much longer. But we can test this out

Copy link
Contributor

@tanmoyAtb tanmoyAtb left a comment

Choose a reason for hiding this comment

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

The tests look great!
just the one comment about className

@Tbaut
Copy link
Collaborator Author

Tbaut commented May 19, 2021

Thanks Tanmoy, we discussed about it with @FSM1 and @asnaith yesterday, we should find a better way than classes, and ideally pass data-cy around. I'll check it out.

@Tbaut Tbaut requested a review from asnaith May 19, 2021 08:17
@Tbaut
Copy link
Collaborator Author

Tbaut commented May 19, 2021

I'm giving up on the idea to use the api client module. I agree it would be much better, but this implies to have the right pre-processor for TS to get transpiled.. I have a good chunk wired up here, but I can't manage to make it work: https://github.com/ChainSafe/files-ui/compare/feat/tbaut-upload-test-1021...tbaut-use-clienapi-in-cypress-task?expand=1

If anyone wants to take a look, feel free!
image

Copy link
Contributor

@RyRy79261 RyRy79261 left a comment

Choose a reason for hiding this comment

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

This is obscenely cool

@Tbaut Tbaut removed the Status: Review Needed 👀 Added to PRs when they need more review label May 20, 2021
@Tbaut Tbaut merged commit 0585117 into dev May 20, 2021
@Tbaut Tbaut deleted the feat/tbaut-upload-test-1021 branch May 20, 2021 08:58
@FSM1 FSM1 mentioned this pull request May 27, 2021
FSM1 added a commit that referenced this pull request May 31, 2021
* Fix upload (#1010)
* Bulk operations for Bin (#1017)
* Set the base for Cypress tests and automation (#1016)
* Update Send Feedback Link (#1024)
* only enable logging in non-mainnet env (#1020)
* Optimize tests (#1027)
* fix (#1030)
* File browser context provider (#1026)
* work on selections  (#1029)
* Remove release drafter for now (#1038)
* Update Readme for tests (#1036)
* Delete release_drafter.yml (#1039)
* Bulk DND Move files (#1028)
* Test file upload (#1035)
* Selection removal preventions (#1037)
* Theme selection UI fix (#1033)
* Update API client (#1032)
* make it light and the files blue (#1049)
* React-PDF Worker fixes (#1052)
* Store screenshots and video of failing tests (#1054)
* fix test classes and add rename test (#1055)
* Hide date for folders (#1060)
* s/testId/testid (#1064)
* folder path in route fixed (#1066)
* Resolve File Browser race condition (#1069)
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.

Create a test for file upload
4 participants