Skip to content

Commit

Permalink
test: remove startRoutesForDatasource from commands (#33688)
Browse files Browse the repository at this point in the history
Removed startRoutesForDatasource from Commands file and replaced with
StartDataSourceRoutes from support/Pages/DataSources
  • Loading branch information
NandanAnantharamu committed May 30, 2024
1 parent ee43abd commit f473da6
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe(
{ tags: ["@tag.Binding"] },
function () {
beforeEach(() => {
cy.startRoutesForDatasource();
_.dataSources.StartDataSourceRoutes();
});

it("1. Create a query and populate response by choosing addWidget and validate in Table Widget & Bug 7413", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,9 @@ describe(
{ tags: ["@tag.IDE"] },
function () {
beforeEach(() => {
cy.startRoutesForDatasource();
dataSources.StartDataSourceRoutes();
});

// afterEach(function() {
// if (this.currentTest.state === "failed") {
// Cypress.runner.stop();
// }
// });

it("1. Create a query with dataSource in explorer, Create new Page", function () {
cy.Createpage(pageid);
EditorNavigation.SelectEntityByName("Page1", EntityType.Page);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe(
});

beforeEach(() => {
cy.startRoutesForDatasource();
dataSources.StartDataSourceRoutes();
});

it("1. Create a page/moveQuery/rename/delete in explorer", function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe("GlobalSearch", function () {
});

beforeEach(() => {
cy.startRoutesForDatasource();
_.dataSources.StartDataSourceRoutes();
});

it("1. Shows And Hides Using Keyboard Shortcuts", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe(
let datasourceName;

beforeEach(() => {
cy.startRoutesForDatasource();
dataSources.StartDataSourceRoutes();
cy.startInterceptRoutesForS3();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe(
agHelper.AddDsl("executionParamsDsl");
});
beforeEach(() => {
cy.startRoutesForDatasource();
dataSources.StartDataSourceRoutes();
});
it("1. Create a postgres datasource", function () {
cy.NavigateToDatasourceEditor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe(
});

beforeEach(() => {
cy.startRoutesForDatasource();
dataSources.StartDataSourceRoutes();
});

it("1. Create a PostgresDataSource", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe(
{ tags: ["@tag.Datasource"] },
function () {
beforeEach(() => {
cy.startRoutesForDatasource();
dataSources.StartDataSourceRoutes();
cy.createPostgresDatasource();
cy.get("@saveDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe(
{ tags: ["@tag.Datasource"] },
function () {
beforeEach(() => {
cy.startRoutesForDatasource();
dataSources.StartDataSourceRoutes();
});

it("1. Create a empty datasource", function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,9 @@ describe(
});

beforeEach(() => {
cy.startRoutesForDatasource();
dataSources.StartDataSourceRoutes();
});

// afterEach(function() {
// if (this.currentTest.state === "failed") {
// Cypress.runner.stop();
// }
// });

// afterEach(() => {
// if (queryName)
// cy.actionContextMenuByEntityName(queryName);
// });

before("Creates a new Amazon S3 datasource", function () {
dataSources.CreateDataSource("S3");
cy.get("@dsName").then((dsName) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { dataSources, agHelper } from "../../../../support/Objects/ObjectsCore";
describe("Switch datasource", { tags: ["@tag.Datasource"] }, function () {
let dsName_1, dsName_2, MongoDB;
beforeEach(() => {
cy.startRoutesForDatasource();
dataSources.StartDataSourceRoutes();
});

it("1. Create postgres datasource", function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe(
{ tags: ["@tag.Datasource", "@tag.Sanity"] },
function () {
beforeEach(() => {
cy.startRoutesForDatasource();
dataSources.StartDataSourceRoutes();
});

it("1. Create elastic search datasource", function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe(
beforeEach(() => {
agHelper.AddDsl("noiseDsl");

cy.startRoutesForDatasource();
dataSources.StartDataSourceRoutes();
});

it("1. Verify after killing MySQL session, app should not crash", function () {
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/e2e/Sanity/Datasources/MySQL_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe(
{ tags: ["@tag.Datasource", "@tag.Sanity"] },
function () {
beforeEach(() => {
cy.startRoutesForDatasource();
dataSources.StartDataSourceRoutes();
});

it("1. Create, test, save then delete a MySQL datasource", function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe(
{ tags: ["@tag.Datasource", "@tag.Sanity"] },
function () {
beforeEach(() => {
cy.startRoutesForDatasource();
dataSources.StartDataSourceRoutes();
});

it("1. Create, test, save then delete a postgres datasource", function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe(
{ tags: ["@tag.Datasource", "@tag.Sanity"] },
function () {
beforeEach(() => {
cy.startRoutesForDatasource();
dataSources.StartDataSourceRoutes();
});

it("1. Create, test, save then delete a Redshift datasource", function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe(
function () {
let SMTPDatasourceName;
beforeEach(() => {
cy.startRoutesForDatasource();
dataSources.StartDataSourceRoutes();
});
before(() => {
agHelper.AddDsl("SMTPTestdsl");
Expand Down

0 comments on commit f473da6

Please sign in to comment.