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

Added new options to admin UI for Prep BoF #144

Merged
merged 8 commits into from
Jul 27, 2021

Conversation

franc6
Copy link
Collaborator

@franc6 franc6 commented Jun 4, 2021

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.

franc6 added 8 commits June 4, 2021 19:46
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.
@franc6 franc6 marked this pull request as ready for review June 7, 2021 23:41
Copy link
Member

@tpokorra tpokorra left a 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!

@tpokorra tpokorra merged commit 1b1b59d into ICCM-EU:master Jul 27, 2021
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.

2 participants