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

UIQM-740 Don't show warn/fail error toasts when there are no warns/fails. #766

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

BogdanDenis
Copy link
Contributor

Description

Don't show warn/fail error toasts when there are no warns/fails.

Screenshots

chrome_MovqHmrwMJ.mp4

Issues

UIQM-740

@BogdanDenis BogdanDenis requested review from Dmytro-Melnyshyn and a team December 2, 2024 15:39
Copy link

github-actions bot commented Dec 2, 2024

Jest Unit Test Results

  1 files  ±0   45 suites  ±0   2m 21s ⏱️ -4s
482 tests +1  482 ✅ +1  0 💤 ±0  0 ❌ ±0 
485 runs  +1  485 ✅ +1  0 💤 ±0  0 ❌ ±0 

Results for commit 88f4769. ± Comparison against base commit 7490b77.

♻️ This comment has been updated with latest results.

@@ -895,6 +895,30 @@ describe('Given QuickMarcEditor', () => {
});
});

describe('when saving form without validation warnings or errors', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
describe('when saving form without validation warnings or errors', () => {
describe('when saving form without validation warnings and errors', () => {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In English you can say "without X or Y" meaning "without X and without Y". A little weird, but that's how it is.
Interestingly, it works the same way as De Morgan's law in boolean logic, where "not (A or B) = (not A) and (not B)"

Copy link
Member

Choose a reason for hiding this comment

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

Wow, I haven't thought about De Morgan since grad school!

await fireEvent.click(getByText('stripes-acq-components.FormFooter.save'));
});

it('should show a toast notification about validation warning and error', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
it('should show a toast notification about validation warning and error', async () => {
it('should not show a toast notification about validation warning and error', async () => {

@BogdanDenis BogdanDenis merged commit 4556782 into master Dec 3, 2024
15 checks passed
@BogdanDenis BogdanDenis deleted the UIQM-740 branch December 3, 2024 11:27
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.

3 participants