fix: flaky test

This commit is contained in:
zomars
2024-01-24 14:21:06 -07:00
parent 9b22f44cba
commit fa9c6ea0ef
2 changed files with 3 additions and 5 deletions
+1 -4
View File
@@ -113,10 +113,7 @@ export async function selectSecondAvailableTimeSlotNextMonth(page: Page) {
await page.locator('[data-testid="time"]').nth(0).click();
}
export async function bookEventOnThisPage(page: Page, goTo?: string) {
if (goTo) {
await page.goto(goTo);
}
export async function bookEventOnThisPage(page: Page) {
await selectFirstAvailableTimeSlotNextMonth(page);
await bookTimeSlot(page);
+2 -1
View File
@@ -46,7 +46,8 @@ test.describe("Workflow Tab - Event Type", () => {
const [eventType] = user.eventTypes;
await createWorkflow({ name: "A New Workflow", trigger: WorkflowTriggerEvents.NEW_EVENT });
await bookEventOnThisPage(page, `/${user.username}/${eventType.slug}`);
await page.goto(`/${user.username}/${eventType.slug}`);
await bookEventOnThisPage(page);
await assertWorkflowReminders(eventType.id, 1);
});
});