Skip to content

Commit

Permalink
test: replace 3rd party api with TED (#36594)
Browse files Browse the repository at this point in the history
replace 3rd party API with TED
/ok-to-test tags="@tag.JS"




<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11102666520>
> Commit: 06354a9
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11102666520&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.JS`
> Spec:
> <hr>Mon, 30 Sep 2024 09:26:01 UTC
<!-- end of auto-generated comment: Cypress test results  -->

---------

Co-authored-by: “NandanAnantharamu” <“[email protected]”>
  • Loading branch information
NandanAnantharamu and “NandanAnantharamu” authored Sep 30, 2024
1 parent 37c2cf5 commit 2090919
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ describe(
cy.fixture("datasources").then((datasourceFormData: any) => {
AppSidebar.navigate(AppSidebarButton.Editor);
apiPage.CreateAndFillApi(
"https://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json",
"Quotes",
"http://host.docker.internal:5001",
"AppsmithTed",
30000,
);
apiPage.ToggleConfirmBeforeRunning(true);
Expand All @@ -54,8 +54,8 @@ describe(
`export default {
callTrump: async () => {
return WhatTrumpThinks.run()},
callQuotes: () => {
return Quotes.run().then(()=> Quotes.data.quoteText);}
callAppsmithTed: () => {
return AppsmithTed.run()}
}`,
{
paste: true,
Expand All @@ -71,16 +71,16 @@ describe(
jsName as string,
EntityType.JSObject,
);
jsEditor.EnableDisableAsyncFuncSettings("callQuotes", false); //OnPageLoad made true once mapped with widget
jsEditor.EnableDisableAsyncFuncSettings("callAppsmithTed", false); //OnPageLoad made true once mapped with widget

EditorNavigation.SelectEntityByName("Input1", EntityType.Widget);
propPane.UpdatePropertyFieldValue(
"Default value",
"{{" + jsObjName + ".callQuotes.data}}",
"{{" + jsObjName + ".callAppsmithTed.data}}",
);
cy.get(locators._toastMsg)
.children()
.should("contain", "Quotes") //Quotes api also since its .data is accessed in callQuotes()
.should("contain", "AppsmithTed")
.and("contain", jsName as string)
.and("contain", "will be executed automatically on page load");

Expand Down

0 comments on commit 2090919

Please sign in to comment.