-
Notifications
You must be signed in to change notification settings - Fork 3
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
End to End tests #157
base: master
Are you sure you want to change the base?
End to End tests #157
Conversation
src/main/resources/db/migration/V3_1__drop_appuser_name_col.sql
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The factoring out is optional, but the other changes are small and probably good to make before we merge.
src/test/java/edu/ucsb/cs56/ucsb_open_lab_scheduler/end2end/AdminPageEnd2EndTest.java
Outdated
Show resolved
Hide resolved
public class AdminPageEnd2EndTest { | ||
|
||
static { | ||
System.setProperty("spring.security.oauth2.client.provider.wiremock.authorization-uri", "http://localhost:8077/oauth/authorize"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder whether we should factor this out into a test helper class support method... basically everything in this static block...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the factoring out is optional for merging.. but still a good idea...
webDriver = new ChromeDriver(options); | ||
|
||
// Configure mock oauth endpoints | ||
mockOAuth2Provider.stubFor(get(urlPathEqualTo("/favicon.ico")).willReturn(notFound())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might also be a good candidate to be factored out into some kind of test helper...
src/test/java/edu/ucsb/cs56/ucsb_open_lab_scheduler/end2end/AdminPageEnd2EndTest.java
Outdated
Show resolved
Hide resolved
I need to check if both PRs work with Jacqui's changes to the DB migrations as the error in the tests at the moment is due to the migrations. |
This PR adds end-to-end testing with selenium and a mock oauth provider. We also have additional seed data so that we can mock the login flow for an admin user. This PR also adds/modifies some ids for html elements to make them easier to find with Selenium tests