mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
Add IS_BILLING_ENABLED flag to account registration form in E2E tests
This commit is contained in:
@@ -21,6 +21,8 @@ export const REGISTERED_USER_EMAIL: string =
|
||||
export const REGISTERED_USER_PASSWORD: string =
|
||||
env('E2E_TEST_REGISTERED_USER_PASSWORD') || '';
|
||||
|
||||
export const IS_BILLING_ENABLED: boolean = env('BILLING_ENABLED') === 'true';
|
||||
|
||||
export const STATUS_PAGE_URL: URL | null = env(
|
||||
'E2E_TEST_REGISTERED_USER_PASSWORD'
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { test, expect, Page } from '@playwright/test';
|
||||
import { BASE_URL, IS_USER_REGISTERED } from '../../Config';
|
||||
import { BASE_URL, IS_USER_REGISTERED, IS_BILLING_ENABLED } from '../../Config';
|
||||
import Faker from 'Common/Utils/Faker';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
test.describe('Account Registration', () => {
|
||||
@@ -19,10 +19,14 @@ test.describe('Account Registration', () => {
|
||||
await page.getByTestId('email').press('Tab');
|
||||
await page.getByTestId('name').fill('sample');
|
||||
await page.getByTestId('name').press('Tab');
|
||||
await page.getByTestId('companyName').fill('sample');
|
||||
await page.getByTestId('companyName').press('Tab');
|
||||
await page.getByTestId('companyPhoneNumber').fill('+15853641376');
|
||||
await page.getByTestId('companyPhoneNumber').press('Tab');
|
||||
|
||||
if (IS_BILLING_ENABLED) {
|
||||
await page.getByTestId('companyName').fill('sample');
|
||||
await page.getByTestId('companyName').press('Tab');
|
||||
await page.getByTestId('companyPhoneNumber').fill('+15853641376');
|
||||
await page.getByTestId('companyPhoneNumber').press('Tab');
|
||||
}
|
||||
|
||||
await page.getByTestId('password').fill('sample');
|
||||
await page.getByTestId('password').press('Tab');
|
||||
await page.getByTestId('confirmPassword').fill('sample');
|
||||
|
||||
Reference in New Issue
Block a user