Commit 7ebc4a15 by Hugo Häggmark Committed by GitHub

Tests: We should not click on default button when there is only one ds (#20266)

parent 3111c362
......@@ -11,7 +11,6 @@ import {
export interface EditDataSourcePage {
name: InputPageObjectType;
default: ClickablePageObjectType;
delete: ClickablePageObjectType;
saveAndTest: ClickablePageObjectType;
alert: PageObjectType;
......@@ -21,9 +20,6 @@ export interface EditDataSourcePage {
export const editDataSourcePage = new TestPage<EditDataSourcePage>({
pageObjects: {
name: new InputPageObject(Selector.fromAriaLabel('Datasource settings page name input field')),
default: new ClickablePageObject(
Selector.fromSelector('[aria-label="Datasource settings page basic settings"] .gf-form-switch')
),
delete: new ClickablePageObject(Selector.fromAriaLabel('Delete button')),
saveAndTest: new ClickablePageObject(Selector.fromAriaLabel('Save and Test button')),
alert: new PageObject(Selector.fromAriaLabel('Datasource settings page Alert')),
......
......@@ -25,7 +25,6 @@ const addTestDataSourceAndVerify = async (page: Page) => {
await editDataSourcePage.init(page);
await editDataSourcePage.waitForNavigation();
await editDataSourcePage.pageObjects.name.enter(testDataSourceName);
await editDataSourcePage.pageObjects.default.click();
await editDataSourcePage.pageObjects.saveAndTest.click();
await editDataSourcePage.pageObjects.alert.exists();
await editDataSourcePage.pageObjects.alertMessage.containsText('Data source is working');
......
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