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

test admin dashboard #188

Merged
merged 13 commits into from
Mar 14, 2022
Merged

test admin dashboard #188

merged 13 commits into from
Mar 14, 2022

Conversation

Floozutter
Copy link
Contributor

@Floozutter Floozutter commented Mar 8, 2022

No description provided.

baseline/client/tests/dashboard.test.js Outdated Show resolved Hide resolved
baseline/client/tests/dashboard.test.js Outdated Show resolved Hide resolved
baseline/client/babel.config.js Show resolved Hide resolved
@Floozutter Floozutter requested a review from noah10 March 9, 2022 04:05
Copy link
Contributor

@noah10 noah10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes - they look good. I just noticed that there are no tests for the checkbox functionality, though. Could you please add some tests to confirm that the api client update function is called (with the expected date) when checking an unchecked box and that unchecking a box displays the confirmation and makes the appropriate update if the confirmation is OK'd?

also, avoid doing the zero-delay setTimeout thing
it's not worth the complexity just to wait for the event to cancel
@Floozutter Floozutter requested a review from noah10 March 12, 2022 00:27
Copy link
Contributor

@noah10 noah10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the one little issue with the comment that says the opposite of what it should, I think this is good to go.

mriT1Cell.querySelector("input").dispatchEvent(new MouseEvent("click", {bubbles: true}));
// wait for the async click event handler to resolve
await new Promise(process.nextTick);
// Twilight Sparkle should now have a timestamp for MRI T1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "now" is probably supposed to be "not" here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Just fixed it.

after the MRI T1 checkbox gets unchecked
@noah10 noah10 merged commit 5e0c701 into main Mar 14, 2022
@noah10 noah10 deleted the admin-test branch February 16, 2023 02:43
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.

None yet

2 participants