feat(cypress) Update cypress to use typescript (POC) #13321
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a POC of updating our cypress project to use typescript. This updates all of the scaffolding we need to change and creates a duplicate
v2_home
test but in typescript using a new method for keeping test functions clean and reusable - the class based approach.Upgrading to typescript has a bunch of benefits:
On top of this upgrade I mention adding new ways to modularize and organize our reusable cypress methods. check out
HomePage.ts
which exports a class we use for ourv2_home.ts
test. This method can be adapted and reused all over the place. We can consolidate methods into classes likeDataset.ts
which includes all of the common dataset utilities (ie. go to dataset page, go to different tabs on a dataset, add tags in the sidebar etc.). With this we will be able to remove functions from our overly bloatedcommands.ts
file which should only include high level system commands.This is not changing anything more than what I mentioned. We will need to continue and iterate on making things easier to reuse and more understandable. This is a good start though.