fix: Fix api on load issue due to no setting config issue (#38969)

## Description
Updated the test case code with import app.


Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/13116038995>
> Commit: 486ff22d496697ddc93302fbc4b11ce84542a031
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13116038995&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Binding`
> Spec:
> <hr>Mon, 03 Feb 2025 16:12:35 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


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

## Summary by CodeRabbit

- **New Features**
- Upgraded page load functionality now triggers API actions seamlessly
upon page refresh, ensuring input fields display accurate, up-to-date
information.
- Enhanced application configuration supports dynamic widget behavior
for a more responsive and intuitive experience.
- Overall, these improvements boost reliability and streamline
interactions, delivering a more consistent user interface.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Sagar Khalasi 2025-02-03 21:46:52 +05:30 committed by GitHub
parent 2e598068b4
commit 6cd343ec8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 21 deletions

View File

@ -2,8 +2,6 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
const testdata = require("../../../../fixtures/testdata.json");
const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../../locators/publishWidgetspage.json");
import * as _ from "../../../../support/Objects/ObjectsCore";
@ -12,26 +10,18 @@ describe(
{ tags: ["@tag.Binding"] },
function () {
before(() => {
_.agHelper.AddDsl("MultipleInput");
_.homePage.NavigateToHome();
_.homePage.ImportApp("Api_withPageload_Input_TestData.json");
});
it("1. Will load an api on load", function () {
_.apiPage.CreateAndFillApi(
testdata.baseUrl + testdata.methods,
"PageLoadApi",
);
_.apiPage.ToggleOnPageLoadRun(true);
EditorNavigation.SelectEntityByName("PageLoadApi", EntityType.Query);
_.agHelper.RefreshPage();
_.apiPage.ResponseStatusCheck("200 OK"); //Verify if api is run on pageload!
});
it("2. Input widget updated with deafult data", function () {
EditorNavigation.SelectEntityByName("Input1", EntityType.Widget);
cy.get(widgetsPage.defaultInput).type("3");
cy.wait("@updateLayout")
.its("response.body.responseMeta.status")
.should("eq", 200);
cy.get(publish.inputWidget + " " + "input")
.first()
.invoke("attr", "value")
@ -39,14 +29,6 @@ describe(
});
it("3. Binding second input widget with API on PageLoad data and default data from input1 widget ", function () {
EditorNavigation.SelectEntityByName("Input3", EntityType.Widget);
cy.get(widgetsPage.defaultInput).type(testdata.pageloadBinding, {
parseSpecialCharSequences: false,
});
cy.wait("@updateLayout")
.its("response.body.responseMeta.status")
.should("eq", 200);
_.deployMode.DeployApp();
cy.get(publish.inputWidget + " " + "input")
.first()

File diff suppressed because one or more lines are too long