Files
threshold-ui/ui/admin/tests/e2e/pages/base.js
T
Michael Li 0d0dadf398 chore(e2e): Fix eslint for Admin UI e2e tests (#2427)
* chore(e2e): Fix eslint for e2e tests

* chore(e2e): Fix license headers
2024-08-06 14:26:19 -04:00

22 lines
443 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
const { expect } = require('@playwright/test');
class BasePage {
constructor(page) {
this.page = page;
}
async dismissSuccessAlert() {
await expect(
this.page.getByRole('alert').getByText('Success', { exact: true }),
).toBeVisible();
await this.page.getByRole('button', { name: 'Dismiss' }).click();
}
}
module.exports = BasePage;