diff --git a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboard.spec.ts b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboard.spec.ts index 963f7085634..752d1d8453a 100644 --- a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboard.spec.ts +++ b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboard.spec.ts @@ -133,7 +133,7 @@ describe("Dashboard actions", () => { "should able to scroll vertical/ horizontal on widget", { tags: ["checklist_integrated_tiger", "checklist_integrated_tiger_releng"] }, () => { - const table = new Table(".s-dash-item-0"); + const table = new Table(".s-dash-item-0_0"); Navigation.visit("dashboard/dashboard-many-rows-columns"); editMode.edit(); diff --git a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardRichText.spec.ts b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardRichText.spec.ts index 3d7451bb42e..67024e31082 100644 --- a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardRichText.spec.ts +++ b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardRichText.spec.ts @@ -8,7 +8,7 @@ import { DashboardHeader } from "../../tools/dashboardHeader"; import { DashboardMenu } from "../../tools/dashboardMenu"; const editMode = new EditMode(); -const widget = new Widget(1); +const widget = new Widget(0, 1); const addedWidget = new Widget(0); const header = new DashboardHeader(); const layoutRow = new LayoutRow(0); diff --git a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardScatterPlot.spec.ts b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardScatterPlot.spec.ts index d6f90b6b7e5..3e49396f449 100644 --- a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardScatterPlot.spec.ts +++ b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardScatterPlot.spec.ts @@ -1,4 +1,4 @@ -// (C) 2024 GoodData Corporation +// (C) 2024-2025 GoodData Corporation import * as Navigation from "../../tools/navigation"; import { Chart } from "../../tools/chart"; @@ -6,7 +6,7 @@ import { Chart } from "../../tools/chart"; describe("Scatter Plot - Segmentation", { tags: ["pre-merge_isolated_tiger"] }, () => { it("should grouped points by segmentation", () => { Navigation.visit("dashboard/dashboard-scatter-plot-segmentation"); - const chart = new Chart(".s-dash-item-0"); + const chart = new Chart(".s-dash-item-0_0"); chart .waitLoaded() .waitComputed() diff --git a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardShortenMetricName.spec.ts b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardShortenMetricName.spec.ts index 25393914f51..f8eb0257bcf 100644 --- a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardShortenMetricName.spec.ts +++ b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardShortenMetricName.spec.ts @@ -1,10 +1,12 @@ // (C) 2023-2025 GoodData Corporation +import { Dashboard } from "../../tools/dashboards"; import * as Navigation from "../../tools/navigation"; import { Widget } from "../../tools/widget"; const LEGEND_NAME_CSS = ".series-name"; const TOOLTIP_TITLE_CSS = ".gd-viz-tooltip-title"; +const dashboard = new Dashboard(); describe( "Dashboard Shorten Metric Name", @@ -12,11 +14,12 @@ describe( () => { beforeEach(() => { Navigation.visit("dashboard/shorten-metric-name"); + dashboard.isLoaded(); }); it("Table should shorten metric name", () => { const table = new Widget(0).waitTableLoaded(); - table.getTable().assertShortenMetricName(496); + table.getTable().assertShortenMetricName(504); }); it("Column chart should shorten metric name in legend", () => { diff --git a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardTigerWithCharts.spec.ts b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardTigerWithCharts.spec.ts index 8b553785069..52ed020a5ec 100644 --- a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardTigerWithCharts.spec.ts +++ b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dashboardTigerWithCharts.spec.ts @@ -1,4 +1,4 @@ -// (C) 2021 GoodData Corporation +// (C) 2021-2025 GoodData Corporation import * as Navigation from "../../tools/navigation"; import { Dashboard } from "../../tools/dashboards"; @@ -20,11 +20,11 @@ describe("Dashboard with charts", { tags: ["pre-merge_isolated_tiger"] }, () => // the internals are already covered in storybook, // let's just check charts were rendered - new Widget(0).getChart().isHighchartsChart(); - new Widget(1).getChart().isHighchartsChart(); - new Widget(2).getChart().isHighchartsChart(); - new Widget(3).getChart().isHighchartsChart(); - new Widget(4).getChart().isHighchartsChart(); + new Widget(0, 0).getChart().isHighchartsChart(); + new Widget(1, 0).getChart().isHighchartsChart(); + new Widget(2, 0).getChart().isHighchartsChart(); + new Widget(3, 0).getChart().isHighchartsChart(); + new Widget(0, 1).getChart().isHighchartsChart(); }); }); }); diff --git a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dependentFilters.spec.ts b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dependentFilters.spec.ts index 153dd04c854..11f57753d42 100644 --- a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dependentFilters.spec.ts +++ b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dependentFilters.spec.ts @@ -11,13 +11,235 @@ const stateFilter = new AttributeFilter("State"); const cityFilter = new AttributeFilter("City"); const product = new AttributeFilter("Product"); const stageName = new AttributeFilter("Stage Name"); -const table = new Table(".s-dash-item-0"); +const table = new Table(".s-dash-item-0_0"); const topBar = new TopBar(); describe("Dependent filter", () => { beforeEach(() => { Navigation.visit("dashboard/dashboard-dependent-filters"); - new Dashboard().waitForDashboardLoaded(); + }); + + it("should test parent - child interaction in view mode", { tags: "checklist_integrated_tiger" }, () => { + table + .waitLoaded() + .getColumnValues(2) + .should("deep.equal", [ + "Bridgeport", + "Hartford", + "Boston", + "Nashua", + "New York", + "Poughkeepsie", + "Portland", + "Philadelphia", + "Providence", + ]); + + stateFilter.isLoaded().open().selectAttribute(["Connecticut"]).apply(); + + table + .waitLoadStarted() + .waitLoaded() + .getColumnValues(2) + .should("deep.equal", ["Bridgeport", "Hartford"]); + + cityFilter + .isLoaded() + .open() + .hasSubtitle("All") + .hasFilterListSize(6) + .hasSelectedValueList(["Bridgeport", "Danbury", "Hartford", "New Haven", "Norwich", "Waterbury"]) + .hasValueList(["Bridgeport", "Danbury", "Hartford", "New Haven", "Norwich", "Waterbury"]) + .showAllElementValuesIsVisible(true) + .showAllElementValues() + .showAllElementValuesIsVisible(false) + .hasFilterListSize(300) + .selectAttribute(["Hartford"]) + .apply() + .isLoaded() + .hasSubtitle("Hartford"); + + table.waitLoadStarted().waitLoaded().getColumnValues(2).should("deep.equal", ["Hartford"]); + + stateFilter.open().selectAttribute(["Oregon"]).apply(); + + table.isEmpty(); + + cityFilter + .open() + .hasSubtitle("Hartford") + .hasFilterListSize(4) + .hasSelectedValueList([]) + .hasValueList(["Eugene", "Medford", "Portland", "Salem"]) + .containElementsListStatus("Hartford") + .clearIrrelevantElementValuesIsVisible(true) + .clearIrrelevantElementValues() + .clearIrrelevantElementValuesIsVisible(false) + .containElementsListStatus("None") + .showAllElementValuesIsVisible(true) + .showAllElementValues() + .showAllElementValuesIsVisible(false) + .containElementsListStatus("None") + .hasFilterListSize(300) + .selectAttribute(["New York"]) + .containElementsListStatus("New York") + .close() + .open() + .hasSubtitle("Hartford") + .hasFilterListSize(4) + .hasSelectedValueList([]) + .hasValueList(["Eugene", "Medford", "Portland", "Salem"]) + .clearIrrelevantElementValuesIsVisible(true) + .showAllElementValuesIsVisible(true) + .showAllElementValues() + .clearIrrelevantElementValuesIsVisible(false) + .showAllElementValuesIsVisible(false) + .close() + .open() + .searchAndSelectFilterItem("Medford") + .containElementsListStatus("Hartford, Medford") + .clearIrrelevantElementValues() + .clearSearch() + .elementsAreLoaded() + .hasSelectedValueList(["Medford"]); + + stateFilter.open().selectAttribute(["Connecticut", "Oregon"]).apply(); + + table.waitLoadStarted().waitLoaded().getColumnValues(2).should("deep.equal", ["Hartford"]); + + cityFilter.open().hasSubtitle("Hartford").hasFilterListSize(10).hasSelectedValueList(["Hartford"]); + }); + + it("should test parent - child interaction in edit mode", { tags: "checklist_integrated_tiger" }, () => { + topBar.enterEditMode().editButtonIsVisible(false); + table + .waitLoaded() + .getColumnValues(1) + .should("deep.equal", [ + "Connecticut", + "Connecticut", + "Massachusetts", + "New Hampshire", + "New York", + "New York", + "Oregon", + "Pennsylvania", + "Rhode Island", + ]); + + stateFilter + .isLoaded() + .open() + .hasSubtitle("All") + .hasFilterListSize(48) + .configureLimitingParentFilterDependency("Region") + .hasFilterListSize(7) + .hasSelectedValueList([ + "Connecticut", + "Massachusetts", + "New Hampshire", + "New York", + "Oregon", + "Pennsylvania", + "Rhode Island", + ]); + + table + .waitLoaded() + .getColumnValues(1) + .should("deep.equal", [ + "Connecticut", + "Connecticut", + "Massachusetts", + "New Hampshire", + "New York", + "New York", + "Oregon", + "Pennsylvania", + "Rhode Island", + ]); + + regionFilter.open().selectAttribute(["West Coast"]).apply(); + table.waitLoadStarted().waitLoaded(); + + stateFilter + .open() + .hasSubtitle("All") + .hasFilterListSize(3) + .hasSelectedValueList(["California", "Oregon", "Washington"]) + .hasValueList(["California", "Oregon", "Washington"]) + .selectAttribute(["California"]) + .apply() + .isLoaded() + .hasSubtitle("California"); + + cy.wait(1000); + + cityFilter + .open() + .hasSubtitle("All") + .hasFilterListSize(50) + .configureLimitingParentFilterDependency("Region") + .hasFilterListSize(7) + .selectAttribute(["Sacramento"]) + .apply(); + + table.waitLoadStarted().waitLoaded(); + + cityFilter.isLoaded().hasSubtitle("Sacramento"); + + table.getColumnValues(0).should("deep.equal", ["West Coast"]); + table.getColumnValues(1).should("deep.equal", ["California"]); + table.getColumnValues(2).should("deep.equal", ["Sacramento"]); + + regionFilter + .open() + .elementsAreLoaded() + .clearIrrelevantElementValuesIsVisible(false) + .showAllElementValuesIsVisible(false) + .selectAttribute(["East Coast"]) + .apply(); + + cy.wait(1000); + + stateFilter + .open() + .elementsAreLoaded() + .clearIrrelevantElementValuesIsVisible(true) + .showAllElementValuesIsVisible(true); + cityFilter + .open() + .elementsAreLoaded() + .clearIrrelevantElementValuesIsVisible(true) + .showAllElementValuesIsVisible(true); + regionFilter + .open() + .elementsAreLoaded() + .clearIrrelevantElementValuesIsVisible(false) + .showAllElementValuesIsVisible(false) + .selectAttribute(["West Coast"]) + .apply(); + + cy.wait(1000); + + stateFilter + .open() + .elementsAreLoaded() + .clearIrrelevantElementValuesIsVisible(false) + .showAllElementValuesIsVisible(true); + cityFilter + .open() + .elementsAreLoaded() + .clearIrrelevantElementValuesIsVisible(false) + .showAllElementValuesIsVisible(true); + + topBar.cancelEditMode().discardChanges().editButtonIsVisible(true); + + table.waitLoaded(); + + regionFilter.isLoaded().open().hasSubtitle("East Coast").hasFilterListSize(4); + stateFilter.isLoaded().open().hasSubtitle("All").hasFilterListSize(48); + cityFilter.isLoaded().open().hasSubtitle("All").hasFilterListSize(300); }); it( diff --git a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dragDropAndMoveWidget.spec.ts b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dragDropAndMoveWidget.spec.ts index 2d598c39ae1..3140ad77c75 100644 --- a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dragDropAndMoveWidget.spec.ts +++ b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/dragDropAndMoveWidget.spec.ts @@ -52,28 +52,30 @@ describe("Insight on dashboard", () => { //drag to beginning of a row dashboard.getWidget(0).dragBefore("TableWithHyperlinkAttribute"); - dashboard.hasPlaceholderText("Drop here"); + dashboard.hasDropTargetBorderActive(); cy.get(".s-cancel_button").trigger("dragleave"); //drag to the end of a row dashboard.getWidget(2).dragAfter("ComboChart"); - dashboard.hasPlaceholderText("Drop to the existing section"); + dashboard.hasDropTargetBorderActive(); cy.get(".s-cancel_button").trigger("dragleave"); //drag to between of 2 widgets dashboard.getWidget(0).dragAfter("Headline"); - dashboard.hasPlaceholderText("Drop here"); + dashboard.hasDropTargetBorderActive(); }); it("can remove widgets after drap&drop", { tags: ["pre-merge_isolated_tiger"] }, () => { dashboard.getRow(2).scrollIntoView().addLast("ComboChart"); dashboard.hasRowsCount(4); - new Widget(5).scrollIntoView().removeVizWidget(); + new Widget(0, 3).scrollIntoView().removeVizWidget(); dashboard.hasRowsCount(3); }); +}); - //Cover ticket: RAIL-4715 +//Cover ticket: RAIL-4715 +describe("Be able to resize widgeton dashboard", () => { it( "should able to resize widget when is placed next to other in one row", { tags: ["checklist_integrated_tiger", "checklist_integrated_tiger_releng"] }, @@ -84,8 +86,8 @@ describe("Insight on dashboard", () => { insightCatalog.waitForCatalogReload(); dashboard.getWidget(0).add("WithOwnDescription", "prev"); dashboard.waitItemLoaded(); - dashboard.getWidget(0).hasWidth(6).resizeWidthTo(4).hasWidth(4); - dashboard.getWidget(1).hasWidth(6).resizeWidthTo(12).hasWidth(8); + dashboard.getWidget(0).hasWidth(4).resizeWidthTo(2).hasWidth(2); + dashboard.getWidget(1).hasWidth(6).resizeWidthTo(12).hasWidth(10); }, ); }); diff --git a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/drilling.spec.ts b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/drilling.spec.ts index f38c115cf5c..1c6b21bafee 100644 --- a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/drilling.spec.ts +++ b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/drilling.spec.ts @@ -50,8 +50,8 @@ describe("Interaction", () => { new CustomURLDialog().hasItem("Created"); widgetConfig.closeCustomURLDialog().close(); - const widget2 = new Widget(2); - const widgetConfig2 = new WidgetConfiguration(2); + const widget2 = new Widget(0, 1); + const widgetConfig2 = new WidgetConfiguration(0, 1); widget2.scrollIntoView().waitChartLoaded().focus(); widgetConfig2.openInteractions().addInteraction("Sum of Amount", "measure"); widgetConfig2 @@ -67,7 +67,7 @@ describe("Interaction", () => { "should display correct insight name on invalid interaction warning", { tags: ["checklist_integrated_tiger"] }, () => { - const widget1 = new Widget(1); + const widget1 = new Widget(0, 1); const message = new Messages(); Navigation.visit("dashboard/dashboard-many-rows-columns"); @@ -86,7 +86,7 @@ describe("Interaction", () => { .clickShowMore() .hasInsightNameIsBolder(true, "Visualization has invalid interaction rename"); widget1.waitChartLoaded().scrollIntoView().focus(); - new WidgetConfiguration(1).removeFromDashboard(); + new WidgetConfiguration(0, 1).removeFromDashboard(); message.hasWarningMessage(false); }, ); diff --git a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/pivotTableHasTotalAndSubtotalsOnDashboard.spec.ts b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/pivotTableHasTotalAndSubtotalsOnDashboard.spec.ts index c4d5a08e2c3..2d8036884d0 100644 --- a/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/pivotTableHasTotalAndSubtotalsOnDashboard.spec.ts +++ b/libs/sdk-ui-tests-e2e/cypress/integration/01-sdk-ui-dashboard/pivotTableHasTotalAndSubtotalsOnDashboard.spec.ts @@ -43,7 +43,7 @@ describe( () => { it("should render insight with multi format metrics correctly", () => { Navigation.visit("dashboard/dashboard-pivot-table-scenario"); - const table = new Widget(1).waitTableLoaded().getTable(); + const table = new Widget(0, 1).waitTableLoaded().getTable(); table.waitLoaded(); table.hasCellValue(6, 1, "Closed Won"); table.hasCellValue(6, 2, "██████████"); diff --git a/libs/sdk-ui-tests-e2e/cypress/support/featureHub.ts b/libs/sdk-ui-tests-e2e/cypress/support/featureHub.ts index b1abff007c0..35d112e0fb2 100644 --- a/libs/sdk-ui-tests-e2e/cypress/support/featureHub.ts +++ b/libs/sdk-ui-tests-e2e/cypress/support/featureHub.ts @@ -39,6 +39,14 @@ beforeEach(() => { type: "BOOLEAN", value: true, }, + { + id: "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d", + key: "enableDashboardFlexibleLayout", + l: false, + version: 42, + type: "BOOLEAN", + value: true, + }, ], }, ], diff --git a/libs/sdk-ui-tests-e2e/cypress/tools/dashboards.ts b/libs/sdk-ui-tests-e2e/cypress/tools/dashboards.ts index 80e22ebf4a2..46cc1cefac7 100644 --- a/libs/sdk-ui-tests-e2e/cypress/tools/dashboards.ts +++ b/libs/sdk-ui-tests-e2e/cypress/tools/dashboards.ts @@ -24,7 +24,7 @@ export class Dashboard { } getDashboardBodyElement(): Cypress.Chainable { - return cy.get(".s-fluid-layout-container"); + return cy.get(".gd-grid-layout__container--root"); } topBarExist(exist = true): this { @@ -74,7 +74,7 @@ export class Dashboard { } hasRowsCount(count: number) { - cy.get(".s-fluid-layout-row").should("have.length", count); + cy.get(".gd-grid-layout__section").should("have.length", count); return this; } @@ -87,12 +87,26 @@ export class Dashboard { return this; } + hasDropTargetBorderActive() { + cy.get(".gd-hotspot-border__drop-target.active").should("exist"); + return this; + } + waitItemLoaded() { cy.wait(500); this.getDashboardBodyElement() .find(".dash-item.type-loading", { timeout: getMaximumTimeout() }) .should("not.exist"); } + + isLoaded() { + cy.get(".catalog-is-loaded .dash-section").should("exist"); + cy.get(".s-loading-spinner").should("not.exist"); + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(1000); + cy.get(".s-loading", { timeout: 60000 }).should("not.exist"); + return this; + } } export class TopBar { diff --git a/libs/sdk-ui-tests-e2e/cypress/tools/layoutRow.ts b/libs/sdk-ui-tests-e2e/cypress/tools/layoutRow.ts index 989daebd10a..4c052f3e7a5 100644 --- a/libs/sdk-ui-tests-e2e/cypress/tools/layoutRow.ts +++ b/libs/sdk-ui-tests-e2e/cypress/tools/layoutRow.ts @@ -1,4 +1,4 @@ -// (C) 2021-2024 GoodData Corporation +// (C) 2021-2025 GoodData Corporation import { InsightsCatalog, InsightTitle } from "./insightsCatalog"; import { SectionHeader } from "./sectionHeader"; @@ -9,7 +9,7 @@ export class LayoutRow { constructor(private rowIndex: number) {} getSelector() { - return `.s-fluid-layout-row:nth-child(${this.rowIndex + 1})`; + return `.gd-grid-layout__section:nth-child(${this.rowIndex + 1})`; } getElement() { diff --git a/libs/sdk-ui-tests-e2e/cypress/tools/navigation.ts b/libs/sdk-ui-tests-e2e/cypress/tools/navigation.ts index 8f4f459cf64..262d39e4b2b 100644 --- a/libs/sdk-ui-tests-e2e/cypress/tools/navigation.ts +++ b/libs/sdk-ui-tests-e2e/cypress/tools/navigation.ts @@ -1,4 +1,4 @@ -// (C) 2021-2024 GoodData Corporation +// (C) 2021-2025 GoodData Corporation import { ISettings } from "@gooddata/sdk-model"; import { getHost } from "../support/constants"; import VisitOptions = Cypress.VisitOptions; diff --git a/libs/sdk-ui-tests-e2e/cypress/tools/richText.ts b/libs/sdk-ui-tests-e2e/cypress/tools/richText.ts index 11945911067..03ccb739588 100644 --- a/libs/sdk-ui-tests-e2e/cypress/tools/richText.ts +++ b/libs/sdk-ui-tests-e2e/cypress/tools/richText.ts @@ -1,4 +1,4 @@ -// (C) 2021-2024 GoodData Corporation +// (C) 2021-2025 GoodData Corporation export class RichText { constructor(private parentSelector: string) {} @@ -74,7 +74,7 @@ export class RichText { } confirmChanges() { - this.getConfirmButtonElement().click(); + this.getConfirmButtonElement().click({ force: true }); this.isView(); return this; } diff --git a/libs/sdk-ui-tests-e2e/cypress/tools/sectionHeader.ts b/libs/sdk-ui-tests-e2e/cypress/tools/sectionHeader.ts index d74bb92cd8a..95db5046714 100644 --- a/libs/sdk-ui-tests-e2e/cypress/tools/sectionHeader.ts +++ b/libs/sdk-ui-tests-e2e/cypress/tools/sectionHeader.ts @@ -1,9 +1,9 @@ -// (C) 2021-2024 GoodData Corporation +// (C) 2021-2025 GoodData Corporation export class SectionHeader { constructor(private rowIndex: number) {} getSelector() { - return `.s-fluid-layout-row:nth-child(${this.rowIndex + 1})`; + return `.gd-grid-layout__section:nth-child(${this.rowIndex + 1})`; } getElement() { @@ -43,7 +43,7 @@ export class SectionHeader { } setTitle(text: string) { - this.getTitleInputWrapper().click().find("textarea").type(`${text}{enter}`); + this.getTitleInputWrapper().click({ force: true }).find("textarea").type(`${text}{enter}`); return this; } diff --git a/libs/sdk-ui-tests-e2e/cypress/tools/widget.ts b/libs/sdk-ui-tests-e2e/cypress/tools/widget.ts index 4f48c6a3bfc..8a8b63a247d 100644 --- a/libs/sdk-ui-tests-e2e/cypress/tools/widget.ts +++ b/libs/sdk-ui-tests-e2e/cypress/tools/widget.ts @@ -8,10 +8,10 @@ import { Headline } from "./headline"; import { RichText } from "./richText"; export class Widget { - constructor(private index: number) {} + constructor(private index: number, private section: number = 0) {} getElementSelector() { - return `.s-dash-item-${this.index}`; + return `.s-dash-item-${this.section}_${this.index}`; } getElement() { @@ -118,9 +118,9 @@ export class Widget { * @returns */ hasWidth(size: number) { - this.getElement() - .parents(".s-fluid-layout-column") - .should("have.class", `s-fluid-layout-column-width-${size}`); + cy.get(this.getElementSelector()) + .parents(".gd-grid-layout__item") + .should("have.class", `gd-grid-layout__item--span-${size}`); return this; } diff --git a/libs/sdk-ui-tests-e2e/cypress/tools/widgetConfiguration.ts b/libs/sdk-ui-tests-e2e/cypress/tools/widgetConfiguration.ts index b2d024cb3d9..9815c73c2b8 100644 --- a/libs/sdk-ui-tests-e2e/cypress/tools/widgetConfiguration.ts +++ b/libs/sdk-ui-tests-e2e/cypress/tools/widgetConfiguration.ts @@ -1,4 +1,4 @@ -// (C) 2021-2024 GoodData Corporation +// (C) 2021-2025 GoodData Corporation import { getTestClassByTitle } from "../support/commands/tools/classes"; @@ -13,14 +13,19 @@ import { export type InteractionType = "measure" | "attribute"; export class WidgetConfiguration { - constructor(private widgetIndex: number) {} + constructor(private widgetIndex: number, private section: number = 0) {} getElement() { return cy.get(".s-gd-configuration-bubble"); } open() { - new Widget(this.widgetIndex).getElement().click().find(".dash-item-action").first().click(); + new Widget(this.widgetIndex, this.section) + .getElement() + .click() + .find(".dash-item-action") + .first() + .click(); this.getElement().should("be.visible"); return this; }