Skip to content

Commit

Permalink
test: fix DS test
Browse files Browse the repository at this point in the history
  • Loading branch information
“NandanAnantharamu” committed Sep 16, 2024
1 parent 996e26b commit 21e6f90
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
dataSources,
entityItems,
homePage,
locators,
} from "../../../../support/Objects/ObjectsCore";
import EditorNavigation, {
EntityType,
Expand Down Expand Up @@ -46,7 +47,8 @@ describe(
});
});

it("2. Verify if schema was fetched once #18448", () => {
//This test is failing because of this bug #18448
it.skip("2. Verify if schema was fetched once #18448", () => {
agHelper.RefreshPage();
EditorNavigation.SelectEntityByName(
dataSourceName,
Expand All @@ -70,13 +72,14 @@ describe(
agHelper.RefreshPage();
dataSources.CreateMockDB("Users");
dataSources.CreateQueryAfterDSSaved();
dataSources.VerifyTableSchemaOnQueryEditor("public.users");
dataSources.SelectTableFromPreviewSchemaList("public.users");
dataSources.VerifyColumnSchemaOnQueryEditor("id", 1);
agHelper.GetNClick(dataSources._dsTabSchema);
agHelper.AssertElementAbsence(locators._btnSpinner);
dataSources.FilterAndVerifyDatasourceSchemaBySearch(
"public.us",
"public.users",
);
dataSources.SelectTableFromPreviewSchemaList("public.users");
dataSources.VerifyColumnSchemaOnQueryEditor("id", 1);
},
);

Expand All @@ -87,10 +90,13 @@ describe(
agHelper.RefreshPage();
dataSources.CreateMockDB("Users");
dataSources.CreateQueryAfterDSSaved();
agHelper.GetNClick(dataSources._dsTabSchema);
dataSources.FilterAndVerifyDatasourceSchemaBySearch("public.users");
dataSources.VerifyTableSchemaOnQueryEditor("public.users");
// then refresh
dataSources.RefreshDatasourceSchema();
// assert the schema is still shown.
dataSources.FilterAndVerifyDatasourceSchemaBySearch("public.users");
dataSources.VerifyTableSchemaOnQueryEditor("public.users");
},
);
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/limited-tests.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# To run only limited tests - give the spec names in below format:
cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js
cypress/e2e/Regression/ClientSide/BugTests/DatasourceSchema_spec.ts

# For running all specs - uncomment below:
#cypress/e2e/**/**/*
Expand Down
4 changes: 2 additions & 2 deletions app/client/cypress/support/Pages/DataSources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class DataSources {
".t--datasource-name:contains('" + dsName + "')";
_mandatoryMark = "//span[text()='*']";
_deleteDSHostPort = ".t--delete-field";

_dsTabSchema = "[data-testid='t--tab-schema']";
private _pageSelectionMenu = "[data-testId='t--page-selection']";

private _pageSelectMenuItem = ".ads-v2-menu__menu-item";
Expand Down Expand Up @@ -1373,7 +1373,7 @@ export class DataSources {
expectedTableName = search,
) {
this.agHelper.Sleep(2500); //for query editor to load
this.agHelper.TypeText(this._datasourceStructureSearchInput, search);
this.agHelper.ClearNType(this._datasourceStructureSearchInput, search);
this.agHelper.Sleep(1000); //for search result to load
this.VerifyTableSchemaOnQueryEditor(expectedTableName);
}
Expand Down

0 comments on commit 21e6f90

Please sign in to comment.