-
Notifications
You must be signed in to change notification settings - Fork 359
Remove invoice interstitial modal #1505
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
base: main
Are you sure you want to change the base?
Conversation
MayaRainer
left a comment
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.
@slavingia / @laugardie lmkwyt! test failures are on main as well
| await invoiceRow.click(); | ||
|
|
||
| await expect(page.getByRole("dialog")).toBeVisible(); | ||
| await page.getByRole("row").filter({ hasText: "Awaiting approval" }).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.
Just simplified this a little bit.
| await page.getByRole("row").getByText("Awaiting approval").first().click(); | ||
| await page.getByRole("row").filter({ hasText: "Awaiting approval" }).click(); | ||
|
|
||
| await expect(page.getByRole("heading", { name: "INV-123456" })).toBeVisible(); |
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.
Asserting that the new page is visible rather than a modal.
| } | ||
| }; | ||
|
|
||
| const [rowSelection, setRowSelection] = useState<Record<string, boolean>>(() => { |
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.
To preserve the row selection when coming back from the detail page.
| await login(page, preOnboardingUser, `/invoices/${invoice.externalId}`); | ||
| await expect(page.getByText("Missing tax information.")).toBeVisible(); | ||
| await page.getByRole("link", { name: "Invoices" }).click(); | ||
| await page.getByRole("link", { name: "Invoices", exact: true }).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.
To disambiguate from the "Back to invoices" link
MayaRainer
left a comment
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.
@laugardie _a Thanks! Could you have another look please?
|
@MayaRainer _a looks good to me! |
|
@laugardie Thanks! |
MayaRainer
left a comment
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.
| await page.getByPlaceholder("Description").first().fill("first item updated"); | ||
| await fillByLabel(page, "Hours / Qty", "04:30", { index: 0 }); | ||
| await expect(page.getByText("$870", { exact: true })).toBeVisible(); | ||
| await Promise.all([ |
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.
These checks were unnecessary and making the test flaky.
| </div> | ||
| ) : null} | ||
| {company.equityEnabled ? ( | ||
| <Totals |
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.
Made a component to share between the edit and show page as they're so similar now.
|
@MayaRainer just pushed some small UI changes. Rest looks good to me! I have one small concern regarding the UX when editing the equity (not strictly an issue with this PR, but related). If a contractor adds line items to a new invoice and then realizes they need to update the payment split, clicking that link navigates them away and they lose all the data they just entered. Even if open on a new tab, we need to reload to get the updated equity split. |
…xile into remove-invoice-interstitial







Closes #1502.
Removes the interstitial modal when clicking on an invoice row, instead taking the user to the invoice page directly.
Before
Screencast_20251105_173455.webm
After
Screencast_20251105_182918.webm