-
Notifications
You must be signed in to change notification settings - Fork 18
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
25157 - close the comment modal after saving comments/details #131
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
cy.visitBusinessDashFor('businessInfo/ben/active.json', undefined, false, false, undefined, allFilings, true) | ||
cy.visitBusinessDashFor( | ||
'businessInfo/ben/active.json', undefined, false, false, undefined, [administrativeDissolution], true | ||
) | ||
cy.intercept('POST', '**/api/v2/businesses/**/filings', {}).as('correctionFilingsPost') | ||
|
||
cy.get('[data-cy="header.actions.dropdown"]').should('exist') | ||
//select filing 2 instead of 0 or 1 which are correctionable | ||
cy.get('[data-cy="header.actions.dropdown"]').eq(2).click() | ||
|
||
// open the dropdown for the administrative dissolution in the Filing History; correction option should be disabled | ||
cy.get('[data-cy="header.actions.dropdown"]').first().click() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test tends to fail on PR. It attempts to select the administrative dissolution filing in the Filing History and confirm its correction option is disabled. We load allFilings
(cypress/fixtures/filings/allFilings.ts), and the filing we are interested in should be in the fourth position and can be selected by eq(3)
. But for some reason, it sometimes gets rendered as the third item so we have to use eq(2)
.
To avoid this mess. we can just specify the filing we want to render instead of loading all filings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for fixing this!
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still can't test but here's my review:
The code looks fine.
I specifically want to test a business comment since Filings UI left that comment dialog open on save, but auto-closed the filing comments dialog on save.
If you want, merge this and test it in Dev. If the business comment now auto-closes then check with @jacqueline-williams-549 if that's OK, otherwise it will need to be changed.
By the way, are all PRs in this repo (and maybe business-ui) now untestable with the missing keys? That definitely needs to be fixed. Feel free to create a new ticket if it's taking a while to solve it. |
Yep, I will have a PR up in a sec to fix this issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patrick, can you please rebase your PR and do a gcbrun again? It should work now.
/gcbrun |
Temporary Url for review: https://business-dashboard-dev--pr-131-qpworkah.web.app SB says, try this: https://business-dashboard-dev--pr-131-qpworkah.web.app/FM1101299 Or this: https://business-dashboard-dev--pr-131-qpworkah.web.app/BC0885606 |
I noticed that it's happening in test. The dialogue doesn't close when you hit save. I didn't design this piece, but at first glance it seems intentional so that the user is able to see their comment added to the list of comments below. I don't have any serious concerns with the current functionality. I think the dialogue is easily closeable with the X icon. I can review with Janis for her opinion, but she's away til Monday. Screen.Recording.2025-01-24.at.8.55.30.AM.mov |
There are separate actions to add comments: filing comments and business comments. In Filings UI, we had separate dialogs to add each comment. In Business Dashboard UI, it's the same dialog. In Filings UI, the filing comments dialog closed after saving because you could see the comments in the filing. In Filings UI, the business comments dialog stayed open so you could see your comments in the list (which is normally hidden). So what do we want now -- same behaviour as Filings UI? Separate dialogs? Or keep the filing comments dialog displaying at the top left (where the business comments normally displays) (instead of in the middle of the page), and the dialog stays open and you have to close it explicitly? |
Re: https://business-dashboard-dev--pr-131-qpworkah.web.app/FM1101299 What we have now is the dialog auto-closes for both business comments and filing comments. To me, this doesn't seem so bad. @jacqueline-williams-549 , please try it and see what you think. Compare with https://business-filings-dev--pr-713-3ar5fu8y.web.app/FM1101299/?noRedirect=true |
|
OK! Then this PR is good as-is. Ready to merge it, @patrickpeinanw ? |
*Issue:*bcgov/entity#25157
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the namex license (Apache 2.0).