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

Website e2e tests #266

Merged
merged 3 commits into from Jan 2, 2023
Merged

Conversation

othrayte
Copy link
Collaborator

@othrayte othrayte commented Jan 2, 2023

Adds some end to end tests of website functionality, these ones are desired to function as smoke tests that check that interaction with the backend is functioning, #181. In think there is a question here about whether this PR completes #181 or is just a step towards it.

At the moment there is limited ability to check that things are actually succeeding and that is something that we probably want to look more into. For example when submitting a new user reply there isn't a clear way to prove that the reply was recorded, even if we interact directly with the backend. If anyone has suggestions here it could greatly improve the quality of the tests.

Secondly I've designed these e2e tests as a minimal "smoke" test of the API interaction with the backend rather than a comprehensive test of all website<->backend API interactions as that will probably be handled more performantly using the proposed contract tests from #204 (which I admit to not knowing much about).

Note, there is a bit of duplication between some of the task pages and between their e2e tests, maybe that is something we can look at refactoring later.

Copy link
Collaborator

@fozziethebeat fozziethebeat left a comment

Choose a reason for hiding this comment

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

This looks pretty good after the build break is resolved.

website/cypress/e2e/auth/signin.cy.ts Outdated Show resolved Hide resolved
Fixed issue where existing sign in test fails due to the existence of dev test login.

Added reusable cy.signInWithEmail() to login before testing rest of UI.
These are intended to function as a minimal smoke test that the API interaction with the backend is functional.
Like the previous commit, these are intended to function as a minimal smoke test that the API interaction with the backend is functional.
@fozziethebeat
Copy link
Collaborator

This looks really good and simple! Before closing out the bug, can you add some README documentation in a follow up PR so that other's know how to setup a test (and how to insert the cy-data tags when creating components)?

@fozziethebeat fozziethebeat merged commit ad0c487 into LAION-AI:main Jan 2, 2023
@othrayte othrayte deleted the website-e2e-tests branch January 2, 2023 10:52
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.

None yet

2 participants