Skip to content

Duplicate tooltip CSS rules to fix #939 #4036

Duplicate tooltip CSS rules to fix #939

Duplicate tooltip CSS rules to fix #939 #4036

GitHub Actions / Vitest report succeeded Feb 12, 2024 in 0s

131 passed, 0 failed and 5 skipped

Tests passed successfully

✅ packages/client/junit.xml

136 tests were completed in 35s with 131 passed, 0 failed and 5 skipped.

Test suite Passed Failed Skipped Time
src/tests/auth.test.ts 4✅ 2s
src/tests/cloudFunctions.test.ts 28✅ 25s
src/tests/customerDataTriggers.test.ts 3✅ 4s
src/tests/dataTriggers.test.ts 18✅ 2⚪ 21s
src/tests/firestoreRules.test.ts 0ms
src/tests/integrations.test.ts 1⚪ 0ms
src/tests/migrations.test.ts 2✅ 2⚪ 2s
src/tests/sendEmail.test.ts 4✅ 602ms
src/tests/sendSMS.test.ts 2✅ 2s
src/tests/smokeTest.test.ts 1✅ 5ms
src/features/modal/tests/store.test.ts 7✅ 9ms
src/features/modal/components/FinalizeBookingsDialog/tests/finalizeBookingsUtils.test.ts 0ms
src/features/modal/components/SendBookingsLinkDialog/tests/sendBookingsLinkDialogUtils.test.ts 8✅ 11ms
src/features/notifications/tests/notifications.test.ts 8✅ 9ms
src/pages/customers/tests/customers.test.ts 3✅ 5ms
src/store/actions/tests/attendanceOperations.test.ts 0ms
src/store/actions/tests/authOperations.test.ts 2✅ 8ms
src/store/actions/tests/bookingOperations.test.ts 0ms
src/store/actions/tests/copyPaste.test.ts 0ms
src/store/actions/tests/customerOperations.test.ts 0ms
src/store/actions/tests/slotOperations.test.ts 0ms
src/store/selectors/tests/calendar.test.ts 1✅ 8ms
src/store/selectors/tests/customers.test.ts 3✅ 14ms
src/store/selectors/tests/slots.test.ts 3✅ 7ms
src/store/selectors/attendance/tests/attendance.test.ts 5✅ 7ms
src/store/selectors/bookings/tests/bookings.test.ts 18✅ 30ms
src/utils/tests/utils.test.ts 11✅ 15ms

✅ src/tests/auth.test.ts

✅ Test authentication > Test queryAuthStatus > single secretKey: should successfully query customer status using email
✅ Test authentication > Test queryAuthStatus > multiple secretKeys: should return secretKeys for all customers with matching email
✅ Test authentication > Test queryAuthStatus > should reject if no 'organization' provided
✅ Test authentication > Test queryAuthStatus > should not explode if user is not logged in

✅ src/tests/cloudFunctions.test.ts

✅ Cloud functions > ping > should respond if pinged
✅ Cloud functions > sendMail > should reject if user not authenticated (and not an admin)
✅ Cloud functions > sendMail > should reject to sendEmail if no smtp secrets were set
✅ Cloud functions > sendMail > should reject if email type not provided or not of supported email type
✅ Cloud functions > sendMail > should not reject if user not admin but has secretKey
✅ Cloud functions > sendMail > should reject if no value for organziation provided
✅ Cloud functions > sendMail > should reject if no recipient provided
✅ Cloud functions > finalizeBookings > should remove extended date from customer's data in firestore, and, in effect, customer's bookings
✅ Cloud functions > finalizeBookings > should return an error if no payload provided
✅ Cloud functions > finalizeBookings > should return an error if no organziation, id or secretKey provided
✅ Cloud functions > finalizeBookings > should return an error if customer id and secretKey mismatch
✅ Cloud functions > finalizeBookings > should return an error if customer not found
✅ Cloud functions > acceptPrivacyPolicy > should store the timestamp of confirmation to the customer's structure in the db
✅ Cloud functions > acceptPrivacyPolicy > should return an error if no payload provided
✅ Cloud functions > acceptPrivacyPolicy > should return an error if no organziation, id, secretKey or timestamp provided
✅ Cloud functions > acceptPrivacyPolicy > should return an error if customer id and secretKey mismatch
✅ Cloud functions > acceptPrivacyPolicy > should return an error if customer not found
✅ Cloud functions > customerSelfUpdate > should update customer data in customer collection and then bookings collection by data trigger
✅ Cloud functions > customerSelfUpdate > should return an error if no payload provided
✅ Cloud functions > customerSelfUpdate > should return an error if no organziation, or customer provided
✅ Cloud functions > customerSelfUpdate > should return an error if id or secretKey are not provided in customer object
✅ Cloud functions > customerSelfUpdate > should return an error if customer id and secretKey mismatch
✅ Cloud functions > customerSelfUpdate > should return an error if customer not found
✅ Cloud functions > customerSelfRegister > should create a new customer with data passed in as well as bookings entry
✅ Cloud functions > customerSelfRegister > should return an error if no payload provided
✅ Cloud functions > customerSelfRegister > should return an error if no organization, or customer provided
✅ Cloud functions > customerSelfRegister > should return an error if 'email' nor 'phone' are not provided in customer object
✅ Cloud functions > customerSelfRegister > should validate registration code

✅ src/tests/customerDataTriggers.test.ts

✅ Customer triggers > should apply secretKey and customerId (to customer structure) when a customer record is added
✅ Customer triggers > should create bookings entry (for customer) when a customer record is created
✅ Customer triggers > should update customer's 'bookings' entry when a customer record is updated

✅ src/tests/dataTriggers.test.ts

✅ Cloud functions -> Data triggers -> > createAttendanceForBooking > create booking: interval only
✅ Cloud functions -> Data triggers -> > createAttendanceForBooking > create booking: interval with notes
✅ Cloud functions -> Data triggers -> > createAttendanceForBooking > update booking: interval only
✅ Cloud functions -> Data triggers -> > createAttendanceForBooking > update booking: interval with notes
✅ Cloud functions -> Data triggers -> > createAttendanceForBooking > update booking: notes only
✅ Cloud functions -> Data triggers -> > createAttendanceForBooking > remove booking notes
✅ Cloud functions -> Data triggers -> > createAttendanceForBooking > delete booking
✅ Cloud functions -> Data triggers -> > countSlotsBookings > should increment/decrement numBookings field in slotsByDay for the given slot
⚪ Cloud functions -> Data triggers -> > aggreagateSlots > should create slotsByDay entry for slot on create
⚪ Cloud functions -> Data triggers -> > aggreagateSlots > should update aggregated slotsByDay on slot update
✅ Cloud functions -> Data triggers -> > aggreagateSlots > should remove slot from slotsByDay on slot delete
✅ Cloud functions -> Data triggers -> > createAttendanceForSlot > should create attendance entry for slot (containing only the date) in 'attendance' collection, only on create slot (not on update)
✅ Cloud functions -> Data triggers -> > createAttendanceForSlot > should delete attendance entry for slot when the slot is deleted
✅ Cloud functions -> Data triggers -> > createAttendanceForSlot > should delete attendance entry for slot when the slot is deleted
✅ Cloud functions -> Data triggers -> > registerCreatedOrgSecret > should update 'existingSecrets' in organization data document when secrets get added or removed
✅ Cloud functions -> Data triggers -> > registerCreatedOrgSecret > updates 'smtpConfigured' with respect to smtp config being present in organization data
✅ Cloud functions -> Data triggers -> > createPublicOrgInfo > should update/create general info in organization data to publicOrgInfo collection when organization data is updated
✅ Cloud functions -> Data triggers -> > createAttendedSlotsForAttendance > should update the document in attendedSlots with respect to customer's attendance on slot
✅ Cloud functions -> Data triggers -> > createAttendedSlotsForAttendance > should not create document in attendedSlots collection if customer had booked the slot
✅ Cloud functions -> Data triggers -> > createCustomerStats > should update the customer doc with bookingStats with respect to customer's bookedSlots

✅ src/tests/integrations.test.ts

⚪ Email sending and delivery > should deliver an email with correct message and recipients

✅ src/tests/migrations.test.ts

✅ Migrations > 'pruneSlotsByDay' > should delete all 'slotsByDay' entries not containing any slots
✅ Migrations > 'pruneSlotsByDay' > should not allow access to unauth users
⚪ Migrations > 'deleteOrphanedBookings' > should remove bookings without customer entries
⚪ Migrations > 'deleteOrphanedBookings' > should not allow calls to non-admin

✅ src/tests/sendEmail.test.ts

✅ SendEmail > should construct an email of type send-bookings-link and hand it over for delivery
✅ SendEmail > should construct an email of type send-calendar-file and hand it over for delivery
✅ SendEmail > should construct an email of type send-extended-bookings-date and hand it over for delivery
✅ SendEmail > should use 'emailNameFrom' (if available in org setup) as 'from' attribute

✅ src/tests/sendSMS.test.ts

✅ SendSMS > should construct an email of type send-bookings-link and hand it over for delivery
✅ SendSMS > should construct an email of type send-extended-bookings-date and hand it over for delivery

✅ src/tests/smokeTest.test.ts

✅ Smoke test > Test i18n setup > should initialize i18n with the tests

✅ src/features/modal/tests/store.test.ts

✅ Modal store tests > Open modal action > should add modal to the store state with appropriate component and props
✅ Modal store tests > Open modal action > if the modal is already open, should fail with a warning
✅ Modal store tests > Update modal action > should update an existing modal in the store with the updated props
✅ Modal store tests > Update modal action > should fail silently if updated modal doesn't exist in open modals stack
✅ Modal store tests > Close modal action > should remove the specific modal from store state effectively removing the modal from the screen
✅ Modal store tests > Pop modal action > should pop the latest modal from store state effectively removing the modal from the screen
✅ Modal store tests > Close all modals action > should remove all modals from the state, removing any modal from the screen

✅ src/features/modal/components/SendBookingsLinkDialog/tests/sendBookingsLinkDialogUtils.test.ts

✅ Send bookings link dialog utils > getDialogPrompt > should display 'email' prompt for method = "email" when 'email' defined
✅ Send bookings link dialog utils > getDialogPrompt > should display 'sms' prompt for method = "sms" when 'phone' defined
✅ Send bookings link dialog utils > getDialogPrompt > should display 'no-email' prompt and disable confirmation for method = "email" when 'email' undefined
✅ Send bookings link dialog utils > getDialogPrompt > should display 'no-sms' prompt and disable confirmation for method = "sms" when 'phone' undefined
✅ Send bookings link dialog utils > sendBookingsLink > should call a mail sending cloud function if method = 'email'
✅ Send bookings link dialog utils > sendBookingsLink > should call an SMS sending cloud function if method = 'sms'
✅ Send bookings link dialog utils > sendBookingsLink > should show error notification if function call unsuccessful
✅ Send bookings link dialog utils > getBookingsLink > should return a bookings link taking into account domain name and customer secretKey

✅ src/features/notifications/tests/notifications.test.ts

✅ Notification store table tests > Enqueue action: if queue empty, should enqueue notification and set 'canEvict' to false
✅ Notification store table tests > Enqueue action: if queue not empty and 'canEvict' false, should enqueue new notificaiton at the end of the queue
✅ Notification store table tests > Enqueue action: if queue not empty, but 'canEvict' true, should evict existing notification and replace with the new one
✅ Notification store table tests > Next action: if queue longer than 1, should move to the next notification (by evicting the currently first)
✅ Notification store table tests > Next action: if only one notification in queue, should not evict the notification, but set 'canEvict' to true
✅ Notification store table tests > Evict action: should remove first notification regardless of it being the only one
✅ Notification store table tests > Evict action: should always set 'canEvict' to false when evicting
✅ Notification store table tests > Evict action: should not break on empty queue

✅ src/pages/customers/tests/customers.test.ts

✅ `getNewSubscriptionNumber` function > should return the string '1' when there are no customers
✅ `getNewSubscriptionNumber` function > should return the string '2' if there is a customers with '1'
✅ `getNewSubscriptionNumber` function > should return the string '10' if the largest number present is 9

✅ src/store/actions/tests/authOperations.test.ts

✅ Auth operations > test updating auth state on user changed > should update user auth state to local store
✅ Auth operations > test updating auth state on user changed > should reset the state (perform local logout) if no user is received

✅ src/store/selectors/tests/calendar.test.ts

✅ calendar selector > calendar slots > should return calendar data in correct format

✅ src/store/selectors/tests/customers.test.ts

✅ Customer Selectors > Customers birthdays > should get customers sorted according to their birthday
✅ Customer Selectors > Customers birthdays > should omit customers with no birthday specified
✅ Customer Selectors > Athletes approval > should get customers with no categories

✅ src/store/selectors/tests/slots.test.ts

✅ Slot selectors >  > Test 'getAdminSlots' selector > should get all slots for given week
✅ Slot selectors >  > Test 'getAdminSlots' selector > should return empty days if no slots in store ('slotsByDay' = null)
✅ Slot selectors >  > Test 'getAdminSlots' selector > should get all slots for given week even if passed a non-week-start date

✅ src/store/selectors/attendance/tests/attendance.test.ts

✅ Selectors -> > Test 'getSlotsWithAttendance' > should get slots for current day (read from store) with customers attendance (sorted by booked interval) data for each slot
✅ Selectors -> > Test 'getSlotAttendance' > should handle missing 'slotId' in attendance
✅ Selectors -> > Test 'getSlotAttendance' > should return attendance for 'slotId'
✅ Selectors -> > Test 'getMonthAttendanceVariance'
✅ Selectors -> > Test 'getBookedIntervalsCustomers' > should return list of intervals as keys with customer names as value

✅ src/store/selectors/bookings/tests/bookings.test.ts

✅ Selectors -> > 'getSlotsForCustomer' >  > should get slots for a month with respect to 'startDate' and provided category
✅ Selectors -> > 'getSlotsForCustomer' >  > should filter out slots booked at full capacity
✅ Selectors -> > 'getSlotsForCustomer' >  > should filter out slots booked at full capacity
✅ Selectors -> > Test 'getCanBook' selector > should allow admin to book at all times
✅ Selectors -> > Test 'getCanBook' selector > should allow booking if the booking deadline hasn't passed
✅ Selectors -> > Test 'getCanBook' selector > should not allow booking if the booking deadline for the month is passed
✅ Selectors -> > Test 'getCanBook' selector > should allow booking if within extended date period
✅ Selectors -> > Test 'getCanBook' selector > should not allow booking if in extended date period, but extended date has passed
✅ Selectors -> > Test 'getCanBook' selector > edge case: should not allow booking if extended date exists for future month, but current month deadline has already passed
✅ Selectors -> > getShouldDisplayCountdown > should display countdown for currently observed month (based on redux date)
✅ Selectors -> > getShouldDisplayCountdown > should display countdown for second deadline if extended date belongs to observed month
✅ Selectors -> > getShouldDisplayCountdown > should not display any countdown for admin
✅ Selectors -> > getShouldDisplayCountdown > should display bookings are locked message (instead of countdown) if bookings for this period are locked
✅ Selectors -> > getMonthEmptyForBooking > should return true if there are no slots in a month
✅ Selectors -> > getMonthEmptyForBooking > should return true if there are slots in a month, but not of the required category
✅ Selectors -> > getMonthEmptyForBooking > should return false if there are slots available for booking in the required month for the required category
✅ Selectors -> > getBookingsForCalendar > should return a list of booked slots with corresponding booked interval and bookingNotes
✅ Selectors -> > getBookingsForCalendar > should sort the slots (by date, and by time intraday)

✅ src/utils/tests/utils.test.ts

✅ Helpers > `capitalizeFirst` function > should return passed string, with first letter capitalized
✅ Helpers > `capitalizeFirst` function > should capitalize all of the first letters for words divided by '-' sign
✅ Helpers > `convertIntervalToNum` function > should convert null to 0
✅ Helpers > `convertIntervalToNum` function > should convert string to number
✅ Date utils > 'luxon2ISODate' function > should return ISO date string with only date part (excluding time of day) from luxon date
✅ Date utils > 'isISO' function > should return 'true' if passed sring is a valid ISO date (yyyy-mm-dd) and 'false' otherwise
✅ Date utils > getOrgFromLocation > should split on the first double dash and return the first part
✅ Date utils > isEmpty > should return false on all defined, non-null primitive values
✅ Date utils > isEmpty > should return true on null and undefined
✅ Date utils > isEmpty > should return true empty arrays and objects and false on non-empty ones
✅ Date utils > `generateDatesInRange` function > should return a generator that yields all date strings within a range