test: expect edit flow page opened after flow is clicked

This commit is contained in:
Jakub P
2025-04-10 12:42:55 +02:00
parent 3b9f86a547
commit cda8ede7c6

View File

@@ -97,6 +97,9 @@ test.describe('Folders', () => {
hasText: 'uncategorizedFlow', hasText: 'uncategorizedFlow',
}) })
.click(); .click();
await expect(page).toHaveURL(
/\/editor\/[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}/
);
await expect(flowEditorPage.folderName).toContainText('newFolder'); await expect(flowEditorPage.folderName).toContainText('newFolder');
await flowEditorPage.goBackButton.click(); await flowEditorPage.goBackButton.click();
@@ -143,6 +146,9 @@ test.describe('Folders', () => {
hasText: 'uncategorizedFlow', hasText: 'uncategorizedFlow',
}) })
.click(); .click();
await expect(page).toHaveURL(
/\/editor\/[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}/
);
await expect(flowEditorPage.folderName).toContainText('newFolder2'); await expect(flowEditorPage.folderName).toContainText('newFolder2');
await flowEditorPage.goBackButton.click(); await flowEditorPage.goBackButton.click();
}); });
@@ -165,6 +171,9 @@ test.describe('Folders', () => {
hasText: 'uncategorizedFlow', hasText: 'uncategorizedFlow',
}) })
.click(); .click();
await expect(page).toHaveURL(
/\/editor\/[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}/
);
await expect(flowEditorPage.folderName).toContainText('Uncategorized'); await expect(flowEditorPage.folderName).toContainText('Uncategorized');
await flowEditorPage.goBackButton.click(); await flowEditorPage.goBackButton.click();
}); });
@@ -321,6 +330,9 @@ test.describe('Folders', () => {
hasText: flowId, hasText: flowId,
}) })
.click(); .click();
await expect(page).toHaveURL(
/\/editor\/[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}/
);
await expect(flowEditorPage.folderName).toContainText('Uncategorized'); await expect(flowEditorPage.folderName).toContainText('Uncategorized');
await flowEditorPage.goBackButton.click(); await flowEditorPage.goBackButton.click();
}); });