-
Notifications
You must be signed in to change notification settings - Fork 7
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
Added new options to admin UI for Prep BoF #144
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Needed to support some changes in the unit tests.
Modified DBO::getPrepBoF so it can return false if a new configuration option is set. Modified Results::bookPrepBoF to return true if it scheduled a Prep BoF, or false if not (based on the return value of DBO::getPrepBoF). Also modified it to schedule the Prep BoF for the LAST room. Updated Results::fillBooking to schedule an additional workshop if the PrepBof was not scheduled. Updated Results::bookWorkshops to check the return value of bookPrepBoF, and pass it along to fillBooking, so its changes work. Updated all tests for these changes.
This is the option used by the previous commit to determine if the Prep BoF should be scheduled or not. Also added/updated unit tests for setting this option.
…ular slot/room. Scheduling for a particular slot/room still needs back-end support. Unit tests for the UI and integration tests still need to be added, too.
…or the Prep BoF Also changed the UI some to handle differences in the back-end from the original expectation. Added phpunit tests for the new functionality. UI tests still must be added. There are two funny things going on here: 1) "Default" is added to the end of the UI as an explicit default setting for both location and round. This prevents weirdness with adding/deleting rounds/locations -- if "Default" was set, then adding and deleting rounds/locations won't change that. 2) Because PHP's intval() returns 0 on errors, we need to reserve 0 as an error condition. This means that when storing data into the database, we have to use a 1-based index. All API calls assume a 0-based index which should be more intuitive for developers. The 1-based index only affects storage; the DBO class automatically adjusts between 0-based and 1-based indices.
These include pure-UI tests as well as end-to-end tests. The new end-to-end tests provide some example and framework for adding more end-to-end tests to check DB values after making changes. Updated Cypress to version 5 (version 7 is the latest, but it looks like 6 & 7 will require some invasive changes to existing tests, so updates to 6 or 7 should be their own commit and PR). This also required adding typescript to the dependencies. Running npm update (when updating cypress) also updated a few other packages by a minor revision.
tpokorra
approved these changes
Jun 9, 2021
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.
Thank you, this looks great!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See comments on issue #136. This is everything but the integration tests, which are rather important, since there's always a chance I have a disconnect somewhere and the UI doesn't actually work, even though the unit tests all pass. :)
I should have integration tests added to this PR early next week.