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

Cypress testing #4232

Merged
merged 11 commits into from
Nov 5, 2020
Merged

Cypress testing #4232

merged 11 commits into from
Nov 5, 2020

Conversation

jptissot
Copy link
Member

Having fun with some e2e testing using Cypress

@jptissot jptissot force-pushed the jptissot/cypress branch 3 times, most recently from 7367ca0 to 6d00a3f Compare September 12, 2019 19:13
@jptissot jptissot force-pushed the jptissot/cypress branch 2 times, most recently from 0a3d5b6 to 68063b8 Compare September 24, 2019 00:34
@jptissot
Copy link
Member Author

@sebastienros What do you think about writing a npm package for the generic functions and publishing it as a seperate npm package ? This would allow people that write sites with OC to easily write e2e tests for their sites by reusing some of our functions to interact with the admin UI ?

@sebastienros
Copy link
Member

No new npm package to maintain. Not soon at least. One more thing to maintain, publish, take PRs on ...

@jptissot jptissot force-pushed the jptissot/cypress branch 3 times, most recently from cf849d7 to e153579 Compare October 12, 2019 02:06
@jptissot
Copy link
Member Author

I think I will revive this PR. Maybe split the work of adding id's, classes or data attributes to elements of the admin UI in smaller Pr's to keep this one targeted.

@jptissot jptissot force-pushed the jptissot/cypress branch from e153579 to fe59919 Compare May 1, 2020 22:03
@jptissot
Copy link
Member Author

jptissot commented Oct 19, 2020

I am writing a set of commands / utilities for Cypress in a separate package that can be shared between projects.
See https://github.com/jptissot/cypress-orchardcore

@jptissot jptissot marked this pull request as ready for review October 19, 2020 18:52
@jptissot
Copy link
Member Author

This is ready for review. Need to investigate why the site(s) do not run in https.

Once this is merged, I will make other smaller pr's that improve the selectors of the admin interface along with implementing supporting commands in https://github.com/jptissot/cypress-orchardcore

@Skrypt
Copy link
Contributor

Skrypt commented Oct 19, 2020

I will need to try it to review it. Might take some time.

@hishamco
Copy link
Member

@jptissot just a very late question why you choose Cypress over normal ASP.NET Core testing? Is it access the HTML elements or is there something further I don't aware of

Thanks

@Skrypt
Copy link
Contributor

Skrypt commented Oct 19, 2020

automated-test-pyramid

We have unit tests, integration tests coming from ASP.NET Core testing. But we use https://github.com/puppeteer/puppeteer to run functional (e2e) tests. I think Cypress is just pushing those functional test one step further.

@hishamco
Copy link
Member

hishamco commented Oct 19, 2020

Thanks Jasmin, is it something like Selenium?

@jptissot
Copy link
Member Author

jptissot commented Nov 3, 2020

Todo

  • Docs on how to setup cypress in your project
  • Visual studio solution

@Skrypt
Copy link
Contributor

Skrypt commented Nov 4, 2020

On the OrchardCore.sln file there's a solution folder in which we should remove the old linked files and instead add the Cypress tests. /test/Functional/*

jptissot and others added 11 commits November 5, 2020 16:35
Maybe there is a better way to do this, but the cypress runner does not
currently support paging.
Include commands in this project
Add vistual studio solution
@jptissot jptissot merged commit e4b5e6b into dev Nov 5, 2020
@delete-merged-branch delete-merged-branch bot deleted the jptissot/cypress branch November 5, 2020 23:04
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.

4 participants