PromucFlow_constructor/app/client/cypress/support/Pages/AssertHelper.ts

160 lines
4.6 KiB
TypeScript
Raw Normal View History

import "cypress-wait-until";
import { ObjectsRegistry } from "../Objects/Registry";
import { ReusableHelper } from "../Objects/ReusableHelper";
export const EntityItems = {
Page: 0,
Query: 1,
Api: 2,
JSObject: 3,
Widget: 4,
Datasource: 5,
} as const;
export type EntityItemsType = (typeof EntityItems)[keyof typeof EntityItems];
export class AssertHelper extends ReusableHelper {
public _modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
public isMac = Cypress.platform === "darwin";
public Sleep(timeout = 1000) {
cy.wait(timeout);
}
public AssertDocumentReady() {
cy.waitUntil(() =>
//cy.document().then((doc) => doc.readyState === "complete"),
cy.document().should((doc) => {
expect(doc.readyState).to.equal("complete");
}),
);
test: Cypress | CI Stabilize + Other test improvements (#28172) ## Description - **This PR flaky fixes below specs:** - GenerateCRUD/MySQL2_Spec.ts script fix - ServerSide/ApiTests/API_All_Verb_spec.js - Regression/Apps/PromisesApp_spec.js - TableV2_Property_ToggleJs_With_Binding_spec.js - GSheet cases failures due to EditApponHover method fix - Radio/Radio2_spec.ts, using `GetHeight` instead of `GetWidgetCSSHeight` - Select/Select3_Spec.ts - Widgets/Text/Text_new_feature_spec.js - Binding/API_with_List_Widget_spec.js - Workspace/LoginFromUIApp_spec.js - removed redundant code - QueryPane/DSDocs_Spec.ts - ServerSide/QueryPane/GoogleSheets_spec.ts - TableV2/Date_column_editing_1_spec.ts - Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts - script flow corrected - ServerSide/QueryPane/Mongo_Spec.js - **Added validation for form plugin response data, which addresses the Empty toast issue** - **Below specs are fixed for new appName localStorage changes:** - /SettingsPane/PageSettings_spec.ts - BugTests/Moment_Spec.ts - /Fork/ForkAppWithMultipleDS_Spec.ts - Fork/ForkApplicationWithinAppEditor_spec.ts - Fork/ForkApplication_spec.ts - /ClientSide/OtherUIFeatures/Analytics_spec.js - OtherUIFeatures/ApplicationURL_spec.js - OtherUIFeatures/ExportApplication_spec.js - Duplicate case removed - OtherUIFeatures/UpdateApplication_spec.js - VisualTests/JSEditorIndent_spec.js - Workspace/WorkspaceImportApplication_spec.js - **Improvemnets:** - deployMode.StubWindowNAssert() improved to validate `getPluginForm` instead of `getWorkspace` - agHelper.AddDsl() improved, removed wait times - appSettings.CheckUrl() - appName url updated - assertHelper.AssertDocumentReady() -removed wait times - assertHelper.AssertNetworkResponseData() - added for `getPluginForm` validation for Page loads - deployMode.DeployApp() -removed wait times - homePage.CreateNewWorkspace() - improved to set localStorage for workspaceName, workspaceId & create new workspace without new name - homePage.CreateNewApplication() - - improved to set localStorage for appName - jsEditor.NavigateToNewJSEditor() - improved to remove tooltip - cy.CreateAppInFirstListedWorkspace() - improved to set localStorage for appName, removed waitTimes, Removed rename of every app for every spec, calling AssertNetworkResponseData(getPluginForm) - cy.DeleteWorkspaceByApi() added - e2e.js - removed guid generation for first app, added cy.DeleteWorkspaceByApi() in after() #### Type of change - Script fix (non-breaking change which fixes an issue) ## Testing #### How Has This Been Tested? - [X] Cypress CI runs ## Checklist: #### QA activity: - [X] Added `Test Plan Approved` label after Cypress tests were reviewed
2023-10-20 02:15:47 +00:00
//cy.window({ timeout: 60000 }).should("have.property", "onload");//commenting to reduce time
}
public AssertDelete(entityType: EntityItemsType) {
let networkCall = "";
switch (entityType) {
case EntityItems.Api:
case EntityItems.Query:
networkCall = "deleteAction";
break;
case EntityItems.Widget:
networkCall = "updateLayout";
break;
case EntityItems.JSObject:
networkCall = "deleteJSCollection";
this.AssertContains("deleted successfully");
break;
case EntityItems.Datasource:
networkCall = "deleteDatasource";
break;
case EntityItems.Page:
networkCall = "deletePage";
break;
default:
networkCall && this.AssertNetworkStatus(networkCall);
}
}
public GetAliasName(aliasName: string) {
aliasName = aliasName.startsWith("@") ? aliasName : "@" + aliasName;
return aliasName;
}
chore: Release v1.9.44 (#28477) This is a promotion branch for the release v1.9.44 --------- Co-authored-by: NandanAnantharamu <67676905+NandanAnantharamu@users.noreply.github.com> Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com> Co-authored-by: Anagh Hegde <anagh@appsmith.com> Co-authored-by: Nilesh Sarupriya <nilesh@appsmith.com> Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com> Co-authored-by: Abhinav Jha <abhinav@appsmith.com> Co-authored-by: Dhruvik Neharia <dhruvik@appsmith.com> Co-authored-by: Pawan Kumar <pawan.stardust@gmail.com> Co-authored-by: Appsmith Bot <74705725+appsmith-bot@users.noreply.github.com> Co-authored-by: Nilansh Bansal <nilansh@appsmith.com> Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com> Co-authored-by: Hetu Nandu <hetu@appsmith.com> Co-authored-by: Preet Sidhu <preetsidhu.bits@gmail.com> Co-authored-by: Nidhi <nidhi@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Aman Agarwal <aman@appsmith.com> Co-authored-by: Guilherme Ventura <1488378+danguilherme@users.noreply.github.com> Co-authored-by: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com> Co-authored-by: Ayush Pahwa <ayush@appsmith.com> Co-authored-by: Favour Ohanekwu <fohanekwu@gmail.com> Co-authored-by: Manish Kumar <107841575+sondermanish@users.noreply.github.com> Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com> Co-authored-by: Saroj <43822041+sarojsarab@users.noreply.github.com> Co-authored-by: sneha122 <sneha@appsmith.com> Co-authored-by: “sneha122” <“sneha@appsmith.com”> Co-authored-by: Ankita Kinger <ankita@appsmith.com> Co-authored-by: danceAndJive <99446612+danceAndJive@users.noreply.github.com> Co-authored-by: Kyle Zhang <u6133716@anu.edu.au> Co-authored-by: Rishabh Rathod <rishabh.rathod@appsmith.com> Co-authored-by: sharanya-appsmith <135708039+sharanya-appsmith@users.noreply.github.com> Co-authored-by: Diljit <diljit@appsmith.com> Co-authored-by: Vemparala Surya Vamsi <121419957+vsvamsi1@users.noreply.github.com> Co-authored-by: Rahul Barwal <rahul.barwal@appsmith.com> Co-authored-by: Jacques Ikot <jacquesikot@gmail.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Victor Kostyuk <torcoste@gmail.com> Co-authored-by: Rudraprasad Das <rudra@appsmith.com> Co-authored-by: manish kumar <manish@appsmith.com>
2023-11-06 14:42:29 +00:00
public WaitForNetworkCall(aliasName: string, responseTimeout = 150000) {
// cy.wait(aliasName).then(($apiCall: any) => {
// expect($apiCall.response.body.responseMeta.status).to.eq(expectedStatus);
// });
chore: Release v1.9.44 (#28477) This is a promotion branch for the release v1.9.44 --------- Co-authored-by: NandanAnantharamu <67676905+NandanAnantharamu@users.noreply.github.com> Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com> Co-authored-by: Anagh Hegde <anagh@appsmith.com> Co-authored-by: Nilesh Sarupriya <nilesh@appsmith.com> Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com> Co-authored-by: Abhinav Jha <abhinav@appsmith.com> Co-authored-by: Dhruvik Neharia <dhruvik@appsmith.com> Co-authored-by: Pawan Kumar <pawan.stardust@gmail.com> Co-authored-by: Appsmith Bot <74705725+appsmith-bot@users.noreply.github.com> Co-authored-by: Nilansh Bansal <nilansh@appsmith.com> Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com> Co-authored-by: Hetu Nandu <hetu@appsmith.com> Co-authored-by: Preet Sidhu <preetsidhu.bits@gmail.com> Co-authored-by: Nidhi <nidhi@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Aman Agarwal <aman@appsmith.com> Co-authored-by: Guilherme Ventura <1488378+danguilherme@users.noreply.github.com> Co-authored-by: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com> Co-authored-by: Ayush Pahwa <ayush@appsmith.com> Co-authored-by: Favour Ohanekwu <fohanekwu@gmail.com> Co-authored-by: Manish Kumar <107841575+sondermanish@users.noreply.github.com> Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com> Co-authored-by: Saroj <43822041+sarojsarab@users.noreply.github.com> Co-authored-by: sneha122 <sneha@appsmith.com> Co-authored-by: “sneha122” <“sneha@appsmith.com”> Co-authored-by: Ankita Kinger <ankita@appsmith.com> Co-authored-by: danceAndJive <99446612+danceAndJive@users.noreply.github.com> Co-authored-by: Kyle Zhang <u6133716@anu.edu.au> Co-authored-by: Rishabh Rathod <rishabh.rathod@appsmith.com> Co-authored-by: sharanya-appsmith <135708039+sharanya-appsmith@users.noreply.github.com> Co-authored-by: Diljit <diljit@appsmith.com> Co-authored-by: Vemparala Surya Vamsi <121419957+vsvamsi1@users.noreply.github.com> Co-authored-by: Rahul Barwal <rahul.barwal@appsmith.com> Co-authored-by: Jacques Ikot <jacquesikot@gmail.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Victor Kostyuk <torcoste@gmail.com> Co-authored-by: Rudraprasad Das <rudra@appsmith.com> Co-authored-by: manish kumar <manish@appsmith.com>
2023-11-06 14:42:29 +00:00
this.Sleep(); //wait a bit to avoid flaky tests
return cy
.wait(this.GetAliasName(aliasName), { timeout: responseTimeout })
.then((interceptions) => {
return cy
.get(this.GetAliasName(aliasName), { timeout: responseTimeout })
.its("response");
});
}
chore: Release v1.9.44 (#28477) This is a promotion branch for the release v1.9.44 --------- Co-authored-by: NandanAnantharamu <67676905+NandanAnantharamu@users.noreply.github.com> Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com> Co-authored-by: Anagh Hegde <anagh@appsmith.com> Co-authored-by: Nilesh Sarupriya <nilesh@appsmith.com> Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com> Co-authored-by: Abhinav Jha <abhinav@appsmith.com> Co-authored-by: Dhruvik Neharia <dhruvik@appsmith.com> Co-authored-by: Pawan Kumar <pawan.stardust@gmail.com> Co-authored-by: Appsmith Bot <74705725+appsmith-bot@users.noreply.github.com> Co-authored-by: Nilansh Bansal <nilansh@appsmith.com> Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com> Co-authored-by: Hetu Nandu <hetu@appsmith.com> Co-authored-by: Preet Sidhu <preetsidhu.bits@gmail.com> Co-authored-by: Nidhi <nidhi@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Aman Agarwal <aman@appsmith.com> Co-authored-by: Guilherme Ventura <1488378+danguilherme@users.noreply.github.com> Co-authored-by: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com> Co-authored-by: Ayush Pahwa <ayush@appsmith.com> Co-authored-by: Favour Ohanekwu <fohanekwu@gmail.com> Co-authored-by: Manish Kumar <107841575+sondermanish@users.noreply.github.com> Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com> Co-authored-by: Saroj <43822041+sarojsarab@users.noreply.github.com> Co-authored-by: sneha122 <sneha@appsmith.com> Co-authored-by: “sneha122” <“sneha@appsmith.com”> Co-authored-by: Ankita Kinger <ankita@appsmith.com> Co-authored-by: danceAndJive <99446612+danceAndJive@users.noreply.github.com> Co-authored-by: Kyle Zhang <u6133716@anu.edu.au> Co-authored-by: Rishabh Rathod <rishabh.rathod@appsmith.com> Co-authored-by: sharanya-appsmith <135708039+sharanya-appsmith@users.noreply.github.com> Co-authored-by: Diljit <diljit@appsmith.com> Co-authored-by: Vemparala Surya Vamsi <121419957+vsvamsi1@users.noreply.github.com> Co-authored-by: Rahul Barwal <rahul.barwal@appsmith.com> Co-authored-by: Jacques Ikot <jacquesikot@gmail.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Victor Kostyuk <torcoste@gmail.com> Co-authored-by: Rudraprasad Das <rudra@appsmith.com> Co-authored-by: manish kumar <manish@appsmith.com>
2023-11-06 14:42:29 +00:00
public AssertNetworkStatus(
aliasName: string,
expectedStatus: number | number[] = 200,
waitForNetworkCall = true,
) {
if (waitForNetworkCall) {
// If waitForNetworkCall is true, then use the response from WaitForNetworkCall call
return this.WaitForNetworkCall(aliasName).then((response: any) =>
this.processNetworkStatus(response, expectedStatus),
);
} else {
// If interception is not available, directly get the alias & use it
return cy
.get(this.GetAliasName(aliasName))
.its("response")
.then((interception: any) =>
this.processNetworkStatus(interception, expectedStatus),
);
}
}
chore: Release v1.9.44 (#28477) This is a promotion branch for the release v1.9.44 --------- Co-authored-by: NandanAnantharamu <67676905+NandanAnantharamu@users.noreply.github.com> Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com> Co-authored-by: Anagh Hegde <anagh@appsmith.com> Co-authored-by: Nilesh Sarupriya <nilesh@appsmith.com> Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com> Co-authored-by: Abhinav Jha <abhinav@appsmith.com> Co-authored-by: Dhruvik Neharia <dhruvik@appsmith.com> Co-authored-by: Pawan Kumar <pawan.stardust@gmail.com> Co-authored-by: Appsmith Bot <74705725+appsmith-bot@users.noreply.github.com> Co-authored-by: Nilansh Bansal <nilansh@appsmith.com> Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com> Co-authored-by: Hetu Nandu <hetu@appsmith.com> Co-authored-by: Preet Sidhu <preetsidhu.bits@gmail.com> Co-authored-by: Nidhi <nidhi@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Aman Agarwal <aman@appsmith.com> Co-authored-by: Guilherme Ventura <1488378+danguilherme@users.noreply.github.com> Co-authored-by: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com> Co-authored-by: Ayush Pahwa <ayush@appsmith.com> Co-authored-by: Favour Ohanekwu <fohanekwu@gmail.com> Co-authored-by: Manish Kumar <107841575+sondermanish@users.noreply.github.com> Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com> Co-authored-by: Saroj <43822041+sarojsarab@users.noreply.github.com> Co-authored-by: sneha122 <sneha@appsmith.com> Co-authored-by: “sneha122” <“sneha@appsmith.com”> Co-authored-by: Ankita Kinger <ankita@appsmith.com> Co-authored-by: danceAndJive <99446612+danceAndJive@users.noreply.github.com> Co-authored-by: Kyle Zhang <u6133716@anu.edu.au> Co-authored-by: Rishabh Rathod <rishabh.rathod@appsmith.com> Co-authored-by: sharanya-appsmith <135708039+sharanya-appsmith@users.noreply.github.com> Co-authored-by: Diljit <diljit@appsmith.com> Co-authored-by: Vemparala Surya Vamsi <121419957+vsvamsi1@users.noreply.github.com> Co-authored-by: Rahul Barwal <rahul.barwal@appsmith.com> Co-authored-by: Jacques Ikot <jacquesikot@gmail.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Victor Kostyuk <torcoste@gmail.com> Co-authored-by: Rudraprasad Das <rudra@appsmith.com> Co-authored-by: manish kumar <manish@appsmith.com>
2023-11-06 14:42:29 +00:00
private processNetworkStatus(
response: any,
expectedStatus: number | number[],
) {
const responseStatus = Number(response.body.responseMeta.status);
const expectedStatusArray = Array.isArray(expectedStatus)
? expectedStatus
: [expectedStatus];
expect(expectedStatusArray).to.include(responseStatus);
return responseStatus;
}
chore: Release v1.9.44 (#28477) This is a promotion branch for the release v1.9.44 --------- Co-authored-by: NandanAnantharamu <67676905+NandanAnantharamu@users.noreply.github.com> Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com> Co-authored-by: Anagh Hegde <anagh@appsmith.com> Co-authored-by: Nilesh Sarupriya <nilesh@appsmith.com> Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com> Co-authored-by: Abhinav Jha <abhinav@appsmith.com> Co-authored-by: Dhruvik Neharia <dhruvik@appsmith.com> Co-authored-by: Pawan Kumar <pawan.stardust@gmail.com> Co-authored-by: Appsmith Bot <74705725+appsmith-bot@users.noreply.github.com> Co-authored-by: Nilansh Bansal <nilansh@appsmith.com> Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com> Co-authored-by: Hetu Nandu <hetu@appsmith.com> Co-authored-by: Preet Sidhu <preetsidhu.bits@gmail.com> Co-authored-by: Nidhi <nidhi@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Aman Agarwal <aman@appsmith.com> Co-authored-by: Guilherme Ventura <1488378+danguilherme@users.noreply.github.com> Co-authored-by: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com> Co-authored-by: Ayush Pahwa <ayush@appsmith.com> Co-authored-by: Favour Ohanekwu <fohanekwu@gmail.com> Co-authored-by: Manish Kumar <107841575+sondermanish@users.noreply.github.com> Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com> Co-authored-by: Saroj <43822041+sarojsarab@users.noreply.github.com> Co-authored-by: sneha122 <sneha@appsmith.com> Co-authored-by: “sneha122” <“sneha@appsmith.com”> Co-authored-by: Ankita Kinger <ankita@appsmith.com> Co-authored-by: danceAndJive <99446612+danceAndJive@users.noreply.github.com> Co-authored-by: Kyle Zhang <u6133716@anu.edu.au> Co-authored-by: Rishabh Rathod <rishabh.rathod@appsmith.com> Co-authored-by: sharanya-appsmith <135708039+sharanya-appsmith@users.noreply.github.com> Co-authored-by: Diljit <diljit@appsmith.com> Co-authored-by: Vemparala Surya Vamsi <121419957+vsvamsi1@users.noreply.github.com> Co-authored-by: Rahul Barwal <rahul.barwal@appsmith.com> Co-authored-by: Jacques Ikot <jacquesikot@gmail.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Victor Kostyuk <torcoste@gmail.com> Co-authored-by: Rudraprasad Das <rudra@appsmith.com> Co-authored-by: manish kumar <manish@appsmith.com>
2023-11-06 14:42:29 +00:00
public AssertNetworkResponseData(
aliasName: string,
waitForNetworkCall = true,
) {
if (waitForNetworkCall) {
// If waitForNetworkCall is true, then use the interception from received call
this.WaitForNetworkCall(aliasName).then((interception: any) => {
this.processNetworkResponseData(interception);
});
} else {
// If interception is not available, directly get the alias & use it
cy.get(this.GetAliasName(aliasName))
.its("response")
.then((interception: any) => {
this.processNetworkResponseData(interception);
});
}
test: Cypress | CI Stabilize + Other test improvements (#28172) ## Description - **This PR flaky fixes below specs:** - GenerateCRUD/MySQL2_Spec.ts script fix - ServerSide/ApiTests/API_All_Verb_spec.js - Regression/Apps/PromisesApp_spec.js - TableV2_Property_ToggleJs_With_Binding_spec.js - GSheet cases failures due to EditApponHover method fix - Radio/Radio2_spec.ts, using `GetHeight` instead of `GetWidgetCSSHeight` - Select/Select3_Spec.ts - Widgets/Text/Text_new_feature_spec.js - Binding/API_with_List_Widget_spec.js - Workspace/LoginFromUIApp_spec.js - removed redundant code - QueryPane/DSDocs_Spec.ts - ServerSide/QueryPane/GoogleSheets_spec.ts - TableV2/Date_column_editing_1_spec.ts - Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts - script flow corrected - ServerSide/QueryPane/Mongo_Spec.js - **Added validation for form plugin response data, which addresses the Empty toast issue** - **Below specs are fixed for new appName localStorage changes:** - /SettingsPane/PageSettings_spec.ts - BugTests/Moment_Spec.ts - /Fork/ForkAppWithMultipleDS_Spec.ts - Fork/ForkApplicationWithinAppEditor_spec.ts - Fork/ForkApplication_spec.ts - /ClientSide/OtherUIFeatures/Analytics_spec.js - OtherUIFeatures/ApplicationURL_spec.js - OtherUIFeatures/ExportApplication_spec.js - Duplicate case removed - OtherUIFeatures/UpdateApplication_spec.js - VisualTests/JSEditorIndent_spec.js - Workspace/WorkspaceImportApplication_spec.js - **Improvemnets:** - deployMode.StubWindowNAssert() improved to validate `getPluginForm` instead of `getWorkspace` - agHelper.AddDsl() improved, removed wait times - appSettings.CheckUrl() - appName url updated - assertHelper.AssertDocumentReady() -removed wait times - assertHelper.AssertNetworkResponseData() - added for `getPluginForm` validation for Page loads - deployMode.DeployApp() -removed wait times - homePage.CreateNewWorkspace() - improved to set localStorage for workspaceName, workspaceId & create new workspace without new name - homePage.CreateNewApplication() - - improved to set localStorage for appName - jsEditor.NavigateToNewJSEditor() - improved to remove tooltip - cy.CreateAppInFirstListedWorkspace() - improved to set localStorage for appName, removed waitTimes, Removed rename of every app for every spec, calling AssertNetworkResponseData(getPluginForm) - cy.DeleteWorkspaceByApi() added - e2e.js - removed guid generation for first app, added cy.DeleteWorkspaceByApi() in after() #### Type of change - Script fix (non-breaking change which fixes an issue) ## Testing #### How Has This Been Tested? - [X] Cypress CI runs ## Checklist: #### QA activity: - [X] Added `Test Plan Approved` label after Cypress tests were reviewed
2023-10-20 02:15:47 +00:00
}
chore: Release v1.9.44 (#28477) This is a promotion branch for the release v1.9.44 --------- Co-authored-by: NandanAnantharamu <67676905+NandanAnantharamu@users.noreply.github.com> Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com> Co-authored-by: Anagh Hegde <anagh@appsmith.com> Co-authored-by: Nilesh Sarupriya <nilesh@appsmith.com> Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com> Co-authored-by: Abhinav Jha <abhinav@appsmith.com> Co-authored-by: Dhruvik Neharia <dhruvik@appsmith.com> Co-authored-by: Pawan Kumar <pawan.stardust@gmail.com> Co-authored-by: Appsmith Bot <74705725+appsmith-bot@users.noreply.github.com> Co-authored-by: Nilansh Bansal <nilansh@appsmith.com> Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com> Co-authored-by: Hetu Nandu <hetu@appsmith.com> Co-authored-by: Preet Sidhu <preetsidhu.bits@gmail.com> Co-authored-by: Nidhi <nidhi@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Aman Agarwal <aman@appsmith.com> Co-authored-by: Guilherme Ventura <1488378+danguilherme@users.noreply.github.com> Co-authored-by: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com> Co-authored-by: Ayush Pahwa <ayush@appsmith.com> Co-authored-by: Favour Ohanekwu <fohanekwu@gmail.com> Co-authored-by: Manish Kumar <107841575+sondermanish@users.noreply.github.com> Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com> Co-authored-by: Saroj <43822041+sarojsarab@users.noreply.github.com> Co-authored-by: sneha122 <sneha@appsmith.com> Co-authored-by: “sneha122” <“sneha@appsmith.com”> Co-authored-by: Ankita Kinger <ankita@appsmith.com> Co-authored-by: danceAndJive <99446612+danceAndJive@users.noreply.github.com> Co-authored-by: Kyle Zhang <u6133716@anu.edu.au> Co-authored-by: Rishabh Rathod <rishabh.rathod@appsmith.com> Co-authored-by: sharanya-appsmith <135708039+sharanya-appsmith@users.noreply.github.com> Co-authored-by: Diljit <diljit@appsmith.com> Co-authored-by: Vemparala Surya Vamsi <121419957+vsvamsi1@users.noreply.github.com> Co-authored-by: Rahul Barwal <rahul.barwal@appsmith.com> Co-authored-by: Jacques Ikot <jacquesikot@gmail.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Victor Kostyuk <torcoste@gmail.com> Co-authored-by: Rudraprasad Das <rudra@appsmith.com> Co-authored-by: manish kumar <manish@appsmith.com>
2023-11-06 14:42:29 +00:00
private processNetworkResponseData(response: any) {
expect(response.body.data).to.not.be.empty;
}
public AssertNetworkExecutionSuccess(
aliasName: string,
expectedRes = true,
waitForNetworkCall = true,
) {
waitForNetworkCall && this.WaitForNetworkCall(aliasName);
test: Cypress | (DI) S3 added validations (Cont.,) + CI Stabilize (#26486) ## Description **- This PR includes below:** - NavigateBacktoEditor() improved - Flaky fixed - ClientSide/EmbedSettings/EmbedSettings_spec.js- 1st test - ServerSide/QueryPane/S3_1_spec.js - 1st test - handling added error message - Sanity/Datasources/Arango_Basic_Spec.ts - 3rd test - schema pop-up handle - ClientSide/FormLogin/EnableFormLogin_spec.js - server restart fix - Moved AssertNetworkExecutionSuccess to AssertHelper - GetNAssertContains() simplified - Widgets/ListV2/DataIdentifierProperty_spec.ts - 7th case flaky fix - /Widgets/Checkbox/CheckboxGroup2_spec.js - flaky fix - BugTests/AllWidgets_Reset_Spec.ts - script improved - /Widgets/Radio/Radio_spec.js - script improved - AssertExistingCheckedState() improved to validate attribute & checked state - ClickButton() improved - AssertElementEnabledDisabled() improved - UpdateInput(), replaced with TypeText() **- New scripting for:** - S3 - Deploy mode validations added - S3 - Edit File validation added from Deploy page - S3 - Upon file upload, validating button changes - S3 - Verify max number of files upload - S3 - File name Prefix search & Delete improved - S3_2_spec from js to ts helpers - Tc # 2439 scripted #### Type of change - Script fix (non-breaking change which fixes an issue) ## Testing > #### How Has This Been Tested? - [X] Cypress CI runs ## Checklist: #### QA activity: - [X] Added `Test Plan Approved` label after Cypress tests were reviewed
2023-08-21 07:49:28 +00:00
cy.get(aliasName)
.its("response.body.data.isExecutionSuccess")
.should("eq", expectedRes);
}
public AssertContains(
text: string | RegExp,
exists: "exist" | "not.exist" | "be.visible" = "exist",
selector?: string,
) {
if (selector) {
return cy.contains(selector, text).should(exists);
}
return cy.contains(text).should(exists);
}
}