mirror of
https://github.com/grafana/grafana.git
synced 2024-11-24 09:50:29 -06:00
e2e tests: Make pageObjects mandatory (#18406)
- Lower strictNullChecks: true errors
This commit is contained in:
parent
1c7bf35aa7
commit
760aec7d3b
@ -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: {},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user