Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
kminehart committed Apr 1, 2021
1 parent c6b5131 commit 521fb10
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions cypress/integration/smoke.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ const addGithubDataSource = (accessToken: string) => {
checkHealth: true,
expectedAlertMessage: 'OK',
form: () => {
e2eSelectors.ConfigEditor.AccessToken.input().scrollIntoView().type(accessToken);
e2eSelectors.ConfigEditor.AccessToken.input()
.scrollIntoView()
.type(accessToken);
},
type: 'GitHub',
});
Expand All @@ -23,11 +25,19 @@ const addGithubPanel = (variableName: string) => {
e2e.components.QueryEditorRows.rows()
.should('be.visible')
.within(() => {
e2e.components.Select.input().first().should('be.empty').focus().type(`Releases{enter}`);
e2e.components.Select.input()
.first()
.should('be.empty')
.focus()
.type(`Releases{enter}`);
});

e2eSelectors.QueryEditor.Owner.input().should('be.empty').type(`grafana{enter}`);
e2eSelectors.QueryEditor.Repository.input().should('be.empty').type(`grafana{enter}`);
e2eSelectors.QueryEditor.Owner.input()
.should('be.empty')
.type(`grafana{enter}`);
e2eSelectors.QueryEditor.Repository.input()
.should('be.empty')
.type(`grafana{enter}`);
};

e2e.flows
Expand All @@ -37,9 +47,16 @@ const addGithubPanel = (variableName: string) => {
fillQueryEditor();

// Switch to the Table view as we have tabular data from Github (for the screenshot)
e2e.components.PanelEditor.OptionsPane.open().should('be.visible').click();
e2e.components.OptionsGroup.toggle('Panel type').should('be.visible').click();
e2e.components.PluginVisualization.item('Table').scrollIntoView().should('be.visible').click();
e2e.components.PanelEditor.OptionsPane.open()
.should('be.visible')
.click();
e2e.components.OptionsGroup.toggle('Panel type')
.should('be.visible')
.click();
e2e.components.PluginVisualization.item('Table')
.scrollIntoView()
.should('be.visible')
.click();
},
})
.then(({ config: { panelTitle } }: { config: PartialConfigurePanelConfig }) => {
Expand All @@ -48,7 +65,9 @@ const addGithubPanel = (variableName: string) => {
matchScreenshot: true,
panelTitle,
queriesForm: () => {
e2eSelectors.QueryEditor.Owner.input().clear().type(`$${variableName}{enter}`);
e2eSelectors.QueryEditor.Owner.input()
.clear()
.type(`$${variableName}{enter}`);
},
visitDashboardAtStart: false,
});
Expand Down

0 comments on commit 521fb10

Please sign in to comment.