Fix specs (#3577)
This commit is contained in:
parent
8aca378028
commit
0e3901953b
|
|
@ -70,29 +70,22 @@ describe("GlobalSearch", function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("navigatesToDatasourceHavingAQuery", () => {
|
it("navigatesToDatasourceHavingAQuery", () => {
|
||||||
cy.window()
|
|
||||||
.its("store")
|
|
||||||
.invoke("getState")
|
|
||||||
.then((state) => {
|
|
||||||
cy.createPostgresDatasource();
|
cy.createPostgresDatasource();
|
||||||
|
cy.get("@createDatasource").then((httpResponse) => {
|
||||||
|
const expectedDatasource = httpResponse.response.body.data;
|
||||||
cy.NavigateToQueryEditor();
|
cy.NavigateToQueryEditor();
|
||||||
|
|
||||||
const { datasources } = state.entities;
|
|
||||||
const expectedDatasource =
|
|
||||||
datasources.list[datasources.list.length - 1];
|
|
||||||
|
|
||||||
cy.contains(".t--datasource-name", expectedDatasource.name)
|
cy.contains(".t--datasource-name", expectedDatasource.name)
|
||||||
.find(queryLocators.createQuery)
|
.find(queryLocators.createQuery)
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
cy.get(commonlocators.globalSearchTrigger).click({ force: true });
|
cy.get(commonlocators.globalSearchTrigger).click({ force: true });
|
||||||
cy.wait(1000);
|
cy.wait(1000); // modal open transition should be deterministic
|
||||||
cy.get(commonlocators.globalSearchClearInput).click({ force: true });
|
cy.get(commonlocators.globalSearchClearInput).click({ force: true });
|
||||||
cy.get(commonlocators.globalSearchInput).type("Page1");
|
cy.get(commonlocators.globalSearchInput).type("Page1");
|
||||||
cy.get("body").type("{enter}");
|
cy.get("body").type("{enter}");
|
||||||
|
|
||||||
cy.get(commonlocators.globalSearchTrigger).click({ force: true });
|
cy.get(commonlocators.globalSearchTrigger).click({ force: true });
|
||||||
cy.wait(1000);
|
cy.wait(1000); // modal open transition should be deterministic
|
||||||
cy.get(commonlocators.globalSearchClearInput).click({ force: true });
|
cy.get(commonlocators.globalSearchClearInput).click({ force: true });
|
||||||
cy.get(commonlocators.globalSearchInput).type(expectedDatasource.name);
|
cy.get(commonlocators.globalSearchInput).type(expectedDatasource.name);
|
||||||
cy.get("body").type("{enter}");
|
cy.get("body").type("{enter}");
|
||||||
|
|
|
||||||
|
|
@ -15,14 +15,23 @@ describe("Onboarding", function() {
|
||||||
201,
|
201,
|
||||||
);
|
);
|
||||||
cy.wait("@getDataSources");
|
cy.wait("@getDataSources");
|
||||||
cy.wait("@getPluginForm").should(
|
|
||||||
"have.nested.property",
|
cy.window()
|
||||||
"response.body.responseMeta.status",
|
.its("store")
|
||||||
200,
|
.invoke("getState")
|
||||||
);
|
.then((state) => {
|
||||||
cy.get(".t--start-building")
|
const datasources = state.entities.datasources.list;
|
||||||
.should("be.visible")
|
let onboardingDatasource = datasources.find((datasource) => {
|
||||||
.click({ force: true });
|
const name = datasource.name;
|
||||||
|
return name === "Super Updates DB";
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!onboardingDatasource) {
|
||||||
|
cy.wait("@createDatasource");
|
||||||
|
}
|
||||||
|
|
||||||
|
cy.get(".t--start-building").click();
|
||||||
|
|
||||||
// Create and run query
|
// Create and run query
|
||||||
cy.get(".t--onboarding-indicator").should("be.visible");
|
cy.get(".t--onboarding-indicator").should("be.visible");
|
||||||
cy.get(".t--create-query").click();
|
cy.get(".t--create-query").click();
|
||||||
|
|
@ -59,6 +68,7 @@ describe("Onboarding", function() {
|
||||||
cy.get(".t--onboarding-cheat-action").click();
|
cy.get(".t--onboarding-cheat-action").click();
|
||||||
cy.contains(".t--onboarding-helper-title", "Deploy the Standup Dashboard");
|
cy.contains(".t--onboarding-helper-title", "Deploy the Standup Dashboard");
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// Similar to PublishtheApp command with little changes
|
// Similar to PublishtheApp command with little changes
|
||||||
it("Publish app", function() {
|
it("Publish app", function() {
|
||||||
|
|
|
||||||
|
|
@ -1656,8 +1656,7 @@ Cypress.Commands.add(
|
||||||
.click({ force: true });
|
.click({ force: true });
|
||||||
cy.get(widgetsPage.menubar)
|
cy.get(widgetsPage.menubar)
|
||||||
.contains("Show Message")
|
.contains("Show Message")
|
||||||
.click({ force: true })
|
.click({ force: true });
|
||||||
.should("have.text", "Show Message");
|
|
||||||
|
|
||||||
cy.get(alertcss)
|
cy.get(alertcss)
|
||||||
.click({ force: true })
|
.click({ force: true })
|
||||||
|
|
@ -1960,7 +1959,7 @@ Cypress.Commands.add("openPropertyPane", (widgetType) => {
|
||||||
const selector = `.t--draggable-${widgetType}`;
|
const selector = `.t--draggable-${widgetType}`;
|
||||||
cy.get(selector)
|
cy.get(selector)
|
||||||
.first()
|
.first()
|
||||||
.trigger("mouseover")
|
.trigger("mouseover", { force: true })
|
||||||
.wait(500);
|
.wait(500);
|
||||||
cy.get(`${selector}:first-of-type .t--widget-propertypane-toggle`)
|
cy.get(`${selector}:first-of-type .t--widget-propertypane-toggle`)
|
||||||
.first()
|
.first()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user