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

Pool and direct deal creation flow tests #969

Open
wants to merge 110 commits into
base: e2e-devops
Choose a base branch
from

Conversation

0xDmitry
Copy link
Contributor

@0xDmitry 0xDmitry commented Mar 3, 2023

No description provided.

alextheboredape and others added 17 commits December 8, 2022 11:27
* InvestorsModal now sortable by AmountInvested or UserAddress

* Remove orderBy function from useAelinInvestors hook

* Rename orderBy to newSortBy for clarity
* Fix default font size

* Fix maintenance message

* Fix history empty state

* Fix nft selector

* fix nft selector

* Fix small font issues

* Fix font size of the vest page
* Fix default font size

* Upgrade to latest web3-onboard version

* Fix merge conflict
* Fix font size

* fix loader
@0xDmitry 0xDmitry requested a review from 0xlinus March 3, 2023 17:50
@0xDmitry 0xDmitry self-assigned this Mar 3, 2023
@vercel
Copy link

vercel bot commented Mar 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aelin-ui-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2023 8:11pm

Comment on lines +26 to +27
this.allowlistAddress = '0x0000000000000000000000000000000000000000'
this.allowlistAmount = 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can't we use faker to add some level of randomness?

}
}

assertNoCapCheckBox(checked) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

All assertions should be done in the spec file. Leave this for simple getters and pool logic methods

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Strange requirement. It will lead to a lot of repetitive checks and bloated spec files. What's wrong with aggregation of asserts in util functions like this one?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Now it looks pretty clean and makes sense. But as this gets bigger and more tests are added, this might get out of control will too many utils/helpers, and making the level of abstraction too high. Anyway this is not critical, we could leave like that and see if in the future we need a refactor

}
}

assertDetails(fakeDirectDeal, step = CreateDirectDealSteps.VestingSchedule, expected) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that this is a bit overkill.. why dont just add the code for each test directly?
You will be adding more lines/less clean, but you will end up removing unnecessary abstraction imo.
And again... we are mixing concerns here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, that's arguable... I see tests as a good source of requirements about how app should work, so readability is very helpful not only to write/fix them but also to onboard new contributors and discover use cases in general

Copy link
Contributor Author

@0xDmitry 0xDmitry Mar 7, 2023

Choose a reason for hiding this comment

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

But I agree that there are definitely a trade off between more readable but more complex code and less readable but more reliable code, so we just need to agree which path we want to lean to and what price to pay

@0xlinus
Copy link
Collaborator

0xlinus commented Mar 7, 2023

I think this is very good overall... but there are a couple of things we need to decide how to tackle:

  • Not really important: Mixing concerns. I'd like to keep separated app Pages (for getting components or executing actions, like clicks, type, etc) from actual tests. That could get out of control pretty quickly and sometimes you have no idea what the test is actually doing. I understand the why you did it of course, makes perfect sense. I'm just concern about how this will play out in future tests and when this gets bigger.
  • Important: This takes a ridiculous amount of time. Although I 100% agree to refresh the page for each test to have a clean state, this takes too much. Maybe we could create a helper to reset all inputs or something diff... but refresh the page is definitely too much
  • Important 2: We should have left this clear before probably, but there are a lot of tests that are not reaaaaallly important. We should be adding E2E tests of flows that could potentially end up in a broken/wrong pool/deal causing $$ loss for the users. So I really don't mind if there are things that are not perfectly displayed in the summary component for example.
  • Not important 2: There are some flaky tests, most of them due to date mismatch.
    image

0xDmitry and others added 28 commits May 11, 2023 20:54
* ethlizards design  (#955)

* add ethliz theme

* fix blur effect

* fix background

* add pool ethlizards screen

* fix review

* fix modal and gradients

* add ethlizrd logo

* update logo

* fix merge conflict

* Ethlizards theme improvements

* change ETHLIZARDS_VOUCHER_ENS value

* Fix weird CI issue

* tidy up

* design improvements

* tidy up

* tidy up

* remove stake section from sidebar

* Add lizards to pool/deal creation boxes

---------

Co-authored-by: James <[email protected]>
* remove stake section from sidebar

* Sidebar - stake rollback
* attempt to fix CI issue (#1009)

* Stats see more button redirects to pools filtered by network as well (#1004)

* Stats see more button redirects to pools filtered by network as well

* Remove unused sponsors/List component

---------

Co-authored-by: Atatakai <[email protected]>

* Add CONTRIBUTING.md (#1023)

* Use IPFS Gateway as default option to get Merkle tree data (#1028)

* Remove jest warnings issues (#1026)

* Add Sepolia network (#1029)

* Add Ethlizards theme (#1025)

* ethlizards design  (#955)

* add ethliz theme

* fix blur effect

* fix background

* add pool ethlizards screen

* fix review

* fix modal and gradients

* add ethlizrd logo

* update logo

* fix merge conflict

* Ethlizards theme improvements

* change ETHLIZARDS_VOUCHER_ENS value

* Fix weird CI issue

* tidy up

* design improvements

* tidy up

* tidy up

* remove stake section from sidebar

* Add lizards to pool/deal creation boxes

---------

Co-authored-by: James <[email protected]>

* Bring Stake section back to the Sidebar (#1027)

* remove stake section from sidebar

* Sidebar - stake rollback

---------

Co-authored-by: Tanya <[email protected]>
Co-authored-by: Atatakai <[email protected]>
Co-authored-by: Dmitry <[email protected]>
Co-authored-by: James <[email protected]>
* Lizards theme - Fix background image

* fix grammar
* Fix Buy Aelin Optimism link

* Fix
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.

6 participants