Commit 760aec7d by Tobias Skarhed Committed by GitHub

e2e tests: Make pageObjects mandatory (#18406)

- Lower strictNullChecks: true errors
parent 1c7bf35a
......@@ -7,9 +7,9 @@ export const login = async (page: Page) => {
await loginPage.init(page);
await loginPage.navigateTo();
await loginPage.pageObjects!.username.enter('admin');
await loginPage.pageObjects!.password.enter('admin');
await loginPage.pageObjects!.submit.click();
await loginPage.pageObjects.username.enter('admin');
await loginPage.pageObjects.password.enter('admin');
await loginPage.pageObjects.submit.click();
await loginPage.waitForResponse();
};
......
......@@ -25,11 +25,11 @@ type PageObjects<T> = { [P in keyof T]: T[P] };
export interface TestPageConfig<T> {
url?: string;
pageObjects?: PageObjects<T>;
pageObjects: PageObjects<T>;
}
export class TestPage<T> implements TestPageType<T> {
pageObjects?: PageObjects<T>;
pageObjects: PageObjects<T>;
private page?: Page;
private pageUrl?: string;
......
......@@ -4,4 +4,5 @@ export interface DataSourcesPage {}
export const dataSourcesPage = new TestPage<DataSourcesPage>({
url: '/datasources',
pageObjects: {},
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment