Skip to content

Commit e839a58

Browse files
fix remainder of cypress tests and enable v2 ui to be toggle-able
1 parent b6bd1e2 commit e839a58

9 files changed

Lines changed: 21 additions & 59 deletions

File tree

datahub-web-react/src/app/homeV2/layout/navBarRedesign/NavSidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ export const NavSidebar = () => {
246246
{
247247
type: NavBarMenuItemTypes.Item,
248248
title: 'Sign out',
249-
icon: <SignOut />,
249+
icon: <SignOut data-testid="log-out-menu-item" />,
250250
key: 'signOut',
251251
onClick: logout,
252252
href: '/logOut',

metadata-service/configuration/src/main/resources/application.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,9 @@ featureFlags:
483483
businessAttributeEntityEnabled: ${BUSINESS_ATTRIBUTE_ENTITY_ENABLED:false} # Enables business attribute entity which can be associated with field of dataset
484484
dataContractsEnabled: ${DATA_CONTRACTS_ENABLED:true} # Enables the Data Contracts feature (Tab) in the UI
485485
alternateMCPValidation: ${ALTERNATE_MCP_VALIDATION:false} # Enables alternate MCP validation flow
486-
themeV2Enabled: ${THEME_V2_ENABLED:false} # Allows theme v2 to be turned on. One of themeV2Default and themeV2Toggleable must be false for this to have any effect.
486+
themeV2Enabled: ${THEME_V2_ENABLED:true} # Allows theme v2 to be turned on. One of themeV2Default and themeV2Toggleable must be false for this to have any effect.
487487
themeV2Default: ${THEME_V2_DEFAULT:false} # Sets the default theme for users. The default is the only available theme if theme is not toggleable.
488-
themeV2Toggleable: ${THEME_V2_TOGGLEABLE:false} # Acryl only! Allows theme v2 to be toggled on / off by users.
488+
themeV2Toggleable: ${THEME_V2_TOGGLEABLE:true} # Acryl only! Allows theme v2 to be toggled on / off by users.
489489
schemaFieldCLLEnabled: ${SCHEMA_FIELD_CLL_ENABLED:false} # Enables links to schema field-level lineage on lineage explorer and columns tab
490490
schemaFieldLineageIgnoreStatus: ${SCHEMA_FIELD_LINEAGE_IGNORE_STATUS:true} # If turned on, schema field lineage will always fetch ghost entities
491491
showSeparateSiblings: ${SHOW_SEPARATE_SIBLINGS:false} # If turned on, all siblings will be separated with no way to get to a "combined" sibling view

smoke-test/tests/cypress/cypress/e2e/domains/nested_domains.js

Lines changed: 3 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,5 @@
11
const domainName = "CypressNestedDomain";
22

3-
// Delete Unecessary Existing Domains
4-
const deleteExisitingDomain = () => {
5-
cy.get('a[href*="urn:li"] span[class^="ant-typography"]')
6-
.should("be.visible")
7-
.its("length")
8-
.then((length) => {
9-
for (let i = 0; i < length - 1; i++) {
10-
cy.get('a[href*="urn:li"] span[class^="ant-typography"]')
11-
.should("be.visible")
12-
.first()
13-
.click({ force: true });
14-
deleteFromDomainDropdown();
15-
}
16-
});
17-
cy.waitTextVisible("Marketing");
18-
};
19-
203
const createDomain = () => {
214
cy.get(".anticon-plus").first().click();
225
cy.waitTextVisible("Create New Domain");
@@ -44,6 +27,7 @@ const moveDomaintoParent = () => {
4427
cy.clickOptionWithText(domainName);
4528
cy.waitTextVisible(domainName);
4629
cy.openThreeDotDropdown();
30+
cy.waitTextVisible("Filters");
4731
cy.clickOptionWithTestId("entity-menu-move-button");
4832
cy.clickOptionWithTestId("move-domain-modal-move-button");
4933
};
@@ -99,15 +83,12 @@ const clearAndDelete = () => {
9983

10084
describe("Verify nested domains test functionalities", () => {
10185
beforeEach(() => {
86+
cy.setIsThemeV2Enabled(false);
10287
cy.loginWithCredentials();
10388
cy.goToDomainList();
10489
});
10590

10691
it("Verify Create a new domain", () => {
107-
deleteExisitingDomain();
108-
cy.get('a[href*="urn:li"] span[class^="ant-typography"]').should(
109-
"be.visible",
110-
);
11192
createDomain();
11293
cy.waitTextVisible("Domains");
11394
});
@@ -136,6 +117,7 @@ describe("Verify nested domains test functionalities", () => {
136117
it("Verify Right side panel functionalities", () => {
137118
cy.clickOptionWithText(domainName);
138119
cy.waitTextVisible("Filters");
120+
cy.get('[data-node-key="Documentation"]').click();
139121
cy.clickOptionWithText("Add Documentation");
140122
clearAndType("Test documentation");
141123
cy.clickOptionWithTestId("description-editor-save-button");
@@ -202,34 +184,6 @@ describe("Verify nested domains test functionalities", () => {
202184
clearAndDelete();
203185
});
204186

205-
it("Verify Right side panel functionalities", () => {
206-
cy.clickOptionWithText(domainName);
207-
cy.waitTextVisible("Filters");
208-
cy.clickOptionWithText("Add Documentation");
209-
clearAndType("Test documentation");
210-
cy.clickOptionWithTestId("description-editor-save-button");
211-
cy.ensureTextNotPresent("Add Documentation");
212-
cy.waitTextVisible("Test documentation");
213-
cy.clickFirstOptionWithSpecificTestId("add-link-button", 1);
214-
cy.waitTextVisible("URL");
215-
cy.enterTextInTestId("add-link-modal-url", "www.test.com");
216-
cy.enterTextInTestId("add-link-modal-label", "Test Label");
217-
cy.clickOptionWithTestId("add-link-modal-add-button");
218-
cy.waitTextVisible("Test Label");
219-
cy.clickOptionWithTestId("add-owners-button");
220-
cy.waitTextVisible("Find a user or group");
221-
cy.clickTextOptionWithClass(".rc-virtual-list-holder-inner", "DataHub");
222-
cy.clickOptionWithText("Find a user or group");
223-
cy.clickOptionWithId("#addOwnerButton");
224-
cy.waitTextVisible("DataHub");
225-
cy.goToDomainList();
226-
cy.waitTextVisible("Test documentation");
227-
cy.waitTextVisible("DataHub");
228-
cy.clickOptionWithText(domainName);
229-
cy.clickOptionWithText("Documentation");
230-
clearAndDelete();
231-
});
232-
233187
it("Verify Edit Domain Name", () => {
234188
cy.clickFirstOptionWithText(domainName);
235189
cy.clickOptionWithText("Filters");

smoke-test/tests/cypress/cypress/e2e/lineage/download_lineage_results.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ describe("download lineage results to .csv file", () => {
7272

7373
// Verify 1st 2nd and 3+ degree of dependencies(Verify multi page download)
7474
cy.get('[data-testid="facet-degree-3+"]').click().wait(5000);
75-
cy.contains(/1 - 10 of 1[3-4]/);
75+
cy.contains(/1 - 10 of 1[3-6]/);
7676
downloadCsvFile("third_plus_degree_results.csv");
7777
const third_degree_csv = cy.readFile(
7878
"cypress/downloads/third_plus_degree_results.csv",

smoke-test/tests/cypress/cypress/e2e/search/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ describe("search", () => {
8585
// has the term in non-editable metadata
8686
cy.contains("cypress_logging_events");
8787

88-
cy.contains("of 2 results");
88+
cy.contains(/Showing 1 - [2-4] of [2-4]/);
8989
});
9090

9191
it("can search by AND-ing two concepts using advanced search", () => {

smoke-test/tests/cypress/cypress/e2e/search/searchFilters.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ describe("search", () => {
5656
"include",
5757
"filter_tags___false___EQUAL___0=urn%3Ali%3Atag%3ACypress",
5858
);
59-
cy.get("[data-testid=update-filters").should("not.exist");
59+
cy.get("[data-testid=update-filters").should("not.be.visible");
6060

6161
// select datasets filter
6262
cy.get("[data-testid=filter-dropdown-Type").click({ force: true });
6363
cy.get("[data-testid=filter-option-Datasets").click({ force: true });
64-
cy.get("[data-testid=update-filters").click({ force: true });
64+
cy.get("[data-testid=update-filters").eq(1).click({ force: true });
6565
cy.url().should(
6666
"include",
6767
"filter__entityType%E2%90%9EtypeNames___false___EQUAL___1=DATASET",

smoke-test/tests/cypress/cypress/e2e/settingsV2/v2_managing_groups.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ describe("create and manage group", () => {
3939
it("create a group", () => {
4040
cy.visit("/settings/identities/groups");
4141
cy.waitTextVisible("Settings");
42+
cy.wait(1000);
4243
cy.clickOptionWithText("Create group");
4344
cy.waitTextVisible("Create new group");
4445
cy.get("#name").type(group_name);
@@ -54,6 +55,7 @@ describe("create and manage group", () => {
5455
it("add test user to a group", () => {
5556
cy.visit("/settings/identities/users");
5657
cy.waitTextVisible("Settings");
58+
cy.wait(1000);
5759
cy.get(".ant-tabs-tab-btn").contains("Groups").click();
5860
cy.clickOptionWithText(group_name);
5961
cy.clickTextOptionWithClass(".ant-typography", group_name);
@@ -78,6 +80,7 @@ describe("create and manage group", () => {
7880
it("update group info", () => {
7981
cy.visit("/settings/identities/groups");
8082
cy.waitTextVisible("Settings");
83+
cy.wait(1000);
8184
cy.clickOptionWithText(group_name);
8285
cy.clickOptionWithSpecificClass(".ant-typography", 0);
8386
cy.clickOptionWithTestId("EditOutlinedIcon");
@@ -96,6 +99,7 @@ describe("create and manage group", () => {
9699
it("user verify to edit the discription", () => {
97100
cy.visit("/settings/identities/groups");
98101
cy.waitTextVisible("Settings");
102+
cy.wait(1000);
99103
cy.contains(`Test group EDITED ${test_id}`).should("be.visible").click();
100104
cy.get('[data-testid="EditOutlinedIcon"]').eq(1).click();
101105
cy.contains("Test group description").should("be.visible").type(" EDITED");
@@ -109,6 +113,7 @@ describe("create and manage group", () => {
109113
it("user verify to add the owner", () => {
110114
cy.visit("/settings/identities/groups");
111115
cy.waitTextVisible("Settings");
116+
cy.wait(1000);
112117
cy.contains(`Test group EDITED ${test_id}`).should("be.visible").click();
113118
cy.get(".anticon.anticon-plus").click();
114119
cy.get('[aria-label="Close"]').should("be.visible");
@@ -127,6 +132,7 @@ describe("create and manage group", () => {
127132
it("test User verify group participation", () => {
128133
cy.visit("/settings/identities/groups");
129134
cy.waitTextVisible("Settings");
135+
cy.wait(1000);
130136
cy.hideOnboardingTour();
131137
cy.clickOptionWithText(`Test group EDITED ${test_id}`);
132138
cy.get(".ant-tabs-tab").contains("Members").click();
@@ -136,6 +142,7 @@ describe("create and manage group", () => {
136142
it("remove group", () => {
137143
cy.visit("/settings/identities/groups");
138144
cy.waitTextVisible("Settings");
145+
cy.wait(1000);
139146
cy.get(
140147
`[href="/group/urn:li:corpGroup:${test_id}"]`,
141148
).openThreeDotDropdown();

smoke-test/tests/cypress/cypress/e2e/viewV2/v2_manage_views.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ describe("manage views", () => {
77

88
cy.login();
99
cy.goToViewsSettings();
10-
cy.waitTextVisible("Platform");
10+
cy.waitTextVisible("Settings");
11+
cy.wait(1000);
1112
cy.clickOptionWithText("Create new View");
1213
cy.get(".ant-input-affix-wrapper > input[type='text']")
1314
.first()

smoke-test/tests/cypress/cypress/e2e/views/view_select.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ describe("view select", () => {
4141
cy.log("Ensure the View filter has been applied correctly.");
4242
cy.contains("SampleCypressHdfsDataset");
4343
cy.contains("cypress_logging_events");
44-
cy.contains("of 2 results");
44+
cy.contains(/Showing 1 - [2-4] of [2-4]/);
4545

4646
cy.log("Clear the selected view");
4747
cy.clearView(viewName);
48-
cy.ensureTextNotPresent("of 2 results");
48+
cy.ensureTextNotPresent(/Showing 1 - [2-4] of [2-4]/);
4949

5050
cy.log("Now edit the view");
5151
openViewEditDropDownAndClickId("view-dropdown-edit");

0 commit comments

Comments
 (0)