diff --git a/tasks/smoke-tests/dev/tests/authChecks.spec.ts b/tasks/smoke-tests/dev/tests/authChecks.spec.ts index cf6384f088..0ddcdbf131 100644 --- a/tasks/smoke-tests/dev/tests/authChecks.spec.ts +++ b/tasks/smoke-tests/dev/tests/authChecks.spec.ts @@ -58,11 +58,11 @@ test('requireAuth graphql checks', async ({ page }) => { // Try to create a post as an anonymous user. await createNewPost({ page }) - expect( + await expect( page .locator('.rw-form-error-title') .locator("text=You don't have permission to do that"), - ).toBeTruthy() + ).toBeVisible() await page.goto('/') diff --git a/tasks/smoke-tests/dev/tests/rbacChecks.spec.ts b/tasks/smoke-tests/dev/tests/rbacChecks.spec.ts index d427158446..05a7523a8f 100644 --- a/tasks/smoke-tests/dev/tests/rbacChecks.spec.ts +++ b/tasks/smoke-tests/dev/tests/rbacChecks.spec.ts @@ -63,11 +63,11 @@ test('RBAC: Should not be able to delete contact as non-admin user', async ({ await page.locator('text=Delete').first().click() - expect( + await expect( page .locator('.rw-scaffold') - .locator("text=You don't have permission to do that"), - ).toBeTruthy() + .locator("text=You don't have access to do that"), + ).toBeVisible() // @NOTE we do this because the scaffold content is actually on the page, // This is the only way we validate if its actually showing visually