Skip to content

Commit

Permalink
test: fix inline editing spec (#35986)
Browse files Browse the repository at this point in the history
RCA:
Toggle state of the property was going to wrong state, hence with retry
test was passing as it would bring back the application to required
statee.

Solution:
Updated toggle state in the flaky test to avoid this issue

EE PR: appsmithorg/appsmith-ee#4997

/ok-to-test tags="@tag.Sanity"



<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10633979760>
> Commit: b63e571
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10633979760&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Fri, 30 Aug 2024 14:27:24 UTC
<!-- end of auto-generated comment: Cypress test results  -->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Enhanced inline editing functionality for table widgets, improving
interaction and validation in tests.

- **Bug Fixes**
- Updated limited tests configuration to prioritize inline editing tests
over previous specifications.

- **Tests**
- Improved test coverage for inline editing by adding interactions with
dropdowns and property state toggling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
NandanAnantharamu authored Aug 30, 2024
1 parent bf5d73a commit bdeeea5
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ const widgetsPage = require("../../../../../locators/Widgets.json");
import {
agHelper,
table as tableHelper,
propPane,
} from "../../../../../support/Objects/ObjectsCore";
import { PROPERTY_SELECTOR } from "../../../../../locators/WidgetLocators";

describe(
"Table widget inline editing functionality",
Expand Down Expand Up @@ -161,7 +163,12 @@ describe(
it("6. should check that onsubmit event is available for the columns that are editable", () => {
cy.openPropertyPane("tablewidgetv2");
cy.editColumn("step");
cy.wait(500);
cy.get(commonlocators.changeColType).last().click();
cy.get(tableHelper._dropdownText)
.children()
.contains("Plain text")
.click();
propPane.TogglePropertyState("Editable", "Off", "");
[
{
columnType: "URL",
Expand Down Expand Up @@ -206,8 +213,7 @@ describe(
.contains(data.columnType)
.click();
cy.wait("@updateLayout");
cy.wait(500);
cy.get(".t--property-control-onsubmit").should(data.expected);
cy.get(PROPERTY_SELECTOR.onSubmit).should(data.expected);
});

cy.get(propPaneBack).click();
Expand Down Expand Up @@ -262,8 +268,7 @@ describe(
.contains(data.columnType)
.click();
cy.wait("@updateLayout");
cy.wait(500);
cy.get(".t--property-control-onsubmit").should(data.expected);
cy.get(PROPERTY_SELECTOR.onSubmit).should(data.expected);
});
});

Expand Down

0 comments on commit bdeeea5

Please sign in to comment.