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

Add Laravel Dusk for e2e browser testing #2589

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

williamjallen
Copy link
Collaborator

Cypress works very well and is easy to use, but the inability to interact with the database while testing makes it difficult to write thorough tests. This PR adds support for Laravel Dusk, Laravel's Selenium wrapper, which allows us to interact with the database and make submissions between test cases. It also truncates the database tables after every test case. Even though it isn't as easy to use, it will allow us to write better test cases and eliminate the need to mock the GraphQL API.

@williamjallen
Copy link
Collaborator Author

This failure appears to be caused by a Laravel bug in the DatabaseTruncation truncation trait relating to the conflict between our userspace user table, and Postgres' user table. This has been a pain point in the past, so I will investigate renaming this table to users instead.

@williamjallen williamjallen marked this pull request as draft December 4, 2024 13:48
github-merge-queue bot pushed a commit that referenced this pull request Dec 10, 2024
CDash currently stores user information in the `user` table.
Unfortunately, this name conflicts with the default Postgres `user`
table, leading to confusion and extra logic to quote the `user` name
whenever it is used. As discussed in
#2589 (comment),
Laravel's DatabaseTruncation trait contains a bug where the table name
is not quoted properly. That provided the motivation necessary to change
the table name in CDash so we don't run into this issue in the future.
@williamjallen williamjallen marked this pull request as ready for review December 12, 2024 15:28
Copy link
Member

@josephsnyder josephsnyder left a comment

Choose a reason for hiding this comment

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

LGTM!

@josephsnyder josephsnyder added this pull request to the merge queue Dec 17, 2024
Merged via the queue into Kitware:master with commit 5893da0 Dec 17, 2024
6 checks passed
@williamjallen williamjallen deleted the laravel-dusk branch December 17, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants