Skip to content

Add UI tests #996

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

Open
jyn514 opened this issue Aug 22, 2020 · 2 comments
Open

Add UI tests #996

jyn514 opened this issue Aug 22, 2020 · 2 comments
Labels
A-frontend Area: Web frontend C-technical-debt Category: This makes the code harder to read and modify, but has no impact on end users S-needs-design Status: There's a problem here, but no obvious solution; or the solution raises other questions

Comments

@jyn514
Copy link
Member

jyn514 commented Aug 22, 2020

Would have been very helpful to catch #992, #935, the issues from #981.

@jyn514 jyn514 added A-frontend Area: Web frontend S-needs-design Status: There's a problem here, but no obvious solution; or the solution raises other questions C-technical-debt Category: This makes the code harder to read and modify, but has no impact on end users labels Aug 22, 2020
@Kixiron
Copy link
Member

Kixiron commented Aug 22, 2020

I've actually been looking into this for a while, but it's mostly blocked on full build tests (#822)
There's two real routes, one is traditional programmatic browsers where you write code that emulates a user, and make sure everything does what's expected and the other is via snapshot testing

Programmatic interaction can be very fragile, since it involves a lot of querying css selectors which tend to not like doing what they're told. Most involve containers of some kind, but that also applies to snapshot tests because they need a rendering engine of some sort.
These are a few of the promising libraries I've seen for testing clients, I think thirtyfour is the most promising since it has the most features and seems to be the most widely used. It also has the advantage of being able to take screenshots, so we could potentially get the best of both worlds with being able to interact well with the site while also having resilient tests

The second method I've seen is by snapshotting. This can be achieved with thirtyfour (as mentioned above), but @GuillaumeGomez has also been working on a snapshot testing library for rustdoc, but I don't know where in development he is right now

@GuillaumeGomez
Copy link
Member

It's useable. What might be missing is what I didn't need until now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Web frontend C-technical-debt Category: This makes the code harder to read and modify, but has no impact on end users S-needs-design Status: There's a problem here, but no obvious solution; or the solution raises other questions
Projects
None yet
Development

No branches or pull requests

3 participants