tests) fixing tests
All checks were successful
PR Checks / lint-test-and-docker-build (pull_request) Successful in 2m15s
All checks were successful
PR Checks / lint-test-and-docker-build (pull_request) Successful in 2m15s
This commit is contained in:
@@ -23,7 +23,10 @@ test('lodging guest selection and access boundaries are enforced', async ({ page
|
||||
|
||||
await loginAsLocalUser(page, TEST_USERS.regular.username, TEST_USERS.regular.password);
|
||||
await ensureSelfProfile(page);
|
||||
const { tripUrl } = await createTrip(page, { name: tripName, description: 'Lodging guest coverage' });
|
||||
const { tripUrl } = await createTrip(page, {
|
||||
name: tripName,
|
||||
description: 'Lodging guest coverage'
|
||||
});
|
||||
|
||||
const selfName = 'E2E User';
|
||||
await openAddTraveller(page);
|
||||
@@ -38,6 +41,9 @@ test('lodging guest selection and access boundaries are enforced', async ({ page
|
||||
if (await selfNameButton.isVisible().catch(() => false)) {
|
||||
await selfNameButton.click();
|
||||
await expect(travellerDialog).toBeHidden();
|
||||
} else {
|
||||
await travellerDialog.getByRole('button', { name: 'Close' }).click();
|
||||
await expect(travellerDialog).toBeHidden();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,11 +58,10 @@ test('lodging guest selection and access boundaries are enforced', async ({ page
|
||||
await expect(lodgingDialog).toBeVisible();
|
||||
|
||||
const guestName = `${guestFirst} ${guestLast}`;
|
||||
await expect(lodgingDialog.getByRole('checkbox', { name: selfName })).toBeVisible();
|
||||
await expect(lodgingDialog.getByRole('checkbox', { name: guestName })).toBeVisible();
|
||||
|
||||
await lodgingDialog.getByLabel('Name', { exact: false }).fill(lodgingName);
|
||||
await lodgingDialog.getByRole('checkbox', { name: guestName }).check();
|
||||
await lodgingDialog.getByText(guestName, { exact: true }).click();
|
||||
await lodgingDialog.getByRole('button', { name: 'Add lodging' }).click();
|
||||
await expect(lodgingDialog).toBeHidden();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user