Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f5f411c
CurrencyInputIssue_Spec removed wait
Aishwarya-U-R Dec 6, 2023
47a8863
Merge branch 'release' into test/dynamicwaitremove
Aishwarya-U-R Dec 7, 2023
f959ed1
GetElement improved
Aishwarya-U-R Dec 7, 2023
0471309
Merge branch 'release' into test/dynamicwaitremove
Aishwarya-U-R Dec 7, 2023
476f5de
run all
Aishwarya-U-R Dec 7, 2023
6c033a4
removed empty ReusableHelper
Aishwarya-U-R Dec 7, 2023
d6083ca
Table.ts methods fix
Aishwarya-U-R Dec 7, 2023
873cc7f
Merge branch 'release' into test/dynamicwaitremove
Aishwarya-U-R Dec 7, 2023
5e1ab82
/Widgets/Multiselect/RTL_support.ts fix
Aishwarya-U-R Dec 7, 2023
4d24400
Merge branch 'release' into test/dynamicwaitremove
Aishwarya-U-R Dec 7, 2023
ac71070
fix
Aishwarya-U-R Dec 7, 2023
4810bdd
eleWidth call fix
Aishwarya-U-R Dec 7, 2023
9f080bb
fix lint
Aishwarya-U-R Dec 7, 2023
185138c
skipping dscrudbindings
Aishwarya-U-R Dec 7, 2023
ae2c5de
fix lint
Aishwarya-U-R Dec 7, 2023
544d7d3
Merge branch 'release' into test/dynamicwaitremove
Aishwarya-U-R Dec 8, 2023
1bccc01
TableV2_Widget_API_Pagination_spec fix
Aishwarya-U-R Dec 8, 2023
57d3c28
TableV2_Widget_API_Pagination_spec remove wait
Aishwarya-U-R Dec 8, 2023
26ca80b
Debugger/Widget_property_navigation_spec.ts update
Aishwarya-U-R Dec 8, 2023
6ab788c
/Radio/Radio2_spec.ts update
Aishwarya-U-R Dec 8, 2023
d478a29
S3_1 spec fix
Aishwarya-U-R Dec 8, 2023
f4271c6
Merge branch 'release' into test/dynamicwaitremove
Aishwarya-U-R Dec 8, 2023
607863f
Merge branch 'release' into test/dynamicwaitremove
Aishwarya-U-R Dec 8, 2023
4c42c2d
Library_spec.ts reference fix
Aishwarya-U-R Dec 9, 2023
4fb8205
Merge branch 'release' into test/dynamicwaitremove
Aishwarya-U-R Dec 9, 2023
e21f3c8
skip ForkTemplateToGitConnectedApp.js for limited run
Aishwarya-U-R Dec 9, 2023
71cbb0e
remove only
Aishwarya-U-R Dec 9, 2023
f710a35
run only ApiTests/API_Unique_name_spec.js
Aishwarya-U-R Dec 9, 2023
282611e
removed wait /Widgets/Modal/Modal_spec.ts
Aishwarya-U-R Dec 9, 2023
c4a449a
run limit
Aishwarya-U-R Dec 9, 2023
8c092d0
run limit
Aishwarya-U-R Dec 9, 2023
a50d27d
run modal spec
Aishwarya-U-R Dec 9, 2023
d0615d5
run modal spec
Aishwarya-U-R Dec 9, 2023
f28f80c
run both
Aishwarya-U-R Dec 9, 2023
fbb0f5c
run all
Aishwarya-U-R Dec 9, 2023
bb303d4
Merge branch 'release' into test/dynamicwaitremove
Aishwarya-U-R Dec 9, 2023
7b07fc3
WaitUntilEleDisappear improve
Aishwarya-U-R Dec 11, 2023
a929615
Merge branch 'release' into test/dynamicwaitremove
Aishwarya-U-R Dec 11, 2023
247b49c
clean up
Aishwarya-U-R Dec 11, 2023
073b86e
remove comment
Aishwarya-U-R Dec 11, 2023
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
@@ -1,4 +1,3 @@
/// <reference types="Cypress" />
import { homePage, agHelper } from "../../../support/Objects/ObjectsCore";
import reconnectDatasourceModal from "../../../locators/ReconnectLocators";
const themelocators = require("../../../locators/ThemeLocators.json");
Expand All @@ -12,13 +11,11 @@ describe("Currency Input Issue", function () {
agHelper.VisitNAssert("/applications", "getReleaseItems");
homePage.ImportApp("CurrencyInputIssueExport.json");
cy.wait("@importNewApplication").then((interception) => {
agHelper.Sleep();
const { isPartialImport } = interception.response.body.data;
if (isPartialImport) {
cy.get(reconnectDatasourceModal.SkipToAppBtn).click({
force: true,
});
cy.wait(2000);
} else {
homePage.AssertImportToast();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import EditorNavigation, {
const commonlocators = require("../../../../locators/commonlocators.json");
import {
agHelper,
entityExplorer,
locators,
propPane,
apiPage,
table,
Expand Down Expand Up @@ -34,10 +34,10 @@ describe("Test Create Api and Bind to Table widget V2", function () {
cy.get(`.t--widget-tablewidgetv2 .t--table-widget-next-page`)
.first()
.click();
cy.wait(2000);
cy.get(`.t--widget-tablewidgetv2 .page-item`)
.first()
.should("contain", "2");
agHelper.WaitUntilToastDisappear("done");
});

it("2. Bug #22477: should check whether the next page button is disabled and not clickable when last page is reached", () => {
Expand All @@ -51,6 +51,6 @@ describe("Test Create Api and Bind to Table widget V2", function () {
agHelper.GetNClick(table._nextPage("v2"));

agHelper.AssertAttribute(table._nextPage("v2"), "disabled", "disabled");
agHelper.AssertElementAbsence(commonlocators._toastMsg);
agHelper.AssertElementAbsence(locators._toastMsg);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ describe("excludeForAirgap", "Widget property navigation", () => {
_.propPane.NavigateBackToPropertyPane();
_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.ClicklogEntityLink();
_.agHelper.GetElement(_.propPane._paneTitle).contains("Tab 2");
_.agHelper.GetNAssertContains(_.propPane._paneTitle, "Tab 2");
_.propPane.AssertIfPropertyIsVisible("visible");

_.debuggerHelper.CloseBottomBar();
EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget);
_.entityExplorer.DeleteWidgetFromEntityExplorer("Tabs1");
Expand All @@ -48,9 +47,8 @@ describe("excludeForAirgap", "Widget property navigation", () => {
_.propPane.NavigateBackToPropertyPane();
_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.ClicklogEntityLink();
_.agHelper.GetElement(_.propPane._paneTitle).contains("Menu Item 1");
_.agHelper.GetNAssertContains(_.propPane._paneTitle, "Menu Item 1");
_.propPane.AssertIfPropertyIsVisible("icon");

_.debuggerHelper.CloseBottomBar();
EditorNavigation.SelectEntityByName("ButtonGroup1", EntityType.Widget);
_.entityExplorer.DeleteWidgetFromEntityExplorer("ButtonGroup1");
Expand All @@ -66,10 +64,9 @@ describe("excludeForAirgap", "Widget property navigation", () => {
_.propPane.NavigateBackToPropertyPane();
_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.ClicklogEntityLink();
_.agHelper.GetElement(_.propPane._paneTitle).contains("Second Menu Item");
_.agHelper.GetNAssertContains(_.propPane._paneTitle, "Second Menu Item");
_.agHelper.Sleep();
_.propPane.AssertIfPropertyIsVisible("disabled");

_.debuggerHelper.CloseBottomBar();
EditorNavigation.SelectEntityByName("MenuButton1", EntityType.Widget);
_.entityExplorer.DeleteWidgetFromEntityExplorer("MenuButton1");
Expand Down Expand Up @@ -113,7 +110,7 @@ describe("excludeForAirgap", "Widget property navigation", () => {

_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.ClicklogEntityLink();
_.agHelper.GetElement(_.propPane._paneTitle).contains("Custom Field 2");
_.agHelper.GetNAssertContains(_.propPane._paneTitle, "Custom Field 2");
_.propPane.AssertIfPropertyIsVisible("borderradius");

_.debuggerHelper.CloseBottomBar();
Expand All @@ -136,8 +133,7 @@ describe("excludeForAirgap", "Widget property navigation", () => {

_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.ClicklogEntityLink(true);
_.agHelper.GetElement(_.propPane._paneTitle).contains("First Menu Item");

_.agHelper.GetNAssertContains(_.propPane._paneTitle, "First Menu Item");
_.debuggerHelper.CloseBottomBar();
EditorNavigation.SelectEntityByName("MenuButton1", EntityType.Widget);
_.entityExplorer.DeleteWidgetFromEntityExplorer("MenuButton1");
Expand Down Expand Up @@ -176,8 +172,7 @@ describe("excludeForAirgap", "Widget property navigation", () => {

_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.ClicklogEntityLink();
_.agHelper.GetElement(_.propPane._paneTitle).contains("imdb_id");

_.agHelper.GetNAssertContains(_.propPane._paneTitle, "imdb_id");
_.debuggerHelper.CloseBottomBar();
EditorNavigation.SelectEntityByName("Table1", EntityType.Widget);
_.entityExplorer.DeleteWidgetFromEntityExplorer("Table1");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import HomePage from "../../../../locators/HomePage";
import * as _ from "../../../../support/Objects/ObjectsCore";
import {
agHelper,
entityExplorer,
jsEditor,
deployMode,
homePage,
debuggerHelper,
installer,
draggableWidgets,
} from "../../../../support/Objects/ObjectsCore";
import {
AppSidebar,
AppSidebarButton,
Expand All @@ -10,27 +19,27 @@ import {
describe("excludeForAirgap", "Tests JS Libraries", () => {
it("1. Validates Library install/uninstall", () => {
AppSidebar.navigate(AppSidebarButton.Libraries);
_.installer.OpenInstaller();
_.installer.InstallLibrary("uuidjs", "UUID");
_.installer.uninstallLibrary("uuidjs");
_.installer.assertUnInstall("uuidjs");
installer.OpenInstaller();
installer.InstallLibrary("uuidjs", "UUID");
installer.uninstallLibrary("uuidjs");
installer.assertUnInstall("uuidjs");
});

it("2. Installs the library against a unique namespace when there is a collision with the existing entity", () => {
AppSidebar.navigate(AppSidebarButton.Editor);
_.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TABLE, 200, 200);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE, 200, 200);
PageLeftPane.switchSegment(PagePaneSegment.Explorer);
_.entityExplorer.RenameEntityFromExplorer("Table1", "jsonwebtoken");
entityExplorer.RenameEntityFromExplorer("Table1", "jsonwebtoken");
AppSidebar.navigate(AppSidebarButton.Libraries);
_.installer.OpenInstaller();
_.installer.InstallLibrary("jsonwebtoken", "jsonwebtoken_1", true);
installer.OpenInstaller();
installer.InstallLibrary("jsonwebtoken", "jsonwebtoken_1", true);
});

it("3. Checks jspdf library", () => {
AppSidebar.navigate(AppSidebarButton.Libraries);
_.installer.OpenInstaller();
_.installer.InstallLibrary("jspdf", "jspdf");
_.jsEditor.CreateJSObject(
installer.OpenInstaller();
installer.InstallLibrary("jspdf", "jspdf");
jsEditor.CreateJSObject(
`export default {
myFun1: () => {
const doc = new jspdf.jsPDF();
Expand All @@ -47,26 +56,26 @@ describe("excludeForAirgap", "Tests JS Libraries", () => {
prettify: true,
},
);
_.jsEditor.RunJSObj();
_.debuggerHelper.ClickResponseTab();
_.agHelper.AssertContains("data:application/pdf;filename=generated.pdf");
jsEditor.RunJSObj();
debuggerHelper.ClickResponseTab();
agHelper.AssertContains("data:application/pdf;filename=generated.pdf");
});

it("4. ESM build should pass installation, uninstallation and reinstallation", () => {
AppSidebar.navigate(AppSidebarButton.Libraries);
_.installer.OpenInstaller();
_.installer.InstallLibraryViaURL(
installer.OpenInstaller();
installer.InstallLibraryViaURL(
"https://cdn.jsdelivr.net/npm/fast-xml-parser@4.2.7/+esm",
"fast_xml_parser",
);
_.agHelper.Sleep(2000);
agHelper.Sleep(2000);
// Uninstallation should succeed
_.installer.uninstallLibrary("fast_xml_parser");
_.installer.assertUnInstall("fast_xml_parser");
installer.uninstallLibrary("fast_xml_parser");
installer.assertUnInstall("fast_xml_parser");

// Reinstallation should succeed with the same accessor
_.installer.OpenInstaller();
_.installer.InstallLibraryViaURL(
installer.OpenInstaller();
installer.InstallLibraryViaURL(
"https://cdn.jsdelivr.net/npm/fast-xml-parser@4.2.7/+esm",
"fast_xml_parser",
);
Expand All @@ -75,43 +84,43 @@ describe("excludeForAirgap", "Tests JS Libraries", () => {
it("5. Shows list of recommended libraries", () => {
const recommendedLibraryNames = ["jsonwebtoken", "jspdf", "bcryptjs"];
AppSidebar.navigate(AppSidebarButton.Libraries);
_.installer.OpenInstaller();
for (const recommendedLib of recommendedLibraryNames) {
installer.OpenInstaller();
for (const [index, recommendedLib] of recommendedLibraryNames.entries()) {
cy.contains(recommendedLib);
}
});

it("6. Checks installation in exported/forked app", () => {
_.homePage.NavigateToHome();
_.homePage.ImportApp("library_export.json");
_.homePage.AssertImportToast();
_.agHelper.ValidateToastMessage("true");
_.agHelper.WaitUntilAllToastsDisappear();
homePage.NavigateToHome();
homePage.ImportApp("library_export.json");
homePage.AssertImportToast();
agHelper.ValidateToastMessage("true");
agHelper.WaitUntilAllToastsDisappear();

//Checks installation in forked app
_.homePage.NavigateToHome();
_.homePage.ForkApplication("Library_export");
_.agHelper.ValidateToastMessage("true");
_.agHelper.WaitUntilAllToastsDisappear();
homePage.NavigateToHome();
homePage.ForkApplication("Library_export");
agHelper.ValidateToastMessage("true");
agHelper.WaitUntilAllToastsDisappear();

//Deploy app and check installation
_.deployMode.DeployApp();
_.agHelper.WaitUntilToastDisappear("true");
_.deployMode.NavigateBacktoEditor();
_.agHelper.ValidateToastMessage("true");
deployMode.DeployApp();
agHelper.WaitUntilToastDisappear("true");
deployMode.NavigateBacktoEditor();
agHelper.ValidateToastMessage("true");
});

it("7. Tests library access and installation in public apps", () => {
let appURL = "";
cy.get(HomePage.shareApp).click();
//@ts-expect-error no type access
cy.enablePublicAccess(true);
_.deployMode.DeployApp();
deployMode.DeployApp();
cy.url().then((url) => {
appURL = url;
_.homePage.LogOutviaAPI();
homePage.LogOutviaAPI();
cy.visit(appURL);
_.agHelper.AssertContains("true");
agHelper.AssertContains("true");
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe("List Widget parse error test", () => {

// no toast message should be visible
agHelper
.GetElement(CommonLocators._toastMsg)
.GetElement(CommonLocators._toastMsg, "noVerify")
.should("not.have.length.above", 0);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import EditorNavigation, {
EntityType,
} from "../../../../../support/Pages/EditorNavigation";

describe.skip("Modal Widget test cases", function () {
describe("Modal Widget test cases", function () {
const image = (src: string) => 'img[src="' + src + '"]';
const jpgImg = "https://jpeg.org/images/jpegsystems-home.jpg";
const gifImg =
Expand All @@ -24,9 +24,10 @@ describe.skip("Modal Widget test cases", function () {
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL, 300, 300);
EditorNavigation.SelectEntityByName("Button1", EntityType.Widget);
propPane.EnterJSContext("onClick", "{{showModal('Modal1');}}");
agHelper.Sleep();
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.BUTTON));
agHelper.Sleep(2000); //Wait for widgets to settle
agHelper.WaitUntilEleAppear(
locators._widgetInDeployed(draggableWidgets.BUTTON),
); //Wait for widgets to settle

//Verify that the Modal widget opens correctly when configured on a button click.
agHelper.ClickButton("Submit");
Expand All @@ -38,14 +39,15 @@ describe.skip("Modal Widget test cases", function () {
locators._widgetInDeployed(draggableWidgets.ICONBUTTON),
);
agHelper.GetNClick(locators._widgetInDeployed(draggableWidgets.ICONBUTTON));
agHelper.WaitUntilEleDisappear(locators._modal);
agHelper.AssertElementAbsence(locators._modal);

//Verify that clicking outside the Modal widget closes it as expected when Quick dismiss is enabled
agHelper.ClickButton("Submit");
agHelper.WaitUntilEleAppear(locators._modal);
agHelper.AssertElementExist(locators._modal);
agHelper.ClickOutside(350, 150, false);
agHelper.Sleep();
agHelper.WaitUntilEleDisappear(locators._modal);
agHelper.AssertElementAbsence(locators._modal);
});

Expand All @@ -54,11 +56,11 @@ describe.skip("Modal Widget test cases", function () {
EditorNavigation.SelectEntityByName("Button1", EntityType.Widget);
propPane.ToggleJSMode("onClick", false);
propPane.CreateModal("onClick");
agHelper.Sleep(500);
propPane.CreateModal("onClick");
agHelper.Sleep(500);
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.BUTTON));
agHelper.Sleep(2000); //Wait for widgets to settle & be visible
agHelper.WaitUntilEleAppear(
locators._widgetInDeployed(draggableWidgets.BUTTON),
); //Wait for widgets to settle
agHelper.ClickButton("Submit");
agHelper.AssertElementLength(locators._modal, 3);
agHelper.AssertElementVisibility(locators._modal, true, 2);
Expand Down Expand Up @@ -264,7 +266,6 @@ describe.skip("Modal Widget test cases", function () {
1,
);
assertHelper.WaitForNetworkCall("@postExecute").then((response: any) => {
agHelper.Sleep();
const name = response.body.data.body[0].name;
agHelper.ValidateToastMessage("Executed api!");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ describe("Select Widget", () => {
.GetElement(".multi-select-dropdown input.bp3-input")
.should("have.css", "direction", "rtl");

agHelper.GetElement(".rc-select-dropdown [dir='rtl']").should("exist");
agHelper
.GetElement(".rc-select-dropdown [dir='rtl']", "exist")
.should("exist");

propPane.TogglePropertyState("Enable RTL", "Off");

Expand All @@ -66,6 +68,8 @@ describe("Select Widget", () => {
.GetElement(".multi-select-dropdown input.bp3-input")
.should("have.css", "direction", "ltr");

agHelper.GetElement(".rc-select-dropdown [dir='rtl']").should("not.exist");
agHelper
.GetElement(".rc-select-dropdown [dir='rtl']", "not.exist")
.should("not.exist");
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe("Radio Widget test cases", function () {
deployMode.DeployApp(
locators._widgetInDeployed(draggableWidgets.RADIO_GROUP),
);
agHelper.GetElement("@postExecute").then((interception: any) => {
cy.get("@postExecute").then((interception: any) => {
agHelper.Sleep();
const name = interception.response.body.data.body[0].name;
agHelper.AssertExistingCheckedState(
Expand Down Expand Up @@ -319,7 +319,7 @@ describe("Radio Widget test cases", function () {
});

agHelper.GetWidth(locators._widgetInDeployed(draggableWidgets.RADIO_GROUP));
agHelper.GetElement("@eleWidth").then(($currentWidth) => {
cy.get("@eleWidth").then(($currentWidth) => {
expect($currentWidth).to.be.greaterThan(420);
});
});
Expand Down Expand Up @@ -368,7 +368,7 @@ describe("Radio Widget test cases", function () {
});

agHelper.GetWidth(locators._widgetInDeployed(draggableWidgets.RADIO_GROUP));
agHelper.GetElement("@eleWidth").then(($currentWidth) => {
cy.get("@eleWidth").then(($currentWidth) => {
expect($currentWidth).to.be.greaterThan(420);
});
});
Expand Down Expand Up @@ -401,7 +401,7 @@ describe("Radio Widget test cases", function () {
locators._widgetInDeployed(draggableWidgets.RADIO_GROUP),
);

agHelper.GetElement("@postExecute").then((interception: any) => {
cy.get("@postExecute").then((interception: any) => {
agHelper.Sleep();
const name = interception.response.body.data.body[0].name;
agHelper.AssertExistingCheckedState(
Expand Down
Loading