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

Correct test urls for canvas tests #3192

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion test/integration/duplication/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ test('duplication', async ({ page }) => {
const duplicateMenuItem = page.getByRole('menuitem', { name: 'Duplicate' });
await duplicateMenuItem.click();

await page.waitForURL(/\/_toolpad\/app\/pages\/[^/]+$/);
if (process.env.EXPERIMENTAL_INLINE_CANVAS) {
await page.waitForURL(/\/prod\/editor\/app\/pages\/[^/]+$/);
} else {
await page.waitForURL(/\/_toolpad\/app\/pages\/[^/]+$/);
}

const button = editorModel.appCanvas.getByRole('button', { name: 'hello world' });
await expect(button).toBeVisible();
Expand Down
7 changes: 6 additions & 1 deletion test/integration/editor/deleteLast.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@ test('do not find content if you delete page of middle ', async ({ page }) => {

await expect(pageMenuItem).toBeHidden();
await expect(page.getByText('No pages in this app.')).toBeVisible();
await expect(page).toHaveURL('/_toolpad/app/pages');

if (process.env.EXPERIMENTAL_INLINE_CANVAS) {
await expect(page).toHaveURL('/prod/editor/app/pages');
} else {
await expect(page).toHaveURL('/_toolpad/app/pages');
}
});
Loading