Skip to content

Commit

Permalink
fix: changing only the mysql2 spec and reverting other changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AmanAgarwal041 committed Aug 28, 2024
1 parent c1d3112 commit 8a0bca2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
agHelper,
apiPage,
assertHelper,
dataManager,
deployMode,
entityItems,
jsEditor,
Expand Down Expand Up @@ -129,8 +128,8 @@ describe(
agHelper.AddDsl("multiPartFormDataDsl");

apiPage.CreateAndFillApi(
dataManager.dsValues[dataManager.defaultEnviorment].multipartAPI,
"MultipartAPI",
"https://api.cloudinary.com/v1_1/appsmithautomationcloud/image/upload?upload_preset=fbbhg4xu",
"CloudinaryUploadApi",
30000,
"POST",
);
Expand All @@ -146,7 +145,7 @@ describe(
myVar1: [],
myVar2: {},
upload: async () => {
await MultipartAPI.run().then(()=> showAlert('Image uploaded to Cloudinary successfully', 'success')).catch(err => showAlert(err.message, 'error'));
await CloudinaryUploadApi.run().then(()=> showAlert('Image uploaded to Cloudinary successfully', 'success')).catch(err => showAlert(err.message, 'error'));
await resetWidget('FilePicker1', true);
}
}`,
Expand All @@ -164,11 +163,11 @@ describe(
EditorNavigation.SelectEntityByName("Image1", EntityType.Widget);
propPane.UpdatePropertyFieldValue(
"Image",
"{{MultipartAPI.data.url}}",
"{{CloudinaryUploadApi.data.url}}",
);

EditorNavigation.SelectEntityByName(
"MultipartAPI",
"CloudinaryUploadApi",
EntityType.Api,
);

Expand Down Expand Up @@ -197,7 +196,7 @@ describe(
it("8. Checks MultiPart form data for a Array Type upload results in API error", () => {
const imageNameToUpload = "AAAFlowerVase.jpeg";
EditorNavigation.SelectEntityByName(
"MultipartAPI",
"CloudinaryUploadApi",
EntityType.Api,
);
apiPage.EnterBodyFormData(
Expand All @@ -216,7 +215,7 @@ describe(
agHelper.ClickButton("Select Files");
agHelper.UploadFile(imageNameToUpload);
assertHelper.AssertNetworkExecutionSuccess("@postExecute", false);
agHelper.ValidateToastMessage("MultipartAPI failed to execute");
agHelper.ValidateToastMessage("CloudinaryUploadApi failed to execute");
agHelper.AssertElementVisibility(locators._buttonByText("Select Files")); //verifying if reset in case of failure!
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ describe(
dataSources.RunQueryNVerifyResponseViews(10);
dataSources.AssertQueryTableResponse(5, "2112");
dataSources.AssertQueryTableResponse(6, "Mike's Liquors");
agHelper.ActionContextMenuWithInPane({
action: "Delete",
entityType: entityItems.Query,
});
// Commenting this deletion of query to make the generate crud work on the new page instead of the current page
// agHelper.ActionContextMenuWithInPane({
// action: "Delete",
// entityType: entityItems.Query,
// });
});

it("3. Verify Generate CRUD for the new table & Verify Deploy mode for table - Stores", () => {
Expand Down Expand Up @@ -361,7 +362,7 @@ describe(
table.WaitUntilTableLoad(0, 0, "v2");
//Delete the test data
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Page1",
entityNameinLeftSidebar: "Stores",
action: "Delete",
entityType: entityItems.Page,
});
Expand Down
3 changes: 0 additions & 3 deletions app/client/cypress/limited-tests.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# To run only limited tests - give the spec names in below format:
cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts
cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts
cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts
cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts

# For running all specs - uncomment below:
Expand Down
4 changes: 0 additions & 4 deletions app/client/cypress/support/Objects/DataManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ export class DataManager {
"http://host.docker.internal:5001/v1/mock-api-object?records=10",
echoApiUrl: "http://host.docker.internal:5001/v1/mock-api/echo",
randomCatfactUrl: "http://host.docker.internal:5001/v1/catfact/random",
multipartAPI:
"http://host.docker.internal:5001/v1/mock-api/echo-multipart",
randomTrumpApi:
"http://host.docker.internal:5001/v1/whatdoestrumpthink/random",
mockHttpCodeUrl: "http://host.docker.internal:5001/v1/mock-http-codes/",
Expand Down Expand Up @@ -181,8 +179,6 @@ export class DataManager {
mockApiUrl: "http://host.docker.internal:5001/v1/mock-api?records=10",
echoApiUrl: "http://host.docker.internal:5001/v1/mock-api/echo",
randomCatfactUrl: "http://host.docker.internal:5001/v1/catfact/random",
multipartAPI:
"http://host.docker.internal:5001/v1/mock-api/echo-multipart",
mockHttpCodeUrl: "http://host.docker.internal:5001/v1/mock-http-codes/",
AirtableBaseForME: "appubHrVbovcudwN6",
AirtableTableForME: "tblsFCQSskVFf7xNd",
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/support/Pages/ApiPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ export class ApiPage {
| "RAW",
) {
this.agHelper.GetNClick(this._bodyTypeSelect);
this.agHelper.GetNClick(this._bodyTypeToSelect(subTabName));
cy.xpath(this._bodyTypeToSelect(subTabName)).should("be.visible").click();
}

AssertRightPaneSelectedTab(tabName: RightPaneTabs) {
Expand Down

0 comments on commit 8a0bca2

Please sign in to comment.