mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
clean up e2e tests
This commit is contained in:
parent
193508c0c7
commit
fb3153cf2e
@ -1,4 +1,4 @@
|
||||
import { test, expect, ElementHandle, Page } from '@playwright/test';
|
||||
import { test, expect, Page } from '@playwright/test';
|
||||
|
||||
import BASE_URL from '../../Utils/BaseURL';
|
||||
|
||||
@ -6,11 +6,8 @@ test.beforeEach(async ({ page }: { page: Page }) => {
|
||||
await page.goto(BASE_URL);
|
||||
});
|
||||
test('sign up button', async ({ page }: { page: Page }) => {
|
||||
const signUpButton: ElementHandle<Element> | null = await page.$(
|
||||
"[data-testid='Sign-up']"
|
||||
);
|
||||
if (signUpButton) {
|
||||
await signUpButton.click();
|
||||
await expect(page).toHaveURL(/.*accounts\/register/);
|
||||
}
|
||||
|
||||
await page.getByTestId("Sign-up").click();
|
||||
await expect(page).toHaveURL(BASE_URL+"/accounts/register");
|
||||
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
const BASE_URL: string =
|
||||
process.env['BASE_URL' as keyof typeof process.env] || 'http://localhost/';
|
||||
process.env['BASE_URL' as keyof typeof process.env] || 'http://localhost';
|
||||
|
||||
export default BASE_URL;
|
||||
|
Loading…
Reference in New Issue
Block a user