test: Bring back broken out-of-office tests, prevent modal button clickable before flicker, and fix timezone issue#16001
Merged
PeerRich merged 23 commits intocalcom:mainfrom Aug 13, 2024
Conversation
|
@ImBIOS is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Graphite Automations"Add community label" took an action on this PR • (07/31/24)1 label was added to this PR based on Keith Williams's automation. "Add consumer team as reviewer" took an action on this PR • (07/31/24)1 reviewer was added to this PR based on Keith Williams's automation. |
anikdhabal
requested changes
Jul 31, 2024
anikdhabal
reviewed
Jul 31, 2024
anikdhabal
reviewed
Jul 31, 2024
anikdhabal
reviewed
Jul 31, 2024
Refactor the OutOfOfficePage component to improve the loading experience by using the `isPending` property from the `trpc.viewer.outOfOfficeReasonList.useQuery()` hook. This workaorund eliminates the full page flicker issue and provides a better user experience. The "Add" button now shows a loading state when the query is pending.
anikdhabal
requested changes
Aug 1, 2024
Contributor
anikdhabal
left a comment
There was a problem hiding this comment.
Hey @ImBIOS ooo e2e test is still failing, can you figure it out and make the final thing
Contributor
Author
I'm on it 🏃 |
Contributor
Author
…alculating offset
ImBIOS
commented
Aug 1, 2024
anikdhabal
reviewed
Aug 1, 2024
This commit updates the TimeZoneEnum in the types.ts file to include additional time zones. The new time zones added are: - ID: Asia/Jakarta (UTC+7) - SAMOA: Etc/GMT+12 (UTC-12) - AMERICAN_SAMOA: Pacific/Pago_Pago (UTC-11) - HAWAII: Pacific/Honolulu (UTC-10) - ALASKA: America/Anchorage (UTC-9) - PACIFIC_USA: America/Los_Angeles (UTC-8) - CENTRAL_USA: America/Chicago (UTC-6) - EASTERN_USA: America/New_York (UTC-5) - VENEZUELA: America/Caracas (UTC-4) - ARGENTINA: America/Buenos_Aires (UTC-3) - BRAZIL: America/Noronha (UTC-2) - AZORES: Atlantic/Azores (UTC-1) - FRANCE: Europe/Paris (UTC+1) - GREECE: Europe/Athens (UTC+2) - RUSSIA: Europe/Moscow (UTC+3) - UAE: Asia/Dubai (UTC+4) - PAKISTAN: Asia/Karachi (UTC+5) - BANGLADESH: Asia/Dhaka (UTC+6) - SINGAPORE: Asia/Singapore (UTC+8) - JAPAN: Asia/Tokyo (UTC+9) - AUSTRALIA: Australia/Sydney (UTC+10) - SOLOMON_ISLANDS: Pacific/Guadalcanal (UTC+11) - NEW_ZEALAND: Pacific/Auckland (UTC+12) The purpose of this update is to provide a comprehensive list of time zones for users to choose from when setting their time zone in the out-of-office feature.
ImBIOS
commented
Aug 3, 2024
Contributor
Author
|
@anikdhabal any update on review? |
zomars
pushed a commit
that referenced
this pull request
Aug 13, 2024
…ckable before flicker, and fix timezone issue (#16001) * test: prevent modal button clickable before flicker * chore: add note to migrate to appDir to solve full page flicker issue * chore: Improve OutOfOfficePage loading experience Refactor the OutOfOfficePage component to improve the loading experience by using the `isPending` property from the `trpc.viewer.outOfOfficeReasonList.useQuery()` hook. This workaorund eliminates the full page flicker issue and provides a better user experience. The "Add" button now shows a loading state when the query is pending. * Update index.tsx * chore: Update outOfOffice.handler.ts to use input.offset instead of calculating offset * fix e2e * Update * revert * chore: Fix offset calculation for out of office bookings * chore: Update date range calculation for out-of-office modal * chore: Remove console.log statement in out-of-office modal * chore: Update TimeZoneEnum with additional time zones This commit updates the TimeZoneEnum in the types.ts file to include additional time zones. The new time zones added are: - ID: Asia/Jakarta (UTC+7) - SAMOA: Etc/GMT+12 (UTC-12) - AMERICAN_SAMOA: Pacific/Pago_Pago (UTC-11) - HAWAII: Pacific/Honolulu (UTC-10) - ALASKA: America/Anchorage (UTC-9) - PACIFIC_USA: America/Los_Angeles (UTC-8) - CENTRAL_USA: America/Chicago (UTC-6) - EASTERN_USA: America/New_York (UTC-5) - VENEZUELA: America/Caracas (UTC-4) - ARGENTINA: America/Buenos_Aires (UTC-3) - BRAZIL: America/Noronha (UTC-2) - AZORES: Atlantic/Azores (UTC-1) - FRANCE: Europe/Paris (UTC+1) - GREECE: Europe/Athens (UTC+2) - RUSSIA: Europe/Moscow (UTC+3) - UAE: Asia/Dubai (UTC+4) - PAKISTAN: Asia/Karachi (UTC+5) - BANGLADESH: Asia/Dhaka (UTC+6) - SINGAPORE: Asia/Singapore (UTC+8) - JAPAN: Asia/Tokyo (UTC+9) - AUSTRALIA: Australia/Sydney (UTC+10) - SOLOMON_ISLANDS: Pacific/Guadalcanal (UTC+11) - NEW_ZEALAND: Pacific/Auckland (UTC+12) The purpose of this update is to provide a comprehensive list of time zones for users to choose from when setting their time zone in the out-of-office feature. * update * fix * remove comment --------- Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> Co-authored-by: unknown <adhabal2002@gmail.com>
This file contains hidden or 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
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.

What does this PR do?
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Message
Hey everyone! 👋
I'm working on addressing the issue [CAL-3337] to bring back the broken out-of-office tests. Here's the lowdown on what's happening and how we can fix it! 🚀
Cause:
Known:
Potential Solutions:
Let's tackle this issue and make the tests robust again! 💪💻
If you have any ideas or insights on why the flicker happens, feel free to share! Collaboration is key! 🤝🔧
Note: I'm not using this, because it will require the component to become async, which makes me want to write a new component inside this file for this button, but I'm not doing it, I don't know why: