Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: replace 3rd party api with TED #36594

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading