Skip to content

Commit

Permalink
remove redundant cypress test + improve existing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesikot committed Jul 24, 2024
1 parent c0f3773 commit 78b268d
Showing 1 changed file with 6 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {

const commonlocators = require("../../../../../../locators/commonlocators.json");
import * as _ from "../../../../../../support/Objects/ObjectsCore";
import { featureFlagIntercept } from "../../../../../../support/Objects/FeatureFlags";

describe(
"Table widget - Select column type functionality",
Expand Down Expand Up @@ -153,6 +154,7 @@ describe(
});

it("5. should check that on option select is working", () => {
featureFlagIntercept({ release_table_cell_label_value_enabled: true });
cy.openPropertyPane("tablewidgetv2");
cy.editColumn("step");
cy.get(".t--property-control-onoptionchange .t--js-toggle").click();
Expand All @@ -162,19 +164,6 @@ describe(
{{showAlert(currentRow.step)}}
`,
);
cy.editTableSelectCell(0, 0);
cy.get(".menu-item-link").contains("#3").click();

_.agHelper.ValidateToastMessage("#3");

cy.get(".menu-virtual-list").should("not.exist");
cy.readTableV2data(0, 0).then((val) => {
expect(val).to.equal("#3");
});
cy.discardTableRow(4, 0);
});

it("6. should check that on option select uses label as cell content in select cell", () => {
cy.updateCodeInput(
".t--property-control-options",
`
Expand Down Expand Up @@ -206,7 +195,7 @@ describe(
cy.discardTableRow(4, 0);
});

it("7. should check that currentRow is accessible in the select options", () => {
it("6. should check that currentRow is accessible in the select options", () => {
cy.updateCodeInput(
".t--property-control-options",
`
Expand All @@ -231,7 +220,7 @@ describe(
cy.get(".menu-item-text").contains("#1").should("not.exist");
});

it("8. should check that 'same select option in new row' property is working", () => {
it("7. should check that 'same select option in new row' property is working", () => {
_.propPane.NavigateBackToPropertyPane();

const checkSameOptionsInNewRowWhileEditing = () => {
Expand Down Expand Up @@ -297,7 +286,7 @@ describe(
checkSameOptionsWhileAddingNewRow();
});

it("9. should check that 'new row select options' is working", () => {
it("8. should check that 'new row select options' is working", () => {
const checkNewRowOptions = () => {
// New row select options should be visible when "Same options in new row" is turned off
_.propPane.TogglePropertyState("Same options in new row", "Off");
Expand Down Expand Up @@ -362,7 +351,7 @@ describe(
checkNoOptionState();
});

it("10. should check that server side filering is working", () => {
it("9. should check that server side filering is working", () => {
_.dataSources.CreateDataSource("Postgres");
_.dataSources.CreateQueryAfterDSSaved(
"SELECT * FROM public.astronauts {{this.params.filterText ? `WHERE name LIKE '%${this.params.filterText}%'` : ''}} LIMIT 10;",
Expand Down

0 comments on commit 78b268d

Please sign in to comment.