Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix DataSourceScheme #36339

Merged
merged 3 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 #36348
it.skip("2. Verify if schema was fetched once #36348", () => {
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
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
Loading