Skip to content

Commit

Permalink
test: replace 3rd party api with TED
Browse files Browse the repository at this point in the history
  • Loading branch information
“NandanAnantharamu” committed Sep 28, 2024
1 parent 5995e42 commit 73716f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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
2 changes: 1 addition & 1 deletion app/client/cypress/limited-tests.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# To run only limited tests - give the spec names in below format:
cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js
cypress/e2e/Regression/ServerSide/OnLoadTests/JsOnLoad3_Spec.ts

# For running all specs - uncomment below:
#cypress/e2e/**/**/*
Expand Down

0 comments on commit 73716f9

Please sign in to comment.