mirror of
https://github.com/nexu-io/open-design.git
synced 2026-10-27 09:51:12 +01:00
test(share): align export failure assertions with current copy
This commit is contained in:
@@ -378,7 +378,9 @@ describe("Owner P1 real FileViewer export-to-share chain", () => {
|
||||
else fail(new Error("export failed"));
|
||||
});
|
||||
if (outcome === "failed") {
|
||||
await screen.findByText("export failed");
|
||||
await screen.findByText("Export failed");
|
||||
expect(screen.getByText("This export did not complete. Please try again.")).toBeVisible();
|
||||
expect(screen.queryByText("export failed")).toBeNull();
|
||||
} else {
|
||||
await waitFor(() =>
|
||||
expect(screen.queryByText(/Exporting/i)).toBeNull(),
|
||||
|
||||
@@ -56,7 +56,10 @@ describe('FileViewer real HTML export completion seam', () => {
|
||||
await exportHtml();
|
||||
await waitFor(() => expect(seam.complete).toHaveBeenCalledWith('failed'));
|
||||
expect(screen.queryByText('Share the link, invite feedback')).toBeNull();
|
||||
expect(screen.getAllByText('export test failure').length).toBeGreaterThan(0);
|
||||
expect(screen.getByText('Export failed')).toBeTruthy();
|
||||
expect(screen.getByText('This export did not complete. Please try again.')).toBeTruthy();
|
||||
expect(screen.queryByText('export test failure')).toBeNull();
|
||||
expect(screen.queryByText('Export complete')).toBeNull();
|
||||
});
|
||||
it('reports a synchronous exporter throw as failure', async () => {
|
||||
seam.exportHtml.mockImplementation(() => { throw new Error('sync export failure'); });
|
||||
|
||||
Reference in New Issue
Block a user