Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
scenario: async (browser: Browser, page: Page) => {
const settings = getEndToEndSettings();
const pluginPage = pages.getPluginPage(settings.plugin.id);
await pluginPage.init(page);
await pluginPage.navigateTo();
// TODO: find a better way to avoid the 'loading' page
await sleep(500);
const fileName = 'plugin-page';
await takeScreenShot(page, fileName);
},
});
scenario: async (browser: Browser, page: Page) => {
const settings = getEndToEndSettings();
const pluginPage = pages.getPluginPage(settings.plugin.id);
await pluginPage.init(page);
await pluginPage.navigateTo();
// TODO: find a better way to avoid the 'loading' page
await sleep(500);
const fileName = 'plugin-page';
await takeScreenShot(page, fileName);
},
});
scenario: async (browser: Browser, page: Page) => {
const settings = getEndToEndSettings();
const pluginPage = pages.getPluginPage(settings.plugin.id);
await pluginPage.init(page);
await pluginPage.navigateTo();
// TODO: find a better way to avoid the 'loading' page
await sleep(500);
const fileName = 'plugin-page';
await takeScreenShot(page, fileName);
},
});
// This file is needed because it is used by vscode and other tools that
// call `jest` directly. However, unless you are doing anything special
// do not edit this file
const standard = require('@grafana/toolkit/src/config/jest.plugin.config');
// This process will use the same config that `yarn test` is using
const grafanaJestConfig = standard.jestConfig('');
module.exports = {
...grafanaJestConfig,
coveragePathIgnorePatterns: ['node_modules', 'src/tests'].concat(
grafanaJestConfig.coveragePathIgnorePatterns ? grafanaJestConfig.coveragePathIgnorePatterns : []
),
};
// This file is needed because it is used by vscode and other tools that
// call `jest` directly. However, unless you are doing anything special
// do not edit this file
const standard = require('@grafana/toolkit/src/config/jest.plugin.config');
// This process will use the same config that `yarn test` is using
module.exports = standard.jestConfig();
queriesTab: ClickablePageObjectType;
saveDashboard: ClickablePageObjectType;
scenarioSelect: SelectPageObjectType;
showXAxis: ClickablePageObjectType;
visualizationTab: ClickablePageObjectType;
}
export const editPanelPage = new TestPage({
pageObjects: {
queriesTab: new ClickablePageObject(Selector.fromAriaLabel('Queries tab button')),
saveDashboard: new ClickablePageObject(Selector.fromAriaLabel('Save dashboard navbar button')),
scenarioSelect: new SelectPageObject(Selector.fromAriaLabel('Scenario Select')),
showXAxis: new ClickablePageObject(
Selector.fromSelector('[aria-label="X-Axis section"] [label=Show] .gf-form-switch')
),
visualizationTab: new ClickablePageObject(Selector.fromAriaLabel('Visualization tab button')),
},
});
ClickablePageObjectType,
ClickablePageObject,
} from '@grafana/toolkit/src/e2e';
export interface EditPanelPage {
queriesTab: ClickablePageObjectType;
saveDashboard: ClickablePageObjectType;
scenarioSelect: SelectPageObjectType;
showXAxis: ClickablePageObjectType;
visualizationTab: ClickablePageObjectType;
}
export const editPanelPage = new TestPage({
pageObjects: {
queriesTab: new ClickablePageObject(Selector.fromAriaLabel('Queries tab button')),
saveDashboard: new ClickablePageObject(Selector.fromAriaLabel('Save dashboard navbar button')),
scenarioSelect: new SelectPageObject(Selector.fromAriaLabel('Scenario Select')),
showXAxis: new ClickablePageObject(
Selector.fromSelector('[aria-label="X-Axis section"] [label=Show] .gf-form-switch')
),
visualizationTab: new ClickablePageObject(Selector.fromAriaLabel('Visualization tab button')),
},
});
ClickablePageObject,
PageObject,
Selector,
} from '@grafana/toolkit/src/e2e';
export interface EditDataSourcePage {
saveAndTest: ClickablePageObjectType;
alert: PageObjectType;
alertMessage: PageObjectType;
}
export const editDataSourcePage = new TestPage({
pageObjects: {
saveAndTest: new ClickablePageObject(Selector.fromAriaLabel('Save and Test button')),
alert: new PageObject(Selector.fromAriaLabel('Datasource settings page Alert')),
alertMessage: new PageObject(Selector.fromAriaLabel('Datasource settings page Alert message')),
},
});
PageObjectType,
ClickablePageObject,
PageObject,
Selector,
} from '@grafana/toolkit/src/e2e';
export interface EditDataSourcePage {
saveAndTest: ClickablePageObjectType;
alert: PageObjectType;
alertMessage: PageObjectType;
}
export const editDataSourcePage = new TestPage({
pageObjects: {
saveAndTest: new ClickablePageObject(Selector.fromAriaLabel('Save and Test button')),
alert: new PageObject(Selector.fromAriaLabel('Datasource settings page Alert')),
alertMessage: new PageObject(Selector.fromAriaLabel('Datasource settings page Alert message')),
},
});
ClickablePageObjectType,
PageObjectType,
ClickablePageObject,
PageObject,
Selector,
} from '@grafana/toolkit/src/e2e';
export interface EditDataSourcePage {
saveAndTest: ClickablePageObjectType;
alert: PageObjectType;
alertMessage: PageObjectType;
}
export const editDataSourcePage = new TestPage({
pageObjects: {
saveAndTest: new ClickablePageObject(Selector.fromAriaLabel('Save and Test button')),
alert: new PageObject(Selector.fromAriaLabel('Datasource settings page Alert')),
alertMessage: new PageObject(Selector.fromAriaLabel('Datasource settings page Alert message')),
},
});