test: Cypress - added tag - @tag.AutoHeight, @tag.IDE (#29670)

## Description
> Add tags to cases in 
- cypress/e2e/Regression/ClientSide/DynamicHeight 
- cypress/e2e/Regression/ClientSide/ExplorerTests
- cypress/e2e/Regression/ClientSide/EmbedSettings
- cypress/e2e/Regression/ClientSide/Editor

#### Type of change
- Chore (housekeeping or task changes that don't impact user perception)

## Testing
> /ok-to-test tags="@tag.AutoHeight"

#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
- [ ] Manual
- [ ] Cypress

## Checklist:
#### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Refactor**
- Reorganized test suite structures and added categorization tags to
improve test clarity and maintainability.

- **Style**
- Reformatted code across multiple test files for better readability and
consistency.

- **Tests**
- Enhanced existing test cases with additional assertions for element
visibility and CSS attribute values.
- Adjusted test control flows and logic for dynamic height and width
validation across various widgets.
- Updated test descriptions and restructured test steps to align with
testing best practices.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
sharanya-appsmith 2023-12-18 12:45:44 +05:30 committed by GitHub
parent a436d81aea
commit 9aa94a2746
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 2313 additions and 2092 deletions

View File

@ -3,7 +3,7 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Property Pane Code Commenting", () => {
describe("Property Pane Code Commenting", { tags: ["@tag.JS"] }, () => {
before(() => {
agHelper.AddDsl("buttondsl");
});

View File

@ -3,23 +3,27 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Dynamic Height Width validation with limits", function () {
it("1. Validate change in auto height with limits width for widgets and highlight section validation", function () {
agHelper.AddDsl("dynamicHeightContainerdsl");
describe(
"Dynamic Height Width validation with limits",
{ tags: ["@tag.AutoHeight"] },
function () {
it("1. Validate change in auto height with limits width for widgets and highlight section validation", function () {
agHelper.AddDsl("dynamicHeightContainerdsl");
EditorNavigation.SelectEntityByName("Container1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Auto Height with limits");
agHelper.HoverElement(propPane._autoHeightLimitMin);
agHelper.AssertContains("Min-Height: 10 rows");
agHelper.AssertCSS(
propPane._autoHeightLimitMin_div,
"background-color",
"rgb(243, 43, 139)",
0,
);
agHelper.HoverElement(propPane._autoHeightLimitMax);
agHelper.AssertContains("Max-Height: 12 rows");
propPane.SelectPropertiesDropDown("height", "Fixed");
propPane.SelectPropertiesDropDown("height", "Auto Height with limits");
});
});
EditorNavigation.SelectEntityByName("Container1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Auto Height with limits");
agHelper.HoverElement(propPane._autoHeightLimitMin);
agHelper.AssertContains("Min-Height: 10 rows");
agHelper.AssertCSS(
propPane._autoHeightLimitMin_div,
"background-color",
"rgb(243, 43, 139)",
0,
);
agHelper.HoverElement(propPane._autoHeightLimitMax);
agHelper.AssertContains("Max-Height: 12 rows");
propPane.SelectPropertiesDropDown("height", "Fixed");
propPane.SelectPropertiesDropDown("height", "Auto Height with limits");
});
},
);

View File

@ -9,144 +9,150 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Dynamic Height Width validation", function () {
afterEach(() => {
agHelper.SaveLocalStorageCache();
});
describe(
"Dynamic Height Width validation",
{ tags: ["@tag.AutoHeight"] },
function () {
afterEach(() => {
agHelper.SaveLocalStorageCache();
});
beforeEach(() => {
agHelper.RestoreLocalStorageCache();
});
beforeEach(() => {
agHelper.RestoreLocalStorageCache();
});
it("1. Validate change with auto height width for widgets", function () {
agHelper.AddDsl("dynamicHeightContainerCheckboxdsl");
it("1. Validate change with auto height width for widgets", function () {
agHelper.AddDsl("dynamicHeightContainerCheckboxdsl");
EditorNavigation.SelectEntityByName(
"CheckboxGroup1",
EntityType.Widget,
{},
["Container1"],
);
propPane.MoveToTab("Style");
agHelper
.GetWidgetCSSFrAttribute(
`${locators._propertyControl}${locators._fontSelect}`,
"font-size",
)
.then((dropdownFont) => {
agHelper
.GetElement(`${locators._propertyControl}${locators._fontInput}`)
.last()
.click({
force: true,
});
agHelper
.GetElement(propPane._optionContent)
.should("have.length.greaterThan", 2)
.its("length")
.then((n) => {
for (let i = 0; i < n; i++) {
EditorNavigation.SelectEntityByName(
"CheckboxGroup1",
EntityType.Widget,
{},
["Container1"],
);
propPane.MoveToTab("Style");
agHelper
.GetWidgetCSSFrAttribute(
`${locators._propertyControl}${locators._fontSelect}`,
"font-size",
)
.then((dropdownFont) => {
agHelper
.GetElement(`${locators._propertyControl}${locators._fontInput}`)
.last()
.click({
force: true,
});
agHelper
.GetElement(propPane._optionContent)
.should("have.length.greaterThan", 2)
.its("length")
.then((n) => {
for (let i = 0; i < n; i++) {
agHelper
.GetWidgetCSSFrAttribute(
propPane._optionContent,
"font-size",
i,
)
.then((selectedFont) => {
expect(dropdownFont).to.equal(selectedFont);
});
}
});
});
agHelper
.GetWidgetCSSFrAttribute(
`${locators._propertyControl}${locators._fontSelect}`,
"font-family",
)
.then((dropdownFont) => {
agHelper
.GetElement(propPane._dropdownOptionSpan)
.should("have.length.greaterThan", 2)
.its("length")
.then((n) => {
for (let i = 0; i < n; i++) {
agHelper
.GetWidgetCSSFrAttribute(
propPane._dropdownOptionSpan,
"font-family",
i,
)
.then((selectedFont) => {
expect(dropdownFont).to.equal(selectedFont);
});
}
});
});
propPane.MoveToTab("Content");
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((currentContainerHeight) => {
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP),
)
.then((currentCheckboxheight) => {
agHelper.GetNClick(propPane._addOptionProperty);
agHelper.Sleep(200);
assertHelper.AssertNetworkStatus("@updateLayout", 200);
agHelper.Sleep(3000);
agHelper
.GetWidgetCSSFrAttribute(
propPane._optionContent,
"font-size",
i,
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP),
)
.then((selectedFont) => {
expect(dropdownFont).to.equal(selectedFont);
.then((updatedCheckboxheight) => {
expect(currentCheckboxheight).to.not.equal(
updatedCheckboxheight,
);
});
}
});
});
agHelper
.GetWidgetCSSFrAttribute(
`${locators._propertyControl}${locators._fontSelect}`,
"font-family",
)
.then((dropdownFont) => {
agHelper
.GetElement(propPane._dropdownOptionSpan)
.should("have.length.greaterThan", 2)
.its("length")
.then((n) => {
for (let i = 0; i < n; i++) {
agHelper
.GetWidgetCSSFrAttribute(
propPane._dropdownOptionSpan,
"font-family",
i,
)
.then((selectedFont) => {
expect(dropdownFont).to.equal(selectedFont);
});
}
});
});
propPane.MoveToTab("Content");
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((currentContainerHeight) => {
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP),
)
.then((currentCheckboxheight) => {
agHelper.GetNClick(propPane._addOptionProperty);
agHelper.Sleep(200);
assertHelper.AssertNetworkStatus("@updateLayout", 200);
agHelper.Sleep(3000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP),
)
.then((updatedCheckboxheight) => {
expect(currentCheckboxheight).to.not.equal(
updatedCheckboxheight,
);
});
});
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((updatedContainerHeight) => {
expect(currentContainerHeight).to.not.equal(updatedContainerHeight);
});
});
});
});
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((updatedContainerHeight) => {
expect(currentContainerHeight).to.not.equal(
updatedContainerHeight,
);
});
});
});
it("2. Validate container with auto height and child widgets with fixed height", function () {
agHelper.AddDsl("dynamicHeigthContainerFixedDsl");
it("2. Validate container with auto height and child widgets with fixed height", function () {
agHelper.AddDsl("dynamicHeigthContainerFixedDsl");
EditorNavigation.SelectEntityByName(
"CheckboxGroup1",
EntityType.Widget,
{},
["Container1"],
);
agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel);
propPane.SelectPropertiesDropDown("height", "Auto Height");
EditorNavigation.SelectEntityByName("Input1", EntityType.Widget);
agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((currentHeight: number) => {
EditorNavigation.SelectEntityByName("Container1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper.Sleep(4000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((updatedHeight: number) => {
expect(currentHeight).to.not.equal(updatedHeight);
});
});
});
});
EditorNavigation.SelectEntityByName(
"CheckboxGroup1",
EntityType.Widget,
{},
["Container1"],
);
agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel);
propPane.SelectPropertiesDropDown("height", "Auto Height");
EditorNavigation.SelectEntityByName("Input1", EntityType.Widget);
agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((currentHeight: number) => {
EditorNavigation.SelectEntityByName("Container1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper.Sleep(4000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((updatedHeight: number) => {
expect(currentHeight).to.not.equal(updatedHeight);
});
});
});
},
);

View File

@ -9,82 +9,90 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Dynamic Height Width validation with multiple containers and text widget", function () {
it("1. Validate change with auto height width for widgets", function () {
let textMsg =
"Dynamic panel validation for text widget wrt height Dynamic panel validation for text widget wrt height Dynamic panel validation for text widget wrt height";
agHelper.AddDsl("dynamicHeightCanvasResizeDsl");
describe(
"Dynamic Height Width validation with multiple containers and text widget",
{ tags: ["@tag.AutoHeight"] },
function () {
it("1. Validate change with auto height width for widgets", function () {
let textMsg =
"Dynamic panel validation for text widget wrt height Dynamic panel validation for text widget wrt height Dynamic panel validation for text widget wrt height";
agHelper.AddDsl("dynamicHeightCanvasResizeDsl");
// Select the Outer container and capture initial height
EditorNavigation.SelectEntityByName("Container1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((initialContainerHeight: number) => {
// Select the Text Widget and capture its initial height
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [
"Container1",
]);
agHelper.Sleep(1000);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TEXT))
.then((initialTextWidgetHeight: number) => {
// Change the text label based on the textMsg above
propPane.UpdatePropertyFieldValue("Text", textMsg);
propPane.MoveToTab("Style");
assertHelper.AssertNetworkStatus("@updateLayout", 200);
// Select the Text Widget and capture its updated height post change of text label
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.TEXT),
)
.then((updatedTextWidgetHeight: number) => {
// Asserts the change in height from initial height of text widget wrt updated height
expect(initialTextWidgetHeight).to.not.equal(
updatedTextWidgetHeight,
);
// Select the outer Container Widget and capture its updated height post change of text label
EditorNavigation.SelectEntityByName(
"Container1",
EntityType.Widget,
);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((updatedContainerHeight: number) => {
// Asserts the change in height from initial height of container widget wrt updated height
expect(initialContainerHeight).to.not.equal(
updatedContainerHeight,
);
EditorNavigation.SelectEntityByName(
"Text1",
EntityType.Widget,
);
propPane.MoveToTab("Content");
// Clear Text Label
propPane.RemoveText("Text");
assertHelper.AssertNetworkStatus("@updateLayout", 200);
EditorNavigation.SelectEntityByName(
"Container1",
EntityType.Widget,
);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((revertedContainerHeight: number) => {
// Asserts the change in height from updated height of container widget wrt current height
// As the text label is cleared the reverted height should be equal to initial height
expect(initialContainerHeight).to.equal(
revertedContainerHeight,
);
});
});
});
});
});
});
});
// Select the Outer container and capture initial height
EditorNavigation.SelectEntityByName("Container1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((initialContainerHeight: number) => {
// Select the Text Widget and capture its initial height
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [
"Container1",
]);
agHelper.Sleep(1000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.TEXT),
)
.then((initialTextWidgetHeight: number) => {
// Change the text label based on the textMsg above
propPane.UpdatePropertyFieldValue("Text", textMsg);
propPane.MoveToTab("Style");
assertHelper.AssertNetworkStatus("@updateLayout", 200);
// Select the Text Widget and capture its updated height post change of text label
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.TEXT),
)
.then((updatedTextWidgetHeight: number) => {
// Asserts the change in height from initial height of text widget wrt updated height
expect(initialTextWidgetHeight).to.not.equal(
updatedTextWidgetHeight,
);
// Select the outer Container Widget and capture its updated height post change of text label
EditorNavigation.SelectEntityByName(
"Container1",
EntityType.Widget,
);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((updatedContainerHeight: number) => {
// Asserts the change in height from initial height of container widget wrt updated height
expect(initialContainerHeight).to.not.equal(
updatedContainerHeight,
);
EditorNavigation.SelectEntityByName(
"Text1",
EntityType.Widget,
);
propPane.MoveToTab("Content");
// Clear Text Label
propPane.RemoveText("Text");
assertHelper.AssertNetworkStatus("@updateLayout", 200);
EditorNavigation.SelectEntityByName(
"Container1",
EntityType.Widget,
);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(
draggableWidgets.CONTAINER,
),
)
.then((revertedContainerHeight: number) => {
// Asserts the change in height from updated height of container widget wrt current height
// As the text label is cleared the reverted height should be equal to initial height
expect(initialContainerHeight).to.equal(
revertedContainerHeight,
);
});
});
});
});
});
});
},
);

View File

@ -3,15 +3,21 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Dynamic Height Width validation", function () {
it("1. Validate change with auto height width for widgets", function () {
agHelper.AddDsl("dynamicHeightContainerScrolldsl");
EditorNavigation.SelectEntityByName("Container1", EntityType.Widget);
cy.get(".t--widget-textwidget").trigger("mouseover", { force: true }); // Scroll 'sidebar' to its bottom
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [
"Container1",
]);
deployMode.DeployApp();
cy.get(".t--widget-containerwidget").trigger("mouseover", { force: true }); // Scroll 'sidebar' to its bottom
});
});
describe(
"Dynamic Height Width validation",
{ tags: ["@tag.AutoHeight"] },
function () {
it("1. Validate change with auto height width for widgets", function () {
agHelper.AddDsl("dynamicHeightContainerScrolldsl");
EditorNavigation.SelectEntityByName("Container1", EntityType.Widget);
cy.get(".t--widget-textwidget").trigger("mouseover", { force: true }); // Scroll 'sidebar' to its bottom
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [
"Container1",
]);
deployMode.DeployApp();
cy.get(".t--widget-containerwidget").trigger("mouseover", {
force: true,
}); // Scroll 'sidebar' to its bottom
});
},
);

View File

@ -8,44 +8,55 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Dynamic Height Width validation", function () {
it("1. Validate change with auto height width for widgets", function () {
const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
agHelper.AddDsl("DynamicHeightDefaultHeightdsl");
describe(
"Dynamic Height Width validation",
{ tags: ["@tag.AutoHeight"] },
function () {
it("1. Validate change with auto height width for widgets", function () {
const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
agHelper.AddDsl("DynamicHeightDefaultHeightdsl");
EditorNavigation.SelectEntityByName("Container1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((initialContainerHeight: number) => {
// Select the Text Widget and capture its initial height
EditorNavigation.SelectEntityByName("Button1", EntityType.Widget, {}, [
"Container1",
]);
agHelper.PressDelete();
agHelper.WaitUntilAllToastsDisappear();
assertHelper.AssertNetworkStatus("updateLayout");
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((updatedContainerHeight: number) => {
expect(initialContainerHeight).to.not.equal(updatedContainerHeight);
expect(updatedContainerHeight).to.equal("100px");
agHelper.TypeText(locators._body, `{${modifierKey}}z`, {
parseSpecialCharSeq: true,
});
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((CurrentContainerHeight: number) => {
expect(CurrentContainerHeight).to.equal(initialContainerHeight);
EditorNavigation.SelectEntityByName("Container1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((initialContainerHeight: number) => {
// Select the Text Widget and capture its initial height
EditorNavigation.SelectEntityByName(
"Button1",
EntityType.Widget,
{},
["Container1"],
);
agHelper.PressDelete();
agHelper.WaitUntilAllToastsDisappear();
assertHelper.AssertNetworkStatus("updateLayout");
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((updatedContainerHeight: number) => {
expect(initialContainerHeight).to.not.equal(
updatedContainerHeight,
);
expect(updatedContainerHeight).to.equal("100px");
agHelper.TypeText(locators._body, `{${modifierKey}}z`, {
parseSpecialCharSeq: true,
});
});
});
});
});
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((CurrentContainerHeight: number) => {
expect(CurrentContainerHeight).to.equal(
initialContainerHeight,
);
});
});
});
});
},
);

View File

@ -1,30 +1,34 @@
import { agHelper } from "../../../../support/Objects/ObjectsCore";
describe("Auto height default widget content alignment", () => {
before(() => {
agHelper.AddDsl("autoHeightContentAlignmentDSL");
});
describe(
"Auto height default widget content alignment",
{ tags: ["@tag.AutoHeight"] },
() => {
before(() => {
agHelper.AddDsl("autoHeightContentAlignmentDSL");
});
it("1. Should have contents centered using align-items css", () => {
cy.get("[data-testid='t--centered-Text1-x2dmaguw7a']").should(
"have.css",
"align-items",
"center",
);
cy.get("[data-testid='t--centered-Checkbox1-sio6hr58nk']").should(
"have.css",
"align-items",
"center",
);
cy.get("[data-testid='t--centered-Switch1-4vy4pjyjat']").should(
"have.css",
"align-items",
"center",
);
cy.get("[data-testid='t--centered-Text2-1k6r0gx5sd']").should(
"have.css",
"align-items",
"flex-start",
);
});
});
it("1. Should have contents centered using align-items css", () => {
cy.get("[data-testid='t--centered-Text1-x2dmaguw7a']").should(
"have.css",
"align-items",
"center",
);
cy.get("[data-testid='t--centered-Checkbox1-sio6hr58nk']").should(
"have.css",
"align-items",
"center",
);
cy.get("[data-testid='t--centered-Switch1-4vy4pjyjat']").should(
"have.css",
"align-items",
"center",
);
cy.get("[data-testid='t--centered-Text2-1k6r0gx5sd']").should(
"have.css",
"align-items",
"flex-start",
);
});
},
);

View File

@ -10,73 +10,81 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Dynamic Height Width validation for Visibility", function () {
before(() => {
agHelper.AddDsl("invisibleWidgetdsl");
});
it("1. Validating visbility/invisiblity of widget with dynamic height feature", function () {
//changing the Text Name and verifying
EditorNavigation.SelectEntityByName("Container1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Auto Height");
EditorNavigation.SelectEntityByName("Input1", EntityType.Widget, {}, [
"Container1",
]);
propPane.SelectPropertiesDropDown("height", "Auto Height");
EditorNavigation.SelectEntityByName("Input2", EntityType.Widget, {}, [
"Container1",
]);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((currentContainerHeight: number) => {
agHelper.GetNClick(locators._widgetInCanvas("checkboxwidget"));
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((updatedContainerHeight: number) => {
expect(currentContainerHeight).to.equal(updatedContainerHeight);
agHelper
.GetElement(propPane._labelContains("On"))
.should("not.be.enabled");
// agHelper.AssertElementEnabledDisabled(
// locators._labelContains("On"),0,true
//);
});
});
deployMode.DeployApp();
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((currentContainerHeight: number) => {
agHelper.GetNClick(pageSettings.locators._setHomePageToggle);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((updatedContainerHeight: number) => {
expect(currentContainerHeight).to.not.equal(updatedContainerHeight);
agHelper.AssertElementAbsence(propPane._labelContains("On"));
agHelper.AssertElementVisibility(propPane._labelContains("Off"));
agHelper.GetNClick(pageSettings.locators._setHomePageToggle);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((currentContainerHeight: number) => {
expect(currentContainerHeight).to.not.equal(
updatedContainerHeight,
);
agHelper.AssertElementAbsence(propPane._labelContains("Off"));
agHelper.AssertElementVisibility(propPane._labelContains("On"));
});
});
});
});
});
describe(
"Dynamic Height Width validation for Visibility",
{ tags: ["@tag.AutoHeight"] },
function () {
before(() => {
agHelper.AddDsl("invisibleWidgetdsl");
});
it("1. Validating visbility/invisiblity of widget with dynamic height feature", function () {
//changing the Text Name and verifying
EditorNavigation.SelectEntityByName("Container1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Auto Height");
EditorNavigation.SelectEntityByName("Input1", EntityType.Widget, {}, [
"Container1",
]);
propPane.SelectPropertiesDropDown("height", "Auto Height");
EditorNavigation.SelectEntityByName("Input2", EntityType.Widget, {}, [
"Container1",
]);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((currentContainerHeight: number) => {
agHelper.GetNClick(locators._widgetInCanvas("checkboxwidget"));
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((updatedContainerHeight: number) => {
expect(currentContainerHeight).to.equal(updatedContainerHeight);
agHelper
.GetElement(propPane._labelContains("On"))
.should("not.be.enabled");
// agHelper.AssertElementEnabledDisabled(
// locators._labelContains("On"),0,true
//);
});
});
deployMode.DeployApp();
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((currentContainerHeight: number) => {
agHelper.GetNClick(pageSettings.locators._setHomePageToggle);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((updatedContainerHeight: number) => {
expect(currentContainerHeight).to.not.equal(
updatedContainerHeight,
);
agHelper.AssertElementAbsence(propPane._labelContains("On"));
agHelper.AssertElementVisibility(propPane._labelContains("Off"));
agHelper.GetNClick(pageSettings.locators._setHomePageToggle);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((currentContainerHeight: number) => {
expect(currentContainerHeight).to.not.equal(
updatedContainerHeight,
);
agHelper.AssertElementAbsence(propPane._labelContains("Off"));
agHelper.AssertElementVisibility(
propPane._labelContains("On"),
);
});
});
});
});
},
);

View File

@ -9,35 +9,38 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Dynamic Height Width validation", function () {
it("1. Validate change with auto height width for Form/Switch", function () {
agHelper.AddDsl("dynamicHeightFormSwitchdsl");
describe(
"Dynamic Height Width validation",
{ tags: ["@tag.AutoHeight"] },
function () {
it("1. Validate change with auto height width for Form/Switch", function () {
agHelper.AddDsl("dynamicHeightFormSwitchdsl");
EditorNavigation.SelectEntityByName("Form1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.FORM))
.then((formheight) => {
propPane.SelectPropertiesDropDown("height", "Auto Height");
EditorNavigation.SelectEntityByName(
"SwitchGroup1",
EntityType.Widget,
{},
["Form1"],
);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.SWITCHGROUP),
)
.then((CurrentSwitchHeight) => {
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.FORM),
)
.then((CurrentFormHeight) => {
agHelper.UpdateCodeInput(
locators._controlOption,
`[
EditorNavigation.SelectEntityByName("Form1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.FORM))
.then((formheight) => {
propPane.SelectPropertiesDropDown("height", "Auto Height");
EditorNavigation.SelectEntityByName(
"SwitchGroup1",
EntityType.Widget,
{},
["Form1"],
);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.SWITCHGROUP),
)
.then((CurrentSwitchHeight) => {
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.FORM),
)
.then((CurrentFormHeight) => {
agHelper.UpdateCodeInput(
locators._controlOption,
`[
{"label": "Blue","value": "BLUE"},
{ "label": "Green","value": "GREEN"},
{"label": "Red","value": "RED"},
@ -49,38 +52,39 @@ describe("Dynamic Height Width validation", function () {
{"label": "Orange","value": "ORANGE"},
{"label": "Cream","value": "CREAM"}
]`,
);
agHelper.Sleep(3000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.SWITCHGROUP),
)
.then((UpdatedSwitchHeight: number) => {
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.FORM),
)
.then((UpdatedFormHeight: number) => {
expect(CurrentFormHeight).to.not.equal(
UpdatedFormHeight,
);
expect(CurrentSwitchHeight).to.not.equal(
UpdatedSwitchHeight,
);
});
});
});
});
});
agHelper.GetNClick(
`${locators._widgetInDeployed(draggableWidgets.SWITCHGROUP)} ${
pageSettings.locators._setHomePageToggle
}`,
);
agHelper.AssertElementLength(locators._modal, 1);
//propPane.TogglePropertyState("Switch","On");
EditorNavigation.SelectEntityByName("Modal1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper.GetNClick(locators._closeModal, 0, true);
});
});
);
agHelper.Sleep(3000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.SWITCHGROUP),
)
.then((UpdatedSwitchHeight: number) => {
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.FORM),
)
.then((UpdatedFormHeight: number) => {
expect(CurrentFormHeight).to.not.equal(
UpdatedFormHeight,
);
expect(CurrentSwitchHeight).to.not.equal(
UpdatedSwitchHeight,
);
});
});
});
});
});
agHelper.GetNClick(
`${locators._widgetInDeployed(draggableWidgets.SWITCHGROUP)} ${
pageSettings.locators._setHomePageToggle
}`,
);
agHelper.AssertElementLength(locators._modal, 1);
//propPane.TogglePropertyState("Switch","On");
EditorNavigation.SelectEntityByName("Modal1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper.GetNClick(locators._closeModal, 0, true);
});
},
);

View File

@ -5,75 +5,79 @@ import {
draggableWidgets,
} from "../../../../support/Objects/ObjectsCore";
describe("Fixed Invisible widgets and auto height containers", () => {
before(() => {
// Create a page with a divider below a button widget and a checkbox widget below a filepicker widget
// Button widget and filepicker widgets are fixed height widgets
agHelper.AddDsl("autoHeightInvisibleWidgetsDSL");
});
describe(
"Fixed Invisible widgets and auto height containers",
{ tags: ["@tag.AutoHeight"] },
() => {
before(() => {
// Create a page with a divider below a button widget and a checkbox widget below a filepicker widget
// Button widget and filepicker widgets are fixed height widgets
agHelper.AddDsl("autoHeightInvisibleWidgetsDSL");
});
it("1. Divider should be below Button Widget in edit mode", () => {
// This test checks for the height of the button widget and the filepicker widget
// As well as the top value for the widgets below button and filepicker (divider and checkbox respectively)
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.BUTTON),
"height",
"230px",
0,
);
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.FILEPICKER),
"height",
"90px",
0,
);
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.DIVIDER),
"top",
"246px",
0,
);
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.CHECKBOX),
"top",
"96px",
0,
);
});
it("1. Divider should be below Button Widget in edit mode", () => {
// This test checks for the height of the button widget and the filepicker widget
// As well as the top value for the widgets below button and filepicker (divider and checkbox respectively)
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.BUTTON),
"height",
"230px",
0,
);
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.FILEPICKER),
"height",
"90px",
0,
);
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.DIVIDER),
"top",
"246px",
0,
);
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.CHECKBOX),
"top",
"96px",
0,
);
});
it("2. Divider should move up by the height of the button widget in preview mode", () => {
// This tests if the divider and checkbox widget move up by an appropriate amount in preview mode.
agHelper.AssertElementVisibility(locators._previewModeToggle("edit"));
agHelper.GetNClick(locators._previewModeToggle("edit"));
it("2. Divider should move up by the height of the button widget in preview mode", () => {
// This tests if the divider and checkbox widget move up by an appropriate amount in preview mode.
agHelper.AssertElementVisibility(locators._previewModeToggle("edit"));
agHelper.GetNClick(locators._previewModeToggle("edit"));
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.DIVIDER),
"top",
"16px",
0,
);
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.CHECKBOX),
"top",
"6px",
0,
);
});
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.DIVIDER),
"top",
"16px",
0,
);
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.CHECKBOX),
"top",
"6px",
0,
);
});
it("3. Divider should move up by the height of the button widget in view mode", () => {
// This tests if the divider and checkbox widget move up by an appropriate amount in view mode.
deployMode.DeployApp();
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.DIVIDER),
"top",
"16px",
0,
);
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.CHECKBOX),
"top",
"6px",
0,
);
});
});
it("3. Divider should move up by the height of the button widget in view mode", () => {
// This tests if the divider and checkbox widget move up by an appropriate amount in view mode.
deployMode.DeployApp();
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.DIVIDER),
"top",
"16px",
0,
);
agHelper.AssertCSS(
locators._widgetInDeployed(draggableWidgets.CHECKBOX),
"top",
"6px",
0,
);
});
},
);

View File

@ -9,46 +9,54 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Dynamic Height Width validation", function () {
it("1. Validate change with auto height width for JsonForm", function () {
agHelper.AddDsl("jsonFormDynamicHeightDsl");
describe(
"Dynamic Height Width validation",
{ tags: ["@tag.AutoHeight"] },
function () {
it("1. Validate change with auto height width for JsonForm", function () {
agHelper.AddDsl("jsonFormDynamicHeightDsl");
EditorNavigation.SelectEntityByName("JSONForm1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.JSONFORM))
.then((initialFormheight: number) => {
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper.Sleep(5000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.JSONFORM),
)
.then((updatedFormheight: number) => {
expect(initialFormheight).to.not.equal(updatedFormheight);
agHelper.GetNClick(propPane._showColumnButton, 0);
agHelper.GetNClick(propPane._showColumnButton, 1);
agHelper.GetNClick(propPane._showColumnButton, 2);
propPane.SelectPropertiesDropDown("height", "Fixed");
agHelper.Sleep(5000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.JSONFORM),
)
.then((reUpdatedFormheight: number) => {
expect(updatedFormheight).to.not.equal(reUpdatedFormheight);
agHelper.GetNClick(propPane._showColumnButton, 2);
agHelper.GetNClick(propPane._showColumnButton, 1);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper.Sleep(5000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.JSONFORM),
)
.then((currentformheight: number) => {
expect(reUpdatedFormheight).to.not.equal(currentformheight);
});
});
});
});
});
});
EditorNavigation.SelectEntityByName("JSONForm1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.JSONFORM),
)
.then((initialFormheight: number) => {
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper.Sleep(5000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.JSONFORM),
)
.then((updatedFormheight: number) => {
expect(initialFormheight).to.not.equal(updatedFormheight);
agHelper.GetNClick(propPane._showColumnButton, 0);
agHelper.GetNClick(propPane._showColumnButton, 1);
agHelper.GetNClick(propPane._showColumnButton, 2);
propPane.SelectPropertiesDropDown("height", "Fixed");
agHelper.Sleep(5000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.JSONFORM),
)
.then((reUpdatedFormheight: number) => {
expect(updatedFormheight).to.not.equal(reUpdatedFormheight);
agHelper.GetNClick(propPane._showColumnButton, 2);
agHelper.GetNClick(propPane._showColumnButton, 1);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper.Sleep(5000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.JSONFORM),
)
.then((currentformheight: number) => {
expect(reUpdatedFormheight).to.not.equal(
currentformheight,
);
});
});
});
});
});
},
);

View File

@ -8,26 +8,32 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Dynamic Height Width validation", function () {
it("1. Validate change with auto height width for List widgets", function () {
agHelper.AddDsl("ResizeListDsl");
EditorNavigation.SelectEntityByName("List1", EntityType.Widget, {}, [
"Tabs1",
"Tab 1",
]);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.LIST_V2))
.then((currentListHeight: number) => {
propPane.MoveToTab("Style");
propPane.UpdatePropertyFieldValue("Item Spacing (px)", "16");
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.LIST_V2),
)
.then((updatedListHeight: number) => {
expect(currentListHeight).to.equal(updatedListHeight);
agHelper.GetNAssertContains(locators._pagination, "5");
});
});
});
});
describe(
"Dynamic Height Width validation",
{ tags: ["@tag.AutoHeight"] },
function () {
it("1. Validate change with auto height width for List widgets", function () {
agHelper.AddDsl("ResizeListDsl");
EditorNavigation.SelectEntityByName("List1", EntityType.Widget, {}, [
"Tabs1",
"Tab 1",
]);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.LIST_V2),
)
.then((currentListHeight: number) => {
propPane.MoveToTab("Style");
propPane.UpdatePropertyFieldValue("Item Spacing (px)", "16");
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.LIST_V2),
)
.then((updatedListHeight: number) => {
expect(currentListHeight).to.equal(updatedListHeight);
agHelper.GetNAssertContains(locators._pagination, "5");
});
});
});
},
);

View File

@ -10,130 +10,150 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Dynamic Height Width validation list widget", function () {
it("1. Validate change with auto height width for list widgets", function () {
const textMsg = "Dynamic panel validation for text widget wrt height";
agHelper.AddDsl("DynamicHeightListTextDsl");
describe(
"Dynamic Height Width validation list widget",
{ tags: ["@tag.AutoHeight"] },
function () {
it("1. Validate change with auto height width for list widgets", function () {
const textMsg = "Dynamic panel validation for text widget wrt height";
agHelper.AddDsl("DynamicHeightListTextDsl");
entityExplorer.DragDropWidgetNVerify("multiselecttreewidget", 300, 500);
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
//Widgets which were not possible to be added to list widget cannot be pasted/moved into the list widget with multitreeselect
EditorNavigation.SelectEntityByName(
"MultiTreeSelect1",
EntityType.Widget,
{},
["List1"],
);
agHelper.SimulateCopyPaste("copy");
agHelper.WaitUntilAllToastsDisappear();
agHelper.Sleep(2000);
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
propPane.MoveToTab("Style");
agHelper.SimulateCopyPaste("paste");
agHelper.ValidateToastMessage(
"This widget cannot be used inside the list widget.",
0,
1,
);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.LIST))
.then((currentListHeight: any) => {
//Widgets within list widget have no dynamic height
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
//Widgets within list widget in existing applications have no dynamic height
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [
"List1",
"Container1",
]);
entityExplorer.DragDropWidgetNVerify("multiselecttreewidget", 300, 500);
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
//Widgets which were not possible to be added to list widget cannot be pasted/moved into the list widget with multitreeselect
EditorNavigation.SelectEntityByName(
"MultiTreeSelect1",
EntityType.Widget,
{},
["List1"],
);
agHelper.SimulateCopyPaste("copy");
agHelper.WaitUntilAllToastsDisappear();
agHelper.Sleep(2000);
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
propPane.MoveToTab("Style");
agHelper.SimulateCopyPaste("paste");
agHelper.ValidateToastMessage(
"This widget cannot be used inside the list widget.",
0,
1,
);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.LIST))
.then((currentListHeight: any) => {
//Widgets within list widget have no dynamic height
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
//Widgets within list widget in existing applications have no dynamic height
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [
"List1",
"Container1",
]);
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
propPane.UpdatePropertyFieldValue("Text", textMsg, true);
EditorNavigation.SelectEntityByName("Text2", EntityType.Widget, {}, [
"Container1",
"List1",
]);
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
propPane.UpdatePropertyFieldValue("Text", textMsg, true);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.LIST))
.then((updatedListHeight: any) => {
expect(currentListHeight).to.equal(updatedListHeight);
});
EditorNavigation.SelectEntityByName(
"Container1",
EntityType.Widget,
{},
["List1"],
);
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
propPane.UpdatePropertyFieldValue("Text", textMsg, true);
EditorNavigation.SelectEntityByName("Text2", EntityType.Widget, {}, [
"Container1",
"List1",
]);
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
propPane.UpdatePropertyFieldValue("Text", textMsg, true);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.LIST),
)
.then((updatedListHeight: any) => {
expect(currentListHeight).to.equal(updatedListHeight);
});
EditorNavigation.SelectEntityByName(
"Container1",
EntityType.Widget,
{},
["List1"],
);
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
//Widgets when moved into the list widget have no dynamic height
EditorNavigation.SelectEntityByName("Text3", EntityType.Widget);
propPane.MoveToTab("Style");
agHelper.SimulateCopyPaste("copy");
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
//Widgets when moved into the list widget have no dynamic height
EditorNavigation.SelectEntityByName("Text3", EntityType.Widget);
propPane.MoveToTab("Style");
agHelper.SimulateCopyPaste("copy");
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
propPane.MoveToTab("Style");
agHelper.SimulateCopyPaste("paste");
assertHelper.AssertNetworkStatus("@updateLayout", 200);
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
propPane.MoveToTab("Style");
agHelper.SimulateCopyPaste("paste");
assertHelper.AssertNetworkStatus("@updateLayout", 200);
EditorNavigation.SelectEntityByName("Text3Copy", EntityType.Widget);
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
agHelper.SimulateCopyPaste("copy");
agHelper.WaitUntilAllToastsDisappear();
agHelper.Sleep(2000);
agHelper.GetNClick(locators._canvasBody);
agHelper.SimulateCopyPaste("paste");
assertHelper.AssertNetworkStatus("@updateLayout");
//Widgets when moved out of the list widget have dynamic height in property pane
EditorNavigation.SelectEntityByName("Text3CopyCopy", EntityType.Widget);
agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel);
EditorNavigation.SelectEntityByName("Text3Copy", EntityType.Widget);
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
agHelper.SimulateCopyPaste("copy");
agHelper.WaitUntilAllToastsDisappear();
agHelper.Sleep(2000);
agHelper.GetNClick(locators._canvasBody);
agHelper.SimulateCopyPaste("paste");
assertHelper.AssertNetworkStatus("@updateLayout");
//Widgets when moved out of the list widget have dynamic height in property pane
EditorNavigation.SelectEntityByName(
"Text3CopyCopy",
EntityType.Widget,
);
agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel);
agHelper.GetNClick(locators._widgetInDeployed(draggableWidgets.TEXT));
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TEXT))
.then((height: any) => {
propPane.SelectPropertiesDropDown("height", "Auto Height");
assertHelper.AssertNetworkStatus("@updateLayout", 200);
agHelper.GetNClick(
agHelper.GetNClick(locators._widgetInDeployed(draggableWidgets.TEXT));
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.TEXT),
);
agHelper
.GetWidgetCSSHeight(
)
.then((height: any) => {
propPane.SelectPropertiesDropDown("height", "Auto Height");
assertHelper.AssertNetworkStatus("@updateLayout", 200);
agHelper.GetNClick(
locators._widgetInDeployed(draggableWidgets.TEXT),
)
.wait(1000)
.then((updatedListHeight: any) => {
expect(height).to.not.equal(updatedListHeight);
});
});
EditorNavigation.SelectEntityByName("Text3CopyCopy", EntityType.Widget);
agHelper.SimulateCopyPaste("copy");
);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.TEXT),
)
.wait(1000)
.then((updatedListHeight: any) => {
expect(height).to.not.equal(updatedListHeight);
});
});
EditorNavigation.SelectEntityByName(
"Text3CopyCopy",
EntityType.Widget,
);
agHelper.SimulateCopyPaste("copy");
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
propPane.MoveToTab("Style");
agHelper.SimulateCopyPaste("paste");
assertHelper.AssertNetworkStatus("@updateLayout", 200);
//Widgets when copied and pasted into the list widget no longer have dynamic height
EditorNavigation.SelectEntityByName(
"Text3CopyCopyCopy",
EntityType.Widget,
{},
["Container1"],
);
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
agHelper.Sleep(2000); //wait a bit to ensure that the 'Text3CopyCopy' is selected for cut
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
propPane.MoveToTab("Style");
agHelper.SimulateCopyPaste("paste");
assertHelper.AssertNetworkStatus("@updateLayout", 200);
//Widgets when copied and pasted into the list widget no longer have dynamic height
EditorNavigation.SelectEntityByName(
"Text3CopyCopyCopy",
EntityType.Widget,
{},
["Container1"],
);
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
agHelper.Sleep(2000); //wait a bit to ensure that the 'Text3CopyCopy' is selected for cut
EditorNavigation.SelectEntityByName("Text3CopyCopy", EntityType.Widget);
agHelper.SimulateCopyPaste("cut");
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
propPane.MoveToTab("Style");
agHelper.Sleep(500);
agHelper.SimulateCopyPaste("paste");
EditorNavigation.SelectEntityByName(
"Text3CopyCopy",
EntityType.Widget,
);
agHelper.SimulateCopyPaste("cut");
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
propPane.MoveToTab("Style");
agHelper.Sleep(500);
agHelper.SimulateCopyPaste("paste");
assertHelper.AssertNetworkStatus("@updateLayout", 200);
EditorNavigation.SelectEntityByName("Text3CopyCopy", EntityType.Widget);
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
});
});
});
assertHelper.AssertNetworkStatus("@updateLayout", 200);
EditorNavigation.SelectEntityByName(
"Text3CopyCopy",
EntityType.Widget,
);
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
});
});
},
);

View File

@ -8,30 +8,36 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Dynamic Height Width validation", function () {
it("1. Validate change with auto height width for widgets", function () {
const textMsg = "Dynamic panel validation for text widget wrt height";
agHelper.AddDsl("dynamicHeightListDsl");
describe(
"Dynamic Height Width validation",
{ tags: ["@tag.AutoHeight"] },
function () {
it("1. Validate change with auto height width for widgets", function () {
const textMsg = "Dynamic panel validation for text widget wrt height";
agHelper.AddDsl("dynamicHeightListDsl");
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.LIST))
.then((currentListHeight: number) => {
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [
"List1",
"Container1",
]);
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
propPane.UpdatePropertyFieldValue("Text", textMsg, true);
EditorNavigation.SelectEntityByName("Text2", EntityType.Widget);
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
propPane.UpdatePropertyFieldValue("Text", textMsg, true);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.LIST))
.then((updatedListHeight: number) => {
expect(currentListHeight).to.equal(updatedListHeight);
});
});
});
});
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.LIST))
.then((currentListHeight: number) => {
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [
"List1",
"Container1",
]);
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
propPane.UpdatePropertyFieldValue("Text", textMsg, true);
EditorNavigation.SelectEntityByName("Text2", EntityType.Widget);
agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel);
propPane.UpdatePropertyFieldValue("Text", textMsg, true);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.LIST),
)
.then((updatedListHeight: number) => {
expect(currentListHeight).to.equal(updatedListHeight);
});
});
});
},
);

View File

@ -9,48 +9,54 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Dynamic Height Width validation with limits", function () {
it("1. Validate change in auto height with limits width for widgets and highlight section validation", function () {
const textMsg =
"Dynamic panel validation for text widget wrt heightDynamic panel validation for text widget wrt heightDynamic panel validation for text widget wrt height Dynamic panel validation for text widget Dynamic panel validation for text widget Dynamic panel validation for text widget";
agHelper.AddDsl("DynamicHeightModalDsl");
describe(
"Dynamic Height Width validation with limits",
{ tags: ["@tag.AutoHeight"] },
function () {
it("1. Validate change in auto height with limits width for widgets and highlight section validation", function () {
const textMsg =
"Dynamic panel validation for text widget wrt heightDynamic panel validation for text widget wrt heightDynamic panel validation for text widget wrt height Dynamic panel validation for text widget Dynamic panel validation for text widget Dynamic panel validation for text widget";
agHelper.AddDsl("DynamicHeightModalDsl");
EditorNavigation.SelectEntityByName("Modal1", EntityType.Widget);
EditorNavigation.SelectEntityByName("Modal1", EntityType.Widget);
agHelper
.GetWidgetCSSFrAttribute(locators._modal, "height")
agHelper
.GetWidgetCSSFrAttribute(locators._modal, "height")
// agHelper.GetWidgetCSSHeight(locators._widgetInDeployed("modal"))
.then((currentModalHeight: number) => {
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [
"Modal1",
]);
agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel);
propPane.SelectPropertiesDropDown("height", "Auto Height");
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TEXT))
.then((currentTextWidgetHeight: number) => {
propPane.UpdatePropertyFieldValue("Text", textMsg, true);
assertHelper.AssertNetworkStatus("@updateLayout", 200);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.TEXT),
)
.then((updatedTextWidgetHeight: number) => {
expect(currentTextWidgetHeight).to.not.equal(
updatedTextWidgetHeight,
);
});
EditorNavigation.SelectEntityByName("Modal1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper
.GetWidgetCSSFrAttribute(locators._modal, "height")
// agHelper.GetWidgetCSSHeight(locators._widgetInDeployed("widget"))
.then((updatedModalHeight: number) => {
expect(currentModalHeight).to.not.equal(updatedModalHeight);
});
});
});
});
});
// agHelper.GetWidgetCSSHeight(locators._widgetInDeployed("modal"))
.then((currentModalHeight: number) => {
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [
"Modal1",
]);
agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel);
propPane.SelectPropertiesDropDown("height", "Auto Height");
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.TEXT),
)
.then((currentTextWidgetHeight: number) => {
propPane.UpdatePropertyFieldValue("Text", textMsg, true);
assertHelper.AssertNetworkStatus("@updateLayout", 200);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.TEXT),
)
.then((updatedTextWidgetHeight: number) => {
expect(currentTextWidgetHeight).to.not.equal(
updatedTextWidgetHeight,
);
});
EditorNavigation.SelectEntityByName("Modal1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper
.GetWidgetCSSFrAttribute(locators._modal, "height")
// agHelper.GetWidgetCSSHeight(locators._widgetInDeployed("widget"))
.then((updatedModalHeight: number) => {
expect(currentModalHeight).to.not.equal(updatedModalHeight);
});
});
});
});
},
);

View File

@ -9,96 +9,104 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Dynamic Height Width validation for multiple container", function () {
before(() => {
agHelper.AddDsl("multipleContainerdsl");
});
it("1. Validate change in auto height width with multiple containers", function () {
EditorNavigation.SelectEntityByName("Container1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Fixed");
propPane.SelectPropertiesDropDown("height", "Auto Height");
EditorNavigation.SelectEntityByName("Container2", EntityType.Widget, {}, [
"Container1",
]);
propPane.SelectPropertiesDropDown("height", "Fixed");
propPane.SelectPropertiesDropDown("height", "Auto Height");
EditorNavigation.SelectEntityByName("Container3", EntityType.Widget, {}, [
"Container2",
]);
EditorNavigation.SelectEntityByName(
"CheckboxGroup1",
EntityType.Widget,
{},
["Container3"],
);
propPane.SelectPropertiesDropDown("height", "Fixed");
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((outerContainerHeight: number) => {
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
1,
)
.then((middleContainerHeight: number) => {
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
2,
)
.then((innerContainerHeight: number) => {
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP),
)
.then((checkboxheight: number) => {
agHelper.GetNClick(propPane._addOptionProperty);
agHelper.GetNClick(propPane._addOptionProperty);
assertHelper.AssertNetworkStatus("@updateLayout", 200);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(
draggableWidgets.CHECKBOXGROUP,
),
)
.then((newcheckboxheight: number) => {
expect(checkboxheight).to.not.equal(newcheckboxheight);
});
});
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((outerContainerUpdatedHeight: number) => {
expect(outerContainerHeight).to.not.equal(
outerContainerUpdatedHeight,
);
});
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
1,
)
.then((middleContainerUpdatedHeight: number) => {
expect(middleContainerHeight).to.not.equal(
middleContainerUpdatedHeight,
);
});
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
2,
)
.then((innerContainerUpdatedHeight: number) => {
expect(innerContainerHeight).to.not.equal(
innerContainerUpdatedHeight,
);
});
});
});
});
});
});
describe(
"Dynamic Height Width validation for multiple container",
{ tags: ["@tag.AutoHeight"] },
function () {
before(() => {
agHelper.AddDsl("multipleContainerdsl");
});
it("1. Validate change in auto height width with multiple containers", function () {
EditorNavigation.SelectEntityByName("Container1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Fixed");
propPane.SelectPropertiesDropDown("height", "Auto Height");
EditorNavigation.SelectEntityByName("Container2", EntityType.Widget, {}, [
"Container1",
]);
propPane.SelectPropertiesDropDown("height", "Fixed");
propPane.SelectPropertiesDropDown("height", "Auto Height");
EditorNavigation.SelectEntityByName("Container3", EntityType.Widget, {}, [
"Container2",
]);
EditorNavigation.SelectEntityByName(
"CheckboxGroup1",
EntityType.Widget,
{},
["Container3"],
);
propPane.SelectPropertiesDropDown("height", "Fixed");
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((outerContainerHeight: number) => {
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
1,
)
.then((middleContainerHeight: number) => {
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
2,
)
.then((innerContainerHeight: number) => {
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(
draggableWidgets.CHECKBOXGROUP,
),
)
.then((checkboxheight: number) => {
agHelper.GetNClick(propPane._addOptionProperty);
agHelper.GetNClick(propPane._addOptionProperty);
assertHelper.AssertNetworkStatus("@updateLayout", 200);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(
draggableWidgets.CHECKBOXGROUP,
),
)
.then((newcheckboxheight: number) => {
expect(checkboxheight).to.not.equal(
newcheckboxheight,
);
});
});
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
)
.then((outerContainerUpdatedHeight: number) => {
expect(outerContainerHeight).to.not.equal(
outerContainerUpdatedHeight,
);
});
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
1,
)
.then((middleContainerUpdatedHeight: number) => {
expect(middleContainerHeight).to.not.equal(
middleContainerUpdatedHeight,
);
});
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.CONTAINER),
2,
)
.then((innerContainerUpdatedHeight: number) => {
expect(innerContainerHeight).to.not.equal(
innerContainerUpdatedHeight,
);
});
});
});
});
});
},
);

View File

@ -1,24 +1,28 @@
import { agHelper, locators } from "../../../../support/Objects/ObjectsCore";
describe("Fixed Invisible widgets and auto height containers", () => {
before(() => {
// Create a page with a divider below a button widget and a checkbox widget below a filepicker widget
// Button widget and filepicker widgets are fixed height widgets
agHelper.AddDsl("autoHeightOverlapDSL");
});
describe(
"Fixed Invisible widgets and auto height containers",
{ tags: ["@tag.AutoHeight"] },
() => {
before(() => {
// Create a page with a divider below a button widget and a checkbox widget below a filepicker widget
// Button widget and filepicker widgets are fixed height widgets
agHelper.AddDsl("autoHeightOverlapDSL");
});
it("1. Invisible widgets should not overlap when returning from preview mode to edit mode", () => {
cy.get(locators._widgetInDeployed("textwidget"));
agHelper.AssertContains("anything", "exist", "#ryq5qy60cg");
it("1. Invisible widgets should not overlap when returning from preview mode to edit mode", () => {
cy.get(locators._widgetInDeployed("textwidget"));
agHelper.AssertContains("anything", "exist", "#ryq5qy60cg");
agHelper.AssertElementVisibility(locators._previewModeToggle("edit"));
agHelper.GetNClick(locators._previewModeToggle("edit"));
agHelper.AssertElementVisibility(locators._previewModeToggle("edit"));
agHelper.GetNClick(locators._previewModeToggle("edit"));
agHelper.AssertElementVisibility(locators._previewModeToggle("preview"));
agHelper.GetNClick(locators._previewModeToggle("preview"));
agHelper.AssertElementVisibility(locators._previewModeToggle("preview"));
agHelper.GetNClick(locators._previewModeToggle("preview"));
cy.get("#ryq5qy60cg").should("have.css", "top", "136px");
cy.get("#kx7mvoopqu").should("have.css", "top", "96px");
cy.get("#m4doxmviiu").should("have.css", "top", "56px");
});
});
cy.get("#ryq5qy60cg").should("have.css", "top", "136px");
cy.get("#kx7mvoopqu").should("have.css", "top", "96px");
cy.get("#m4doxmviiu").should("have.css", "top", "56px");
});
},
);

View File

@ -11,93 +11,105 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Dynamic Height Width validation for Tab widget", function () {
before(() => {
agHelper.AddDsl("dynamicTabWidgetdsl");
});
describe(
"Dynamic Height Width validation for Tab widget",
{ tags: ["@tag.AutoHeight"] },
function () {
before(() => {
agHelper.AddDsl("dynamicTabWidgetdsl");
});
function validateHeight() {
agHelper.GetNClick(propPane._tabId1);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB))
.then((currentHeight: number) => {
agHelper.GetNClick(propPane._tabId2);
agHelper.Sleep(1000);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB))
.then((updatedHeight: number) => {
expect(currentHeight).to.not.equal(updatedHeight);
});
});
}
it("1. Tab widget validation of height with dynamic height feature with publish mode", function () {
//changing the Text Name and verifying
EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper.GetNClick(propPane._tabId1);
validateHeight();
deployMode.DeployApp();
validateHeight();
deployMode.NavigateBacktoEditor();
agHelper.AssertElementVisibility(locators._previewModeToggle("edit"));
agHelper.GetNClick(locators._previewModeToggle("edit"));
agHelper.GetNClick(propPane._tabId1);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB))
.then((currentHeight) => {
agHelper.GetNClick(propPane._tabId2);
agHelper.Sleep(1000);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB))
.then((updatedHeight: number) => {
expect(currentHeight).to.not.equal(updatedHeight);
});
});
// it("Tab widget validation of height with preview mode", function() {
agHelper.AssertElementVisibility(locators._previewModeToggle("preview"));
agHelper.GetNClick(locators._previewModeToggle("preview"));
EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Fixed");
agHelper.GetNClick(propPane._tabId1);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB))
.then((currentHeight: number) => {
agHelper.GetNClick(propPane._tabId2);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB))
.then((updatedHeight: number) => {
expect(currentHeight).to.equal(updatedHeight);
agHelper.GetNClick(propPane._showTabsProperty);
assertHelper.AssertNetworkStatus("@updateLayout", 200);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.TAB),
)
.then((upheight: number) => {
expect(updatedHeight).to.equal(upheight);
agHelper.AssertElementAbsence(propPane._tabId1);
agHelper.AssertElementAbsence(propPane._tabId2);
});
});
});
//it("Tab widget validation of height with reload", function() {
EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget);
agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel);
agHelper.GetNClick(propPane._showTabsProperty);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper.GetNClick(propPane._tabId1);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB))
.then((currentHeight: number) => {
agHelper.GetNClick(propPane._tabId2);
propPane.SelectPropertiesDropDown("height", "Fixed");
agHelper.RefreshPage();
EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB))
.then((updatedHeight: number) => {
expect(currentHeight).to.not.equal(updatedHeight);
});
});
});
});
function validateHeight() {
agHelper.GetNClick(propPane._tabId1);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB))
.then((currentHeight: number) => {
agHelper.GetNClick(propPane._tabId2);
agHelper.Sleep(1000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.TAB),
)
.then((updatedHeight: number) => {
expect(currentHeight).to.not.equal(updatedHeight);
});
});
}
it("1. Tab widget validation of height with dynamic height feature with publish mode", function () {
//changing the Text Name and verifying
EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper.GetNClick(propPane._tabId1);
validateHeight();
deployMode.DeployApp();
validateHeight();
deployMode.NavigateBacktoEditor();
agHelper.AssertElementVisibility(locators._previewModeToggle("edit"));
agHelper.GetNClick(locators._previewModeToggle("edit"));
agHelper.GetNClick(propPane._tabId1);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB))
.then((currentHeight) => {
agHelper.GetNClick(propPane._tabId2);
agHelper.Sleep(1000);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.TAB),
)
.then((updatedHeight: number) => {
expect(currentHeight).to.not.equal(updatedHeight);
});
});
// it("Tab widget validation of height with preview mode", function() {
agHelper.AssertElementVisibility(locators._previewModeToggle("preview"));
agHelper.GetNClick(locators._previewModeToggle("preview"));
EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget);
propPane.SelectPropertiesDropDown("height", "Fixed");
agHelper.GetNClick(propPane._tabId1);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB))
.then((currentHeight: number) => {
agHelper.GetNClick(propPane._tabId2);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.TAB),
)
.then((updatedHeight: number) => {
expect(currentHeight).to.equal(updatedHeight);
agHelper.GetNClick(propPane._showTabsProperty);
assertHelper.AssertNetworkStatus("@updateLayout", 200);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.TAB),
)
.then((upheight: number) => {
expect(updatedHeight).to.equal(upheight);
agHelper.AssertElementAbsence(propPane._tabId1);
agHelper.AssertElementAbsence(propPane._tabId2);
});
});
});
//it("Tab widget validation of height with reload", function() {
EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget);
agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel);
agHelper.GetNClick(propPane._showTabsProperty);
propPane.SelectPropertiesDropDown("height", "Auto Height");
agHelper.GetNClick(propPane._tabId1);
agHelper
.GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB))
.then((currentHeight: number) => {
agHelper.GetNClick(propPane._tabId2);
propPane.SelectPropertiesDropDown("height", "Fixed");
agHelper.RefreshPage();
EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget);
agHelper
.GetWidgetCSSHeight(
locators._widgetInDeployed(draggableWidgets.TAB),
)
.then((updatedHeight: number) => {
expect(currentHeight).to.not.equal(updatedHeight);
});
});
});
},
);

View File

@ -8,48 +8,54 @@ import {
assertHelper,
} from "../../../../support/Objects/ObjectsCore";
describe("Dynamic Height Width validation for text widget", function () {
before(() => {
entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT);
});
describe(
"Dynamic Height Width validation for text widget",
{ tags: ["@tag.AutoHeight"] },
function () {
before(() => {
entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT);
});
it("1. Text widget validation of height with dynamic height feature", function () {
const textMsg =
"Dynamic height validation for text widget validation with respect to Auto height";
//changing the Text and verifying
propPane.AssertPropertiesDropDownCurrentValue("Height", "Auto Height");
it("1. Text widget validation of height with dynamic height feature", function () {
const textMsg =
"Dynamic height validation for text widget validation with respect to Auto height";
//changing the Text and verifying
propPane.AssertPropertiesDropDownCurrentValue("Height", "Auto Height");
propPane.AssertPropertiesDropDownValues("Height", [
"Auto Height",
"Auto Height with limits",
"Fixed",
]);
propPane.AssertPropertiesDropDownValues("Height", [
"Auto Height",
"Auto Height with limits",
"Fixed",
]);
agHelper.GetHeight(locators._widgetInDeployed(draggableWidgets.TEXT));
cy.get("@eleHeight").then(($initalHeight) => {
propPane.UpdatePropertyFieldValue("Text", textMsg);
propPane.MoveToTab("Style");
propPane.SelectPropertiesDropDown("Font size", "L");
assertHelper.AssertNetworkStatus("@updateLayout", 200); //for textMsg update
agHelper.GetHeight(locators._widgetInDeployed(draggableWidgets.TEXT));
cy.get("@eleHeight").then(($addedtextHeight) => {
expect($addedtextHeight).to.not.equal($initalHeight);
deployMode.DeployApp(locators._textWidgetInDeployed);
agHelper.GetText(locators._textWidgetInDeployed).then(($text: any) => {
expect($text).to.eq(textMsg);
});
agHelper.AssertAttribute(
locators._textWidgetStyleInDeployed,
"font-size",
"1.25rem", //for Font size 'L'
);
cy.get("@eleHeight").then(($initalHeight) => {
propPane.UpdatePropertyFieldValue("Text", textMsg);
propPane.MoveToTab("Style");
propPane.SelectPropertiesDropDown("Font size", "L");
assertHelper.AssertNetworkStatus("@updateLayout", 200); //for textMsg update
agHelper.GetHeight(locators._widgetInDeployed(draggableWidgets.TEXT));
cy.get("@eleHeight").then(($deployedAutoHeight) => {
expect($deployedAutoHeight).not.eq($initalHeight);
cy.get("@eleHeight").then(($addedtextHeight) => {
expect($addedtextHeight).to.not.equal($initalHeight);
deployMode.DeployApp(locators._textWidgetInDeployed);
agHelper
.GetText(locators._textWidgetInDeployed)
.then(($text: any) => {
expect($text).to.eq(textMsg);
});
agHelper.AssertAttribute(
locators._textWidgetStyleInDeployed,
"font-size",
"1.25rem", //for Font size 'L'
);
agHelper.GetHeight(locators._widgetInDeployed(draggableWidgets.TEXT));
cy.get("@eleHeight").then(($deployedAutoHeight) => {
expect($deployedAutoHeight).not.eq($initalHeight);
});
});
});
});
});
});
},
);

View File

@ -7,238 +7,257 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Dynamic Height Width validation", function () {
function validateCssProperties(property) {
agHelper.GetNClickByContains("button", "Small", 0, true);
agHelper.Sleep(2000);
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(draggableWidgets.TEXT),
property,
0,
)
.then((CurrentValueOfFirstText) => {
EditorNavigation.SelectEntityByName("Text2", EntityType.Widget);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(draggableWidgets.TEXT),
property,
1,
)
.then((CurrentValueOfSecondText) => {
EditorNavigation.SelectEntityByName("Text3", EntityType.Widget);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(draggableWidgets.TEXT),
property,
2,
)
.then((CurrentValueOfThirdText) => {
EditorNavigation.SelectEntityByName("Text4", EntityType.Widget);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(draggableWidgets.TEXT),
property,
3,
)
.then((CurrentValueOfFourthText) => {
agHelper.GetNClickByContains("button", "Large", 0, true);
agHelper.Sleep(3000);
EditorNavigation.SelectEntityByName(
"Text1",
EntityType.Widget,
);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(draggableWidgets.TEXT),
property,
0,
)
.then((UpdatedLargeValueOfFirstText) => {
EditorNavigation.SelectEntityByName(
"Text2",
EntityType.Widget,
);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(draggableWidgets.TEXT),
property,
1,
)
.then((UpdatedLargeValueOfSecondText) => {
EditorNavigation.SelectEntityByName(
"Text3",
EntityType.Widget,
);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(
draggableWidgets.TEXT,
),
property,
2,
)
.then((UpdatedLargeValueOfThirdText) => {
EditorNavigation.SelectEntityByName(
"Text4",
EntityType.Widget,
);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(
draggableWidgets.TEXT,
),
property,
3,
)
.then((UpdatedLargeValueOfFourthText) => {
if (property == "left") {
expect(CurrentValueOfFirstText).to.equal(
UpdatedLargeValueOfFirstText,
);
expect(CurrentValueOfSecondText).to.equal(
UpdatedLargeValueOfSecondText,
);
expect(CurrentValueOfThirdText).to.equal(
UpdatedLargeValueOfThirdText,
);
expect(CurrentValueOfFourthText).to.equal(
UpdatedLargeValueOfFourthText,
);
} else {
expect(
CurrentValueOfFirstText,
).to.not.equal(
UpdatedLargeValueOfFirstText,
);
expect(
CurrentValueOfSecondText,
).to.not.equal(
UpdatedLargeValueOfSecondText,
);
expect(
CurrentValueOfThirdText,
).to.not.equal(
UpdatedLargeValueOfThirdText,
);
expect(
CurrentValueOfFourthText,
).to.not.equal(
UpdatedLargeValueOfFourthText,
);
}
agHelper.GetNClickByContains(
"button",
"Small",
0,
true,
);
agHelper.Sleep(2000);
EditorNavigation.SelectEntityByName(
"Text1",
EntityType.Widget,
);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(
draggableWidgets.TEXT,
),
property,
0,
)
.then((UpdatedSmallValueOfFirstText) => {
EditorNavigation.SelectEntityByName(
"Text2",
EntityType.Widget,
describe(
"Dynamic Height Width validation",
{ tags: ["@tag.AutoHeight"] },
function () {
function validateCssProperties(property) {
agHelper.GetNClickByContains("button", "Small", 0, true);
agHelper.Sleep(2000);
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(draggableWidgets.TEXT),
property,
0,
)
.then((CurrentValueOfFirstText) => {
EditorNavigation.SelectEntityByName("Text2", EntityType.Widget);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(draggableWidgets.TEXT),
property,
1,
)
.then((CurrentValueOfSecondText) => {
EditorNavigation.SelectEntityByName("Text3", EntityType.Widget);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(draggableWidgets.TEXT),
property,
2,
)
.then((CurrentValueOfThirdText) => {
EditorNavigation.SelectEntityByName(
"Text4",
EntityType.Widget,
);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(draggableWidgets.TEXT),
property,
3,
)
.then((CurrentValueOfFourthText) => {
agHelper.GetNClickByContains("button", "Large", 0, true);
agHelper.Sleep(3000);
EditorNavigation.SelectEntityByName(
"Text1",
EntityType.Widget,
);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(draggableWidgets.TEXT),
property,
0,
)
.then((UpdatedLargeValueOfFirstText) => {
EditorNavigation.SelectEntityByName(
"Text2",
EntityType.Widget,
);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(draggableWidgets.TEXT),
property,
1,
)
.then((UpdatedLargeValueOfSecondText) => {
EditorNavigation.SelectEntityByName(
"Text3",
EntityType.Widget,
);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(
draggableWidgets.TEXT,
),
property,
2,
)
.then((UpdatedLargeValueOfThirdText) => {
EditorNavigation.SelectEntityByName(
"Text4",
EntityType.Widget,
);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(
draggableWidgets.TEXT,
),
property,
3,
)
.then((UpdatedLargeValueOfFourthText) => {
if (property == "left") {
expect(
CurrentValueOfFirstText,
).to.equal(
UpdatedLargeValueOfFirstText,
);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(
draggableWidgets.TEXT,
),
property,
1,
)
.then(
(UpdatedSmallValueOfSecondText) => {
EditorNavigation.SelectEntityByName(
"Text3",
EntityType.Widget,
);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(
draggableWidgets.TEXT,
),
property,
2,
)
.then(
(
UpdatedSmallValueOfThirdText,
) => {
EditorNavigation.SelectEntityByName(
"Text4",
EntityType.Widget,
expect(
CurrentValueOfSecondText,
).to.equal(
UpdatedLargeValueOfSecondText,
);
expect(
CurrentValueOfThirdText,
).to.equal(
UpdatedLargeValueOfThirdText,
);
expect(
CurrentValueOfFourthText,
).to.equal(
UpdatedLargeValueOfFourthText,
);
} else {
expect(
CurrentValueOfFirstText,
).to.not.equal(
UpdatedLargeValueOfFirstText,
);
expect(
CurrentValueOfSecondText,
).to.not.equal(
UpdatedLargeValueOfSecondText,
);
expect(
CurrentValueOfThirdText,
).to.not.equal(
UpdatedLargeValueOfThirdText,
);
expect(
CurrentValueOfFourthText,
).to.not.equal(
UpdatedLargeValueOfFourthText,
);
}
agHelper.GetNClickByContains(
"button",
"Small",
0,
true,
);
agHelper.Sleep(2000);
EditorNavigation.SelectEntityByName(
"Text1",
EntityType.Widget,
);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(
draggableWidgets.TEXT,
),
property,
0,
)
.then(
(UpdatedSmallValueOfFirstText) => {
EditorNavigation.SelectEntityByName(
"Text2",
EntityType.Widget,
);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(
draggableWidgets.TEXT,
),
property,
1,
)
.then(
(
UpdatedSmallValueOfSecondText,
) => {
EditorNavigation.SelectEntityByName(
"Text3",
EntityType.Widget,
);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(
draggableWidgets.TEXT,
),
property,
2,
)
.then(
(
UpdatedSmallValueOfThirdText,
) => {
EditorNavigation.SelectEntityByName(
"Text4",
EntityType.Widget,
);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(
draggableWidgets.TEXT,
),
property,
3,
)
.then(
(
UpdatedSmallValueOfFourthText,
) => {
expect(
CurrentValueOfFirstText,
).to.equal(
UpdatedSmallValueOfFirstText,
);
expect(
CurrentValueOfSecondText,
).to.equal(
UpdatedSmallValueOfSecondText,
);
expect(
CurrentValueOfThirdText,
).to.equal(
UpdatedSmallValueOfThirdText,
);
expect(
CurrentValueOfFourthText,
).to.equal(
UpdatedSmallValueOfFourthText,
);
},
);
},
);
agHelper.Sleep(2000);
agHelper
.GetWidgetCSSFrAttribute(
locators._widgetInDeployed(
draggableWidgets.TEXT,
),
property,
3,
)
.then(
(
UpdatedSmallValueOfFourthText,
) => {
expect(
CurrentValueOfFirstText,
).to.equal(
UpdatedSmallValueOfFirstText,
);
expect(
CurrentValueOfSecondText,
).to.equal(
UpdatedSmallValueOfSecondText,
);
expect(
CurrentValueOfThirdText,
).to.equal(
UpdatedSmallValueOfThirdText,
);
expect(
CurrentValueOfFourthText,
).to.equal(
UpdatedSmallValueOfFourthText,
);
},
);
},
);
},
);
});
});
});
});
});
});
});
});
});
}
it("1. Validate change with auto height width for text widgets", function () {
agHelper.AddDsl("alignmentWithDynamicHeightDsl");
validateCssProperties("height");
validateCssProperties("left");
});
});
},
);
},
);
});
});
});
});
});
});
});
});
}
it("1. Validate change with auto height width for text widgets", function () {
agHelper.AddDsl("alignmentWithDynamicHeightDsl");
validateCssProperties("height");
validateCssProperties("left");
});
},
);

View File

@ -2,7 +2,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore";
import adminSettings from "../../../../locators/AdminsSettings";
const appNavigationLocators = require("../../../../locators/AppNavigation.json");
describe("Embed settings options", function () {
describe("Embed settings options", { tags: ["@tag.Settings"] }, function () {
const getIframeBody = () => {
// get the iframe > document > body
// and retry until the body element is not empty

View File

@ -14,82 +14,88 @@ let ee = ObjectsRegistry.EntityExplorer,
locator = ObjectsRegistry.CommonLocators,
homePage = ObjectsRegistry.HomePage;
describe("Entity explorer API pane related testcases", function () {
it("1. Empty Message validation for Widgets/API/Queries", function () {
homePage.CreateNewWorkspace("EmptyMsgCheck", true);
homePage.CreateAppInWorkspace("EmptyMsgCheck");
PageLeftPane.expandCollapseItem("Widgets");
agHelper.AssertElementVisibility(
locator._visibleTextSpan("No widget to display"),
);
agHelper.AssertElementVisibility(locator._visibleTextSpan("New widget"));
describe(
"Entity explorer API pane related testcases",
{ tags: ["@tag.IDE"] },
function () {
it("1. Empty Message validation for Widgets/API/Queries", function () {
homePage.CreateNewWorkspace("EmptyMsgCheck", true);
homePage.CreateAppInWorkspace("EmptyMsgCheck");
PageLeftPane.expandCollapseItem("Widgets");
agHelper.AssertElementVisibility(
locator._visibleTextSpan("No widget to display"),
);
agHelper.AssertElementVisibility(locator._visibleTextSpan("New widget"));
PageLeftPane.expandCollapseItem("Queries/JS");
agHelper.AssertElementVisibility(
locator._visibleTextSpan("No query/JS to display"),
);
agHelper.AssertElementVisibility(locator._visibleTextSpan("New query/JS"));
});
PageLeftPane.expandCollapseItem("Queries/JS");
agHelper.AssertElementVisibility(
locator._visibleTextSpan("No query/JS to display"),
);
agHelper.AssertElementVisibility(
locator._visibleTextSpan("New query/JS"),
);
});
it("2. Move to page / edit API name /properties validation", function () {
cy.CreateAPI("FirstAPI");
cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods);
cy.SaveAndRunAPI();
cy.validateRequest(
"FirstAPI",
testdata.baseUrl,
testdata.methods,
testdata.Get,
);
cy.ResponseStatusCheck(testdata.successStatusCode);
PageLeftPane.expandCollapseItem("Queries/JS");
ee.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "FirstAPI",
action: "Show bindings",
it("2. Move to page / edit API name /properties validation", function () {
cy.CreateAPI("FirstAPI");
cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods);
cy.SaveAndRunAPI();
cy.validateRequest(
"FirstAPI",
testdata.baseUrl,
testdata.methods,
testdata.Get,
);
cy.ResponseStatusCheck(testdata.successStatusCode);
PageLeftPane.expandCollapseItem("Queries/JS");
ee.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "FirstAPI",
action: "Show bindings",
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(5);
expect($lis.eq(0)).to.contain("{{FirstAPI.isLoading}}");
expect($lis.eq(1)).to.contain("{{FirstAPI.data}}");
expect($lis.eq(2)).to.contain("{{FirstAPI.responseMeta}}");
expect($lis.eq(3)).to.contain("{{FirstAPI.run()}}");
expect($lis.eq(4)).to.contain("{{FirstAPI.clear()}}");
});
cy.get(apiwidget.actionlist).contains(testdata.Get).should("be.visible");
cy.Createpage(pageid);
EditorNavigation.SelectEntityByName("Page1", EntityType.Page);
agHelper.Sleep(); //for the selected entity to settle loading!
PageLeftPane.expandCollapseItem("Queries/JS");
ee.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "FirstAPI",
action: "Edit name",
});
cy.EditApiNameFromExplorer("SecondAPI");
cy.xpath(apiwidget.popover)
.last()
.should("be.hidden")
.invoke("show")
.click({ force: true });
ee.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "SecondAPI",
action: "Move to page",
subAction: pageid,
toastToValidate: "action moved to page",
});
cy.wait(500);
PageLeftPane.expandCollapseItem("Queries/JS");
PageLeftPane.assertPresence("SecondAPI");
ee.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "SecondAPI",
action: "Show bindings",
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(5);
expect($lis.eq(0)).to.contain("{{SecondAPI.isLoading}}");
expect($lis.eq(1)).to.contain("{{SecondAPI.data}}");
expect($lis.eq(2)).to.contain("{{SecondAPI.responseMeta}}");
expect($lis.eq(3)).to.contain("{{SecondAPI.run()}}");
expect($lis.eq(4)).to.contain("{{SecondAPI.clear()}}");
});
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(5);
expect($lis.eq(0)).to.contain("{{FirstAPI.isLoading}}");
expect($lis.eq(1)).to.contain("{{FirstAPI.data}}");
expect($lis.eq(2)).to.contain("{{FirstAPI.responseMeta}}");
expect($lis.eq(3)).to.contain("{{FirstAPI.run()}}");
expect($lis.eq(4)).to.contain("{{FirstAPI.clear()}}");
});
cy.get(apiwidget.actionlist).contains(testdata.Get).should("be.visible");
cy.Createpage(pageid);
EditorNavigation.SelectEntityByName("Page1", EntityType.Page);
agHelper.Sleep(); //for the selected entity to settle loading!
PageLeftPane.expandCollapseItem("Queries/JS");
ee.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "FirstAPI",
action: "Edit name",
});
cy.EditApiNameFromExplorer("SecondAPI");
cy.xpath(apiwidget.popover)
.last()
.should("be.hidden")
.invoke("show")
.click({ force: true });
ee.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "SecondAPI",
action: "Move to page",
subAction: pageid,
toastToValidate: "action moved to page",
});
cy.wait(500);
PageLeftPane.expandCollapseItem("Queries/JS");
PageLeftPane.assertPresence("SecondAPI");
ee.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "SecondAPI",
action: "Show bindings",
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(5);
expect($lis.eq(0)).to.contain("{{SecondAPI.isLoading}}");
expect($lis.eq(1)).to.contain("{{SecondAPI.data}}");
expect($lis.eq(2)).to.contain("{{SecondAPI.responseMeta}}");
expect($lis.eq(3)).to.contain("{{SecondAPI.run()}}");
expect($lis.eq(4)).to.contain("{{SecondAPI.clear()}}");
});
});
});
},
);

View File

@ -21,7 +21,7 @@ const routes = {
VERSION: "/settings/version",
};
describe("Admin settings page", function () {
describe("Admin settings page", { tags: ["@tag.IDE"] }, function () {
beforeEach(() => {
cy.intercept("GET", "/api/v1/admin/env", {
body: { responseMeta: { status: 200, success: true }, data: {} },

View File

@ -21,7 +21,7 @@ const routes = {
VERSION: "/settings/version",
};
describe("Admin settings page", function () {
describe("Admin settings page", { tags: ["@tag.IDE"] }, function () {
it("1. should test that configure link redirects to google maps setup doc", () => {
cy.visit(routes.DEVELOPER_SETTINGS, { timeout: 60000 });
cy.get(adminsSettings.readMoreLink).within(() => {

View File

@ -9,72 +9,76 @@ import EditorNavigation, {
} from "../../../../support/Pages/EditorNavigation";
import PageList from "../../../../support/Pages/PageList";
describe("Entity explorer tests related to widgets and validation", function () {
beforeEach(() => {
agHelper.RestoreLocalStorageCache();
});
describe(
"Entity explorer tests related to widgets and validation",
{ tags: ["@tag.IDE"] },
function () {
beforeEach(() => {
agHelper.RestoreLocalStorageCache();
});
afterEach(() => {
agHelper.SaveLocalStorageCache();
});
afterEach(() => {
agHelper.SaveLocalStorageCache();
});
it("1. Add a widget to default page and verify the properties", function () {
agHelper.AddDsl("displayWidgetDsl");
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [
"Container4",
]);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Text1",
action: "Show bindings",
it("1. Add a widget to default page and verify the properties", function () {
agHelper.AddDsl("displayWidgetDsl");
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [
"Container4",
]);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Text1",
action: "Show bindings",
});
cy.get(jsEditor._propertyList).then(function ($lis) {
expect($lis).to.have.length(2);
expect($lis.eq(0)).to.contain("{{Text1.isVisible}}");
expect($lis.eq(1)).to.contain("{{Text1.text}}");
});
});
cy.get(jsEditor._propertyList).then(function ($lis) {
expect($lis).to.have.length(2);
expect($lis.eq(0)).to.contain("{{Text1.isVisible}}");
expect($lis.eq(1)).to.contain("{{Text1.text}}");
});
});
it("2. Create another page and add another widget and verify properties", function () {
PageList.AddNewPage("New blank page");
agHelper.AddDsl("tableWidgetDsl");
it("2. Create another page and add another widget and verify properties", function () {
PageList.AddNewPage("New blank page");
agHelper.AddDsl("tableWidgetDsl");
EditorNavigation.SelectEntityByName("Table1", EntityType.Widget, {}, [
"Container3",
]);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Table1",
action: "Show bindings",
EditorNavigation.SelectEntityByName("Table1", EntityType.Widget, {}, [
"Container3",
]);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Table1",
action: "Show bindings",
});
cy.get(jsEditor._propertyList).then(function ($lis) {
expect($lis).to.have.length(13);
expect($lis.eq(0)).to.contain("{{Table1.selectedRow}}");
expect($lis.eq(1)).to.contain("{{Table1.selectedRows}}");
expect($lis.eq(2)).to.contain("{{Table1.selectedRowIndices}}");
expect($lis.eq(3)).to.contain("{{Table1.triggeredRow}}");
expect($lis.eq(4)).to.contain("{{Table1.selectedRowIndex}}");
expect($lis.eq(5)).to.contain("{{Table1.tableData}}");
expect($lis.eq(6)).to.contain("{{Table1.filteredTableData}}");
expect($lis.eq(7)).to.contain("{{Table1.pageNo}}");
expect($lis.eq(8)).to.contain("{{Table1.pageSize}}");
expect($lis.eq(9)).to.contain("{{Table1.isVisible}}");
expect($lis.eq(10)).to.contain("{{Table1.searchText}}");
expect($lis.eq(11)).to.contain("{{Table1.totalRecordsCount}}");
expect($lis.eq(12)).to.contain("{{Table1.sortOrder}}");
});
});
cy.get(jsEditor._propertyList).then(function ($lis) {
expect($lis).to.have.length(13);
expect($lis.eq(0)).to.contain("{{Table1.selectedRow}}");
expect($lis.eq(1)).to.contain("{{Table1.selectedRows}}");
expect($lis.eq(2)).to.contain("{{Table1.selectedRowIndices}}");
expect($lis.eq(3)).to.contain("{{Table1.triggeredRow}}");
expect($lis.eq(4)).to.contain("{{Table1.selectedRowIndex}}");
expect($lis.eq(5)).to.contain("{{Table1.tableData}}");
expect($lis.eq(6)).to.contain("{{Table1.filteredTableData}}");
expect($lis.eq(7)).to.contain("{{Table1.pageNo}}");
expect($lis.eq(8)).to.contain("{{Table1.pageSize}}");
expect($lis.eq(9)).to.contain("{{Table1.isVisible}}");
expect($lis.eq(10)).to.contain("{{Table1.searchText}}");
expect($lis.eq(11)).to.contain("{{Table1.totalRecordsCount}}");
expect($lis.eq(12)).to.contain("{{Table1.sortOrder}}");
});
});
it("3. Toggle between widgets in different pages using search functionality", function () {
EditorNavigation.SelectEntityByName("Page1", EntityType.Page);
PageLeftPane.expandCollapseItem("Widgets");
PageLeftPane.expandCollapseItem("Container4");
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Text1",
action: "Show bindings",
it("3. Toggle between widgets in different pages using search functionality", function () {
EditorNavigation.SelectEntityByName("Page1", EntityType.Page);
PageLeftPane.expandCollapseItem("Widgets");
PageLeftPane.expandCollapseItem("Container4");
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Text1",
action: "Show bindings",
});
cy.get(jsEditor._propertyList).then(function ($lis) {
expect($lis).to.have.length(2);
expect($lis.eq(0)).to.contain("{{Text1.isVisible}}");
expect($lis.eq(1)).to.contain("{{Text1.text}}");
});
});
cy.get(jsEditor._propertyList).then(function ($lis) {
expect($lis).to.have.length(2);
expect($lis.eq(0)).to.contain("{{Text1.isVisible}}");
expect($lis.eq(1)).to.contain("{{Text1.text}}");
});
});
});
},
);

View File

@ -13,46 +13,73 @@ const pageid = "MyPage";
let updatedName;
let datasourceName;
describe("Entity explorer tests related to copy query", function () {
beforeEach(() => {
cy.startRoutesForDatasource();
});
// afterEach(function() {
// if (this.currentTest.state === "failed") {
// Cypress.runner.stop();
// }
// });
it("1. Create a query with dataSource in explorer, Create new Page", function () {
cy.Createpage(pageid);
EditorNavigation.SelectEntityByName("Page1", EntityType.Page);
dataSources.CreateDataSource("Postgres");
cy.get("@saveDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
dataSources.CreateQueryAfterDSSaved(datasourceName);
describe(
"Entity explorer tests related to copy query",
{ tags: ["@tag.IDE"] },
function () {
beforeEach(() => {
cy.startRoutesForDatasource();
});
cy.get("@getPluginForm").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
// afterEach(function() {
// if (this.currentTest.state === "failed") {
// Cypress.runner.stop();
// }
// });
dataSources.EnterQuery("select * from users");
it("1. Create a query with dataSource in explorer, Create new Page", function () {
cy.Createpage(pageid);
EditorNavigation.SelectEntityByName("Page1", EntityType.Page);
dataSources.CreateDataSource("Postgres");
cy.EvaluateCurrentValue("select * from users");
cy.get(".t--action-name-edit-field").click({ force: true });
cy.get("@saveDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
PageLeftPane.expandCollapseItem("Queries/JS");
cy.get("@saveDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
dataSources.CreateQueryAfterDSSaved(datasourceName);
});
cy.get("@getPluginForm").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
dataSources.EnterQuery("select * from users");
cy.EvaluateCurrentValue("select * from users");
cy.get(".t--action-name-edit-field").click({ force: true });
cy.get("@saveDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
PageLeftPane.expandCollapseItem("Queries/JS");
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Query1",
action: "Show bindings",
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(5);
expect($lis.eq(0)).to.contain("{{Query1.isLoading}}");
expect($lis.eq(1)).to.contain("{{Query1.data}}");
expect($lis.eq(2)).to.contain("{{Query1.responseMeta}}");
expect($lis.eq(3)).to.contain("{{Query1.run()}}");
expect($lis.eq(4)).to.contain("{{Query1.clear()}}");
});
});
});
it("2. Copy query in explorer to new page & verify Bindings are copied too", function () {
EditorNavigation.SelectEntityByName("Query1", EntityType.Query);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Query1",
action: "Copy to page",
subAction: pageid,
toastToValidate: "copied to page",
});
EditorNavigation.SelectEntityByName("Query1", EntityType.Query);
cy.runQuery();
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Query1",
action: "Show bindings",
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(5);
expect($lis.eq(0)).to.contain("{{Query1.isLoading}}");
expect($lis.eq(1)).to.contain("{{Query1.data}}");
expect($lis.eq(2)).to.contain("{{Query1.responseMeta}}");
@ -60,28 +87,5 @@ describe("Entity explorer tests related to copy query", function () {
expect($lis.eq(4)).to.contain("{{Query1.clear()}}");
});
});
});
it("2. Copy query in explorer to new page & verify Bindings are copied too", function () {
EditorNavigation.SelectEntityByName("Query1", EntityType.Query);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Query1",
action: "Copy to page",
subAction: pageid,
toastToValidate: "copied to page",
});
EditorNavigation.SelectEntityByName("Query1", EntityType.Query);
cy.runQuery();
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Query1",
action: "Show bindings",
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis.eq(0)).to.contain("{{Query1.isLoading}}");
expect($lis.eq(1)).to.contain("{{Query1.data}}");
expect($lis.eq(2)).to.contain("{{Query1.responseMeta}}");
expect($lis.eq(3)).to.contain("{{Query1.run()}}");
expect($lis.eq(4)).to.contain("{{Query1.clear()}}");
});
});
});
},
);

View File

@ -10,51 +10,55 @@ const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const widgetsPage = require("../../../../locators/Widgets.json");
import * as _ from "../../../../support/Objects/ObjectsCore";
describe("Entity explorer Drag and Drop widgets testcases", function () {
it("1. Drag and drop form widget and validate", function () {
cy.get(explorer.addWidget).click({ force: true });
cy.get(commonlocators.entityExplorersearch).should("be.visible");
cy.get(commonlocators.entityExplorersearch).clear().type("form");
cy.dragAndDropToCanvas("formwidget", { x: 300, y: 80 });
cy.get(formWidgetsPage.formD).click();
/**
* @param{Text} Random Text
* @param{FormWidget}Mouseover
* @param{FormPre Css} Assertion
*/
cy.widgetText(
"FormTest",
formWidgetsPage.formWidget,
widgetsPage.widgetNameSpan,
);
/**
* @param{Text} Random Colour
*/
cy.moveToStyleTab();
cy.selectColor("backgroundcolor");
cy.get(formWidgetsPage.formD)
.should("have.css", "background-color")
.and("eq", "rgb(219, 234, 254)");
/**
* @param{toggleButton Css} Assert to be checked
*/
cy.moveToContentTab();
cy.get(formWidgetsPage.formD)
.scrollTo("bottom", { ensureScrollable: false })
.should("be.visible");
PageLeftPane.switchSegment(PagePaneSegment.Explorer);
_.deployMode.DeployApp();
_.deployMode.NavigateBacktoEditor();
cy.CheckAndUnfoldEntityItem("Widgets");
_.entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "FormTest",
action: "Show bindings",
describe(
"Entity explorer Drag and Drop widgets testcases",
{ tags: ["@tag.IDE"] },
function () {
it("1. Drag and drop form widget and validate", function () {
cy.get(explorer.addWidget).click({ force: true });
cy.get(commonlocators.entityExplorersearch).should("be.visible");
cy.get(commonlocators.entityExplorersearch).clear().type("form");
cy.dragAndDropToCanvas("formwidget", { x: 300, y: 80 });
cy.get(formWidgetsPage.formD).click();
/**
* @param{Text} Random Text
* @param{FormWidget}Mouseover
* @param{FormPre Css} Assertion
*/
cy.widgetText(
"FormTest",
formWidgetsPage.formWidget,
widgetsPage.widgetNameSpan,
);
/**
* @param{Text} Random Colour
*/
cy.moveToStyleTab();
cy.selectColor("backgroundcolor");
cy.get(formWidgetsPage.formD)
.should("have.css", "background-color")
.and("eq", "rgb(219, 234, 254)");
/**
* @param{toggleButton Css} Assert to be checked
*/
cy.moveToContentTab();
cy.get(formWidgetsPage.formD)
.scrollTo("bottom", { ensureScrollable: false })
.should("be.visible");
PageLeftPane.switchSegment(PagePaneSegment.Explorer);
_.deployMode.DeployApp();
_.deployMode.NavigateBacktoEditor();
cy.CheckAndUnfoldEntityItem("Widgets");
_.entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "FormTest",
action: "Show bindings",
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(3);
expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}");
expect($lis.eq(1)).to.contain("{{FormTest.data}}");
expect($lis.eq(2)).to.contain("{{FormTest.hasChanges}}");
});
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(3);
expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}");
expect($lis.eq(1)).to.contain("{{FormTest.data}}");
expect($lis.eq(2)).to.contain("{{FormTest.hasChanges}}");
});
});
});
},
);

View File

@ -4,7 +4,7 @@ const apiwidget = require("../../../../locators/apiWidgetslocator.json");
import * as _ from "../../../../support/Objects/ObjectsCore";
describe("Tab widget test", function () {
describe("Tab widget test", { tags: ["@tag.IDE"] }, function () {
const apiName = "Table1";
const tableName = "Table1";
before(() => {

View File

@ -4,26 +4,30 @@ import EditorNavigation, {
import * as _ from "../../../../support/Objects/ObjectsCore";
describe("Hide / Show page test functionality", function () {
it("1. Hide/Show page test ", function () {
cy.CreatePage(); // Page2
cy.CreatePage(); // Page3
EditorNavigation.SelectEntityByName("Page1", EntityType.Page);
_.entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Page2",
action: "Hide",
describe(
"Hide / Show page test functionality",
{ tags: ["@tag.IDE"] },
function () {
it("1. Hide/Show page test ", function () {
cy.CreatePage(); // Page2
cy.CreatePage(); // Page3
EditorNavigation.SelectEntityByName("Page1", EntityType.Page);
_.entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Page2",
action: "Hide",
});
cy.ClearSearch();
_.deployMode.DeployApp();
cy.get(".t--page-switch-tab").should("have.length", 2);
//Show page test
_.deployMode.NavigateBacktoEditor();
_.entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Page2",
action: "Show",
});
cy.ClearSearch();
_.deployMode.DeployApp();
cy.get(".t--page-switch-tab").should("have.length", 3);
});
cy.ClearSearch();
_.deployMode.DeployApp();
cy.get(".t--page-switch-tab").should("have.length", 2);
//Show page test
_.deployMode.NavigateBacktoEditor();
_.entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Page2",
action: "Show",
});
cy.ClearSearch();
_.deployMode.DeployApp();
cy.get(".t--page-switch-tab").should("have.length", 3);
});
});
},
);

View File

@ -9,65 +9,69 @@ import EditorNavigation, {
} from "../../../../support/Pages/EditorNavigation";
import PageList from "../../../../support/Pages/PageList";
describe("Validate basic operations on Entity explorer JSEditor structure", () => {
const pageId = "Page1";
describe(
"Validate basic operations on Entity explorer JSEditor structure",
{ tags: ["@tag.IDE"] },
() => {
const pageId = "Page1";
it("1. Validate JSObject creation & Run", () => {
jsEditor.CreateJSObject('return "Hello World";');
PageLeftPane.expandCollapseItem("Queries/JS");
PageLeftPane.assertPresence("JSObject1");
jsEditor.ValidateDefaultJSObjProperties("JSObject1");
it("1. Validate JSObject creation & Run", () => {
jsEditor.CreateJSObject('return "Hello World";');
PageLeftPane.expandCollapseItem("Queries/JS");
PageLeftPane.assertPresence("JSObject1");
jsEditor.ValidateDefaultJSObjProperties("JSObject1");
//Validate Rename JSObject from Form Header
jsEditor.RenameJSObjFromPane("RenamedJSObject");
PageLeftPane.assertPresence("RenamedJSObject");
jsEditor.ValidateDefaultJSObjProperties("RenamedJSObject");
//Validate Rename JSObject from Form Header
jsEditor.RenameJSObjFromPane("RenamedJSObject");
PageLeftPane.assertPresence("RenamedJSObject");
jsEditor.ValidateDefaultJSObjProperties("RenamedJSObject");
// Validate Copy JSObject
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "RenamedJSObject",
action: "Copy to page",
subAction: pageId,
toastToValidate: "copied to page",
// Validate Copy JSObject
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "RenamedJSObject",
action: "Copy to page",
subAction: pageId,
toastToValidate: "copied to page",
});
cy.wait("@createNewJSCollection").should(
"have.nested.property",
"response.body.responseMeta.status",
201,
);
PageLeftPane.assertPresence("RenamedJSObjectCopy");
jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy");
//Validate Rename JSObject from Entity Explorer
jsEditor.RenameJSObjFromExplorer("RenamedJSObject", "ExplorerRenamed");
PageLeftPane.assertPresence("ExplorerRenamed");
jsEditor.ValidateDefaultJSObjProperties("ExplorerRenamed");
});
cy.wait("@createNewJSCollection").should(
"have.nested.property",
"response.body.responseMeta.status",
201,
);
PageLeftPane.assertPresence("RenamedJSObjectCopy");
jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy");
//Validate Rename JSObject from Entity Explorer
jsEditor.RenameJSObjFromExplorer("RenamedJSObject", "ExplorerRenamed");
PageLeftPane.assertPresence("ExplorerRenamed");
jsEditor.ValidateDefaultJSObjProperties("ExplorerRenamed");
});
it("2. Validate Move JSObject", function () {
const newPageId = "Page2";
PageList.AddNewPage();
PageLeftPane.assertPresence(newPageId);
EditorNavigation.SelectEntityByName(pageId, EntityType.Page);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "RenamedJSObjectCopy",
action: "Move to page",
subAction: newPageId,
toastToValidate: "moved to page",
it("2. Validate Move JSObject", function () {
const newPageId = "Page2";
PageList.AddNewPage();
PageLeftPane.assertPresence(newPageId);
EditorNavigation.SelectEntityByName(pageId, EntityType.Page);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "RenamedJSObjectCopy",
action: "Move to page",
subAction: newPageId,
toastToValidate: "moved to page",
});
EditorNavigation.SelectEntityByName(newPageId, EntityType.Page);
PageLeftPane.expandCollapseItem("Queries/JS");
PageLeftPane.assertPresence("RenamedJSObjectCopy");
jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy");
});
EditorNavigation.SelectEntityByName(newPageId, EntityType.Page);
PageLeftPane.expandCollapseItem("Queries/JS");
PageLeftPane.assertPresence("RenamedJSObjectCopy");
jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy");
});
it("3. Validate Deletion of JSObject", function () {
EditorNavigation.SelectEntityByName(pageId, EntityType.Page);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "ExplorerRenamed",
action: "Delete",
entityType: entityItems.JSObject,
it("3. Validate Deletion of JSObject", function () {
EditorNavigation.SelectEntityByName(pageId, EntityType.Page);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "ExplorerRenamed",
action: "Delete",
entityType: entityItems.JSObject,
});
PageLeftPane.assertAbsence("ExplorerRenamed");
});
PageLeftPane.assertAbsence("ExplorerRenamed");
});
});
},
);

View File

@ -7,31 +7,35 @@ const shortName = "shortName";
const longName = "AVeryLongNameThatOverflows";
const alternateName = "AlternateName";
const tooltTipQuery = `.rc-tooltip.ads-v2-tooltip:not(.rc-tooltip-hidden) > .rc-tooltip-content > .rc-tooltip-inner > .ads-v2-text`;
describe("Entity Explorer showing tooltips on long names", function () {
it("1. Expect tooltip on long names only", function () {
// create an API with a short name
cy.CreateAPI(shortName);
PageLeftPane.expandCollapseItem("Queries/JS", true);
// assert that a tooltip does not show up during hover
cy.get(`.t--entity-item:contains(${shortName})`).realHover();
cy.get(tooltTipQuery).should("not.exist");
// reset the hover
cy.get("body").realHover({ position: "topLeft" });
describe(
"Entity Explorer showing tooltips on long names",
{ tags: ["@tag.IDE"] },
function () {
it("1. Expect tooltip on long names only", function () {
// create an API with a short name
cy.CreateAPI(shortName);
PageLeftPane.expandCollapseItem("Queries/JS", true);
// assert that a tooltip does not show up during hover
cy.get(`.t--entity-item:contains(${shortName})`).realHover();
cy.get(tooltTipQuery).should("not.exist");
// reset the hover
cy.get("body").realHover({ position: "topLeft" });
// create another API with a long name
cy.CreateAPI(longName);
// create another API with a long name
cy.CreateAPI(longName);
// assert that a tooltip does show up during hover
cy.get(`.t--entity-item:contains(${longName})`).realHover();
cy.get(tooltTipQuery).should("have.text", longName);
// reset the hover
cy.get("body").realHover({ position: "topLeft" });
// assert that a tooltip does show up during hover
cy.get(`.t--entity-item:contains(${longName})`).realHover();
cy.get(tooltTipQuery).should("have.text", longName);
// reset the hover
cy.get("body").realHover({ position: "topLeft" });
// rename it and ensure the tooltip does not show again
ee.RenameEntityFromExplorer(longName, alternateName);
cy.wait("@saveAction");
// rename it and ensure the tooltip does not show again
ee.RenameEntityFromExplorer(longName, alternateName);
cy.wait("@saveAction");
cy.get(`.t--entity-item:contains(${alternateName})`).realHover();
cy.get(tooltTipQuery).should("not.exist");
});
});
cy.get(`.t--entity-item:contains(${alternateName})`).realHover();
cy.get(tooltTipQuery).should("not.exist");
});
},
);

View File

@ -9,7 +9,7 @@ import {
entityExplorer,
} from "../../../../support/Objects/ObjectsCore";
describe("Page Load tests", () => {
describe("Page Load tests", { tags: ["@tag.IDE"] }, () => {
afterEach(() => {
agHelper.SaveLocalStorageCache();
});

View File

@ -7,7 +7,7 @@ const locators = {
errorPageTitle: ".t--error-page-title",
};
describe("Pages", function () {
describe("Pages", { tags: ["@tag.IDE"] }, function () {
let veryLongPageName = `abcdefghijklmnopqrstuvwxyz1234`;
let apiName = "someApi";

View File

@ -15,98 +15,105 @@ import {
const pageid = "MyPage";
let datasourceName;
describe("Entity explorer tests related to query and datasource", function () {
before(() => {
cy.generateUUID().then((uid) => {
datasourceName = uid;
describe(
"Entity explorer tests related to query and datasource",
{ tags: ["@tag.IDE"] },
function () {
before(() => {
cy.generateUUID().then((uid) => {
datasourceName = uid;
});
});
});
beforeEach(() => {
cy.startRoutesForDatasource();
});
it("1. Create a page/moveQuery/rename/delete in explorer", function () {
cy.Createpage(pageid);
cy.wait(2000);
EditorNavigation.SelectEntityByName("Page1", EntityType.Page);
cy.wait(2000);
dataSources.NavigateToDSCreateNew();
dataSources.CreatePlugIn("PostgreSQL");
dataSources.FillPostgresDSForm();
// checking that conflicting names are not allowed
cy.get(".t--edit-datasource-name").click();
cy.get(".t--edit-datasource-name input")
.clear()
.type("download", { force: true })
.blur();
cy.get(".Toastify").should("contain", "Invalid name");
// checking a valid name
cy.get(".t--edit-datasource-name").click();
cy.get(".t--edit-datasource-name input")
.clear()
.type(datasourceName, { force: true })
.should("have.value", datasourceName)
.blur();
cy.testSaveDatasource();
dataSources.CreateQueryAfterDSSaved(datasourceName);
EditorNavigation.SelectEntityByName(datasourceName, EntityType.Datasource);
agHelper.RenameWithInPane(`${datasourceName}new`, false);
cy.contains(dataSources._datasourceCard, `${datasourceName}new`);
// reverting the name
agHelper.RenameWithInPane(datasourceName, false);
// going to the query create page
EditorNavigation.SelectEntityByName("Query1", EntityType.Query);
cy.wait("@getPluginForm").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
dataSources.EnterQuery("select * from users");
cy.EvaluateCurrentValue("select * from users");
cy.get(".t--action-name-edit-field").click({ force: true });
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Query1",
action: "Show bindings",
beforeEach(() => {
cy.startRoutesForDatasource();
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(5);
expect($lis.eq(0)).to.contain("{{Query1.isLoading}}");
expect($lis.eq(1)).to.contain("{{Query1.data}}");
expect($lis.eq(2)).to.contain("{{Query1.responseMeta}}");
expect($lis.eq(3)).to.contain("{{Query1.run()}}");
expect($lis.eq(4)).to.contain("{{Query1.clear()}}");
});
cy.get(".t--entity-property-close").click(); //closing Bindings overlay
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Query1",
action: "Edit name",
});
cy.EditApiNameFromExplorer("MyQuery");
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "MyQuery",
action: "Move to page",
subAction: pageid,
toastToValidate: "action moved to page",
});
cy.wait(2000);
EditorNavigation.SelectEntityByName("MyQuery", EntityType.Query);
cy.wait(2000);
cy.runQuery();
//deleteQuery & DS
agHelper.ActionContextMenuWithInPane({
action: "Delete",
entityType: entityItems.Query,
it("1. Create a page/moveQuery/rename/delete in explorer", function () {
cy.Createpage(pageid);
cy.wait(2000);
EditorNavigation.SelectEntityByName("Page1", EntityType.Page);
cy.wait(2000);
dataSources.NavigateToDSCreateNew();
dataSources.CreatePlugIn("PostgreSQL");
dataSources.FillPostgresDSForm();
// checking that conflicting names are not allowed
cy.get(".t--edit-datasource-name").click();
cy.get(".t--edit-datasource-name input")
.clear()
.type("download", { force: true })
.blur();
cy.get(".Toastify").should("contain", "Invalid name");
// checking a valid name
cy.get(".t--edit-datasource-name").click();
cy.get(".t--edit-datasource-name input")
.clear()
.type(datasourceName, { force: true })
.should("have.value", datasourceName)
.blur();
cy.testSaveDatasource();
dataSources.CreateQueryAfterDSSaved(datasourceName);
EditorNavigation.SelectEntityByName(
datasourceName,
EntityType.Datasource,
);
agHelper.RenameWithInPane(`${datasourceName}new`, false);
cy.contains(dataSources._datasourceCard, `${datasourceName}new`);
// reverting the name
agHelper.RenameWithInPane(datasourceName, false);
// going to the query create page
EditorNavigation.SelectEntityByName("Query1", EntityType.Query);
cy.wait("@getPluginForm").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
dataSources.EnterQuery("select * from users");
cy.EvaluateCurrentValue("select * from users");
cy.get(".t--action-name-edit-field").click({ force: true });
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Query1",
action: "Show bindings",
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(5);
expect($lis.eq(0)).to.contain("{{Query1.isLoading}}");
expect($lis.eq(1)).to.contain("{{Query1.data}}");
expect($lis.eq(2)).to.contain("{{Query1.responseMeta}}");
expect($lis.eq(3)).to.contain("{{Query1.run()}}");
expect($lis.eq(4)).to.contain("{{Query1.clear()}}");
});
cy.get(".t--entity-property-close").click(); //closing Bindings overlay
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Query1",
action: "Edit name",
});
cy.EditApiNameFromExplorer("MyQuery");
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "MyQuery",
action: "Move to page",
subAction: pageid,
toastToValidate: "action moved to page",
});
cy.wait(2000);
EditorNavigation.SelectEntityByName("MyQuery", EntityType.Query);
cy.wait(2000);
cy.runQuery();
//deleteQuery & DS
agHelper.ActionContextMenuWithInPane({
action: "Delete",
entityType: entityItems.Query,
});
dataSources.DeleteDatasourceFromWithinDS(datasourceName);
});
dataSources.DeleteDatasourceFromWithinDS(datasourceName);
});
});
},
);

View File

@ -13,62 +13,70 @@ import { PageLeftPane } from "../../../../support/Pages/EditorNavigation";
const firstApiName = "First";
const secondApiName = "Second";
describe("Api Naming conflict on a page test", function () {
it("1. Expects actions on the same page cannot have identical names", function () {
// create an API
apiPage.CreateApi(firstApiName);
// create another API
apiPage.CreateApi(secondApiName);
PageLeftPane.expandCollapseItem("Queries/JS");
// try to rename one of the APIs with an existing API name
cy.get(`.t--entity-item:contains(${secondApiName})`).within(() => {
cy.get(".t--context-menu").click({ force: true });
describe(
"Api Naming conflict on a page test",
{ tags: ["@tag.IDE"] },
function () {
it("1. Expects actions on the same page cannot have identical names", function () {
// create an API
apiPage.CreateApi(firstApiName);
// create another API
apiPage.CreateApi(secondApiName);
PageLeftPane.expandCollapseItem("Queries/JS");
// try to rename one of the APIs with an existing API name
cy.get(`.t--entity-item:contains(${secondApiName})`).within(() => {
cy.get(".t--context-menu").click({ force: true });
});
cy.selectAction("Edit name");
cy.get(explorer.editEntity).last().type(firstApiName, { force: true });
cy.validateMessage(firstApiName);
agHelper.PressEnter();
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: secondApiName,
action: "Delete",
entityType: entityItems.Api,
});
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: firstApiName,
action: "Delete",
entityType: entityItems.Api,
});
});
cy.selectAction("Edit name");
cy.get(explorer.editEntity).last().type(firstApiName, { force: true });
cy.validateMessage(firstApiName);
agHelper.PressEnter();
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: secondApiName,
action: "Delete",
entityType: entityItems.Api,
});
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: firstApiName,
action: "Delete",
entityType: entityItems.Api,
});
});
});
},
);
describe("Api Naming conflict on different pages test", function () {
it("2. It expects actions on different pages can have identical names", function () {
// create a new API
cy.CreateAPI(firstApiName);
PageLeftPane.expandCollapseItem("Queries/JS", true);
describe(
"Api Naming conflict on different pages test",
{ tags: ["@tag.IDE"] },
function () {
it("2. It expects actions on different pages can have identical names", function () {
// create a new API
cy.CreateAPI(firstApiName);
PageLeftPane.expandCollapseItem("Queries/JS", true);
// create a new page and an API on that page
PageList.AddNewPage();
cy.CreateAPI(firstApiName);
PageLeftPane.expandCollapseItem("Queries/JS", true);
PageLeftPane.assertPresence(firstApiName);
cy.get(`.t--entity-item:contains(${firstApiName})`).within(() => {
cy.get(".t--context-menu").click({ force: true });
// create a new page and an API on that page
PageList.AddNewPage();
cy.CreateAPI(firstApiName);
PageLeftPane.expandCollapseItem("Queries/JS", true);
PageLeftPane.assertPresence(firstApiName);
cy.get(`.t--entity-item:contains(${firstApiName})`).within(() => {
cy.get(".t--context-menu").click({ force: true });
});
cy.deleteActionAndConfirm();
cy.get(`.t--entity-item:contains(Page2)`).within(() => {
cy.get(".t--context-menu").click({ force: true });
});
cy.deleteActionAndConfirm();
cy.get(`.t--entity-item:contains(${firstApiName})`).within(() => {
cy.get(".t--context-menu").click({ force: true });
});
cy.deleteActionAndConfirm();
cy.wait(1000);
});
cy.deleteActionAndConfirm();
cy.get(`.t--entity-item:contains(Page2)`).within(() => {
cy.get(".t--context-menu").click({ force: true });
});
cy.deleteActionAndConfirm();
cy.get(`.t--entity-item:contains(${firstApiName})`).within(() => {
cy.get(".t--context-menu").click({ force: true });
});
cy.deleteActionAndConfirm();
cy.wait(1000);
});
});
},
);
describe("Entity Naming conflict test", function () {
describe("Entity Naming conflict test", { tags: ["@tag.IDE"] }, function () {
it("3. Expects JS objects and actions to not have identical names on the same page.", function () {
PageLeftPane.expandCollapseItem("Queries/JS", true);
// create JS object and name it

View File

@ -11,104 +11,108 @@ import {
} from "../../../../support/Pages/EditorNavigation";
let mockDBNameUsers: string, mockDBNameMovies: string;
describe("Entity explorer context menu should hide on scrolling", function () {
it(
"excludeForAirgap",
"1. Bug #15474 - Entity explorer menu must close on scroll",
function () {
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
PageLeftPane.switchSegment(PagePaneSegment.Explorer);
PageLeftPane.expandCollapseItem("Modal1");
PageLeftPane.expandCollapseItem("Modal2");
PageLeftPane.expandCollapseItem("Modal3");
PageLeftPane.expandCollapseItem("Modal4");
PageLeftPane.expandCollapseItem("Modal5");
PageLeftPane.expandCollapseItem("Modal6");
describe(
"Entity explorer context menu should hide on scrolling",
{ tags: ["@tag.IDE"] },
function () {
it(
"excludeForAirgap",
"1. Bug #15474 - Entity explorer menu must close on scroll",
function () {
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
PageLeftPane.switchSegment(PagePaneSegment.Explorer);
PageLeftPane.expandCollapseItem("Modal1");
PageLeftPane.expandCollapseItem("Modal2");
PageLeftPane.expandCollapseItem("Modal3");
PageLeftPane.expandCollapseItem("Modal4");
PageLeftPane.expandCollapseItem("Modal5");
PageLeftPane.expandCollapseItem("Modal6");
// Setup to make the explorer scrollable
PageLeftPane.expandCollapseItem("Queries/JS");
dataSources.CreateMockDB("Users").then(($createdMockUsers) => {
cy.log("Users DB created is " + $createdMockUsers);
mockDBNameUsers = $createdMockUsers;
dataSources.CreateQueryAfterDSSaved();
entityExplorer.CreateNewDsQuery(mockDBNameUsers);
entityExplorer.CreateNewDsQuery(mockDBNameUsers);
entityExplorer.CreateNewDsQuery(mockDBNameUsers);
dataSources.CreateMockDB("Movies").then(($createdMockMovies) => {
cy.log("Movies DB created is " + $createdMockMovies);
mockDBNameMovies = $createdMockMovies;
// Setup to make the explorer scrollable
PageLeftPane.expandCollapseItem("Queries/JS");
dataSources.CreateMockDB("Users").then(($createdMockUsers) => {
cy.log("Users DB created is " + $createdMockUsers);
mockDBNameUsers = $createdMockUsers;
dataSources.CreateQueryAfterDSSaved();
entityExplorer.CreateNewDsQuery(mockDBNameMovies);
entityExplorer.CreateNewDsQuery(mockDBNameMovies);
entityExplorer.CreateNewDsQuery(mockDBNameMovies);
entityExplorer.CreateNewDsQuery(mockDBNameUsers);
entityExplorer.CreateNewDsQuery(mockDBNameUsers);
entityExplorer.CreateNewDsQuery(mockDBNameUsers);
agHelper.GetNClick(locators._createNew);
agHelper.AssertElementVisibility(entityExplorer._adsPopup);
agHelper.ScrollTo(entityExplorer._entityExplorerWrapper, "top");
agHelper.AssertElementAbsence(entityExplorer._adsPopup);
dataSources.CreateMockDB("Movies").then(($createdMockMovies) => {
cy.log("Movies DB created is " + $createdMockMovies);
mockDBNameMovies = $createdMockMovies;
dataSources.CreateQueryAfterDSSaved();
entityExplorer.CreateNewDsQuery(mockDBNameMovies);
entityExplorer.CreateNewDsQuery(mockDBNameMovies);
entityExplorer.CreateNewDsQuery(mockDBNameMovies);
agHelper.GetNClick(locators._createNew);
agHelper.AssertElementVisibility(entityExplorer._adsPopup);
agHelper.ScrollTo(entityExplorer._entityExplorerWrapper, "top");
agHelper.AssertElementAbsence(entityExplorer._adsPopup);
});
});
});
},
);
},
);
it(
"airgap",
"1. Bug #15474 - Entity explorer menu must close on scroll - airgap",
function () {
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
PageLeftPane.switchSegment(PagePaneSegment.Explorer);
PageLeftPane.expandCollapseItem("Modal1");
PageLeftPane.expandCollapseItem("Modal2");
PageLeftPane.expandCollapseItem("Modal3");
PageLeftPane.expandCollapseItem("Modal4");
PageLeftPane.expandCollapseItem("Modal5");
PageLeftPane.expandCollapseItem("Modal6");
it(
"airgap",
"1. Bug #15474 - Entity explorer menu must close on scroll - airgap",
function () {
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
agHelper.GetNClick(locators._closeModal, 0, true, 0);
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL);
PageLeftPane.switchSegment(PagePaneSegment.Explorer);
PageLeftPane.expandCollapseItem("Modal1");
PageLeftPane.expandCollapseItem("Modal2");
PageLeftPane.expandCollapseItem("Modal3");
PageLeftPane.expandCollapseItem("Modal4");
PageLeftPane.expandCollapseItem("Modal5");
PageLeftPane.expandCollapseItem("Modal6");
// Setup to make the explorer scrollable
PageLeftPane.expandCollapseItem("Queries/JS");
dataSources.CreateDataSource("Postgres");
cy.get("@dsName").then(($createdMockUsers: any) => {
mockDBNameUsers = $createdMockUsers;
dataSources.CreateQueryAfterDSSaved();
entityExplorer.CreateNewDsQuery(mockDBNameUsers);
entityExplorer.CreateNewDsQuery(mockDBNameUsers);
entityExplorer.CreateNewDsQuery(mockDBNameUsers);
dataSources.CreateDataSource("Mongo");
cy.get("@dsName").then(($createdMockMovies: any) => {
mockDBNameMovies = $createdMockMovies;
// Setup to make the explorer scrollable
PageLeftPane.expandCollapseItem("Queries/JS");
dataSources.CreateDataSource("Postgres");
cy.get("@dsName").then(($createdMockUsers: any) => {
mockDBNameUsers = $createdMockUsers;
dataSources.CreateQueryAfterDSSaved();
entityExplorer.CreateNewDsQuery(mockDBNameMovies);
entityExplorer.CreateNewDsQuery(mockDBNameMovies);
entityExplorer.CreateNewDsQuery(mockDBNameMovies);
entityExplorer.CreateNewDsQuery(mockDBNameUsers);
entityExplorer.CreateNewDsQuery(mockDBNameUsers);
entityExplorer.CreateNewDsQuery(mockDBNameUsers);
agHelper.GetNClick(locators._createNew);
agHelper.AssertElementVisibility(entityExplorer._adsPopup);
agHelper.ScrollTo(entityExplorer._entityExplorerWrapper, "top");
agHelper.AssertElementAbsence(entityExplorer._adsPopup);
dataSources.CreateDataSource("Mongo");
cy.get("@dsName").then(($createdMockMovies: any) => {
mockDBNameMovies = $createdMockMovies;
dataSources.CreateQueryAfterDSSaved();
entityExplorer.CreateNewDsQuery(mockDBNameMovies);
entityExplorer.CreateNewDsQuery(mockDBNameMovies);
entityExplorer.CreateNewDsQuery(mockDBNameMovies);
agHelper.GetNClick(locators._createNew);
agHelper.AssertElementVisibility(entityExplorer._adsPopup);
agHelper.ScrollTo(entityExplorer._entityExplorerWrapper, "top");
agHelper.AssertElementAbsence(entityExplorer._adsPopup);
});
});
});
},
);
});
},
);
},
);

View File

@ -6,7 +6,7 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
describe("Explorer hidden widget Selection", () => {
describe("Explorer hidden widget Selection", { tags: ["@tag.IDE"] }, () => {
before(() => {
_.agHelper.AddDsl("explorerHiddenWidgets");
});

View File

@ -6,7 +6,7 @@ import {
} from "../../../../support/Objects/ObjectsCore";
import { PageLeftPane } from "../../../../support/Pages/EditorNavigation";
describe("Tab widget test", function () {
describe("Tab widget test", { tags: ["@tag.IDE"] }, function () {
const tabname = "UpdatedTab";
before(() => {
agHelper.AddDsl("tabdsl");

View File

@ -15,52 +15,56 @@ before(() => {
agHelper.AddDsl("formWidgetdsl");
});
describe("Test Suite to validate copy/delete/undo functionalites", function () {
const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
describe(
"Test Suite to validate copy/delete/undo functionalites",
{ tags: ["@tag.IDE"] },
function () {
const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
it("1. Drag and drop form widget and validate copy widget via toast message", function () {
EditorNavigation.SelectEntityByName("Form1", EntityType.Widget);
propPane.RenameWidget("Form1", "FormTest");
cy.get(commonlocators.copyWidget).click();
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.get(commonlocators.toastBody).first().contains("Copied");
});
it("2. Delete Widget from sidebar and Undo action validation", function () {
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "FormTest",
action: "Show bindings",
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(3);
expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}");
expect($lis.eq(1)).to.contain("{{FormTest.data}}");
expect($lis.eq(2)).to.contain("{{FormTest.hasChanges}}");
});
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "FormTest",
action: "Delete",
entityType: EntityItems.Widget,
it("1. Drag and drop form widget and validate copy widget via toast message", function () {
EditorNavigation.SelectEntityByName("Form1", EntityType.Widget);
propPane.RenameWidget("Form1", "FormTest");
cy.get(commonlocators.copyWidget).click();
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.get(commonlocators.toastBody).first().contains("Copied");
});
cy.get("body").type(`{${modifierKey}}z`, { force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "FormTest",
action: "Show bindings",
it("2. Delete Widget from sidebar and Undo action validation", function () {
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "FormTest",
action: "Show bindings",
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(3);
expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}");
expect($lis.eq(1)).to.contain("{{FormTest.data}}");
expect($lis.eq(2)).to.contain("{{FormTest.hasChanges}}");
});
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "FormTest",
action: "Delete",
entityType: EntityItems.Widget,
});
cy.get("body").type(`{${modifierKey}}z`, { force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "FormTest",
action: "Show bindings",
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(3);
expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}");
expect($lis.eq(1)).to.contain("{{FormTest.data}}");
expect($lis.eq(2)).to.contain("{{FormTest.hasChanges}}");
});
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(3);
expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}");
expect($lis.eq(1)).to.contain("{{FormTest.data}}");
expect($lis.eq(2)).to.contain("{{FormTest.hasChanges}}");
});
});
});
},
);

View File

@ -14,56 +14,66 @@ before(() => {
agHelper.AddDsl("formWithInputdsl");
});
describe("Test Suite to validate copy/delete/undo functionalites", function () {
it("1. Drag and drop form widget and validate copy widget via toast message", function () {
const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
EditorNavigation.SelectEntityByName("Form1", EntityType.Widget);
propPane.RenameWidget("Form1", "FormTest");
EditorNavigation.SelectEntityByName("FormTest", EntityType.Widget);
cy.get("body").type(`{${modifierKey}}c`);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.get(commonlocators.toastBody)
.first()
.contains("Copied FormTest")
.click();
cy.get("body").type(`{${modifierKey}}v`, { force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.wait(1000);
EditorNavigation.SelectEntityByName("FormTestCopy", EntityType.Widget, {}, [
"FormTest",
]);
cy.get("body").type("{del}", { force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
agHelper.Sleep();
cy.get("body").type(`{${modifierKey}}z`, { force: true });
EditorNavigation.SelectEntityByName("FormTestCopy", EntityType.Widget, {}, [
"FormTest",
]);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "FormTestCopy",
action: "Show bindings",
describe(
"Test Suite to validate copy/delete/undo functionalites",
{ tags: ["@tag.IDE"] },
function () {
it("1. Drag and drop form widget and validate copy widget via toast message", function () {
const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
EditorNavigation.SelectEntityByName("Form1", EntityType.Widget);
propPane.RenameWidget("Form1", "FormTest");
EditorNavigation.SelectEntityByName("FormTest", EntityType.Widget);
cy.get("body").type(`{${modifierKey}}c`);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.get(commonlocators.toastBody)
.first()
.contains("Copied FormTest")
.click();
cy.get("body").type(`{${modifierKey}}v`, { force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.wait(1000);
EditorNavigation.SelectEntityByName(
"FormTestCopy",
EntityType.Widget,
{},
["FormTest"],
);
cy.get("body").type("{del}", { force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
agHelper.Sleep();
cy.get("body").type(`{${modifierKey}}z`, { force: true });
EditorNavigation.SelectEntityByName(
"FormTestCopy",
EntityType.Widget,
{},
["FormTest"],
);
entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "FormTestCopy",
action: "Show bindings",
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(3);
expect($lis.eq(0)).to.contain("{{FormTestCopy.isVisible}}");
expect($lis.eq(1)).to.contain("{{FormTestCopy.data}}");
expect($lis.eq(2)).to.contain("{{FormTestCopy.hasChanges}}");
cy.contains("FormTestCopy");
cy.get($lis.eq(1))
.contains("{{FormTestCopy.data}}")
.click({ force: true });
cy.get(".bp3-input").first().click({ force: true });
cy.get(".bp3-input").first().type(`{${modifierKey}}v`, { force: true });
});
agHelper.RemoveUIElement("Toast", "7 widgets are added back.");
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(3);
expect($lis.eq(0)).to.contain("{{FormTestCopy.isVisible}}");
expect($lis.eq(1)).to.contain("{{FormTestCopy.data}}");
expect($lis.eq(2)).to.contain("{{FormTestCopy.hasChanges}}");
cy.contains("FormTestCopy");
cy.get($lis.eq(1))
.contains("{{FormTestCopy.data}}")
.click({ force: true });
cy.get(".bp3-input").first().click({ force: true });
cy.get(".bp3-input").first().type(`{${modifierKey}}v`, { force: true });
});
agHelper.RemoveUIElement("Toast", "7 widgets are added back.");
});
});
},
);

View File

@ -8,132 +8,104 @@ import {
PagePaneSegment,
} from "../../../../support/Pages/EditorNavigation";
describe("Entity explorer tests related to widgets and validation", function () {
// Taken from here appsmith/app/client/src/constants/WidgetConstants.tsx
const WIDGET_TAGS: Record<string, string> = {
SUGGESTED_WIDGETS: "Suggested",
INPUTS: "Inputs",
BUTTONS: "Buttons",
SELECT: "Select",
DISPLAY: "Display",
LAYOUT: "Layout",
MEDIA: "Media",
TOGGLES: "Toggles",
SLIDERS: "Sliders",
CONTENT: "Content",
EXTERNAL: "External",
};
describe(
"Entity explorer tests related to widgets and validation",
{ tags: ["@tag.IDE"] },
function () {
// Taken from here appsmith/app/client/src/constants/WidgetConstants.tsx
const WIDGET_TAGS: Record<string, string> = {
SUGGESTED_WIDGETS: "Suggested",
INPUTS: "Inputs",
BUTTONS: "Buttons",
SELECT: "Select",
DISPLAY: "Display",
LAYOUT: "Layout",
MEDIA: "Media",
TOGGLES: "Toggles",
SLIDERS: "Sliders",
CONTENT: "Content",
EXTERNAL: "External",
};
// Taken from here appsmith/app/client/src/constants/WidgetConstants.tsx
const SUGGESTED_WIDGETS_ORDER: Record<string, number> = {
TABLE_WIDGET_V2: 1,
JSON_FORM_WIDGET: 2,
INPUT_WIDGET_V2: 3,
TEXT_WIDGET: 4,
SELECT_WIDGET: 5,
LIST_WIDGET_V2: 6,
};
// Taken from here appsmith/app/client/src/constants/WidgetConstants.tsx
const SUGGESTED_WIDGETS_ORDER: Record<string, number> = {
TABLE_WIDGET_V2: 1,
JSON_FORM_WIDGET: 2,
INPUT_WIDGET_V2: 3,
TEXT_WIDGET: 4,
SELECT_WIDGET: 5,
LIST_WIDGET_V2: 6,
};
// When adding a new widget or tag, we need to manually add it to this list.
const WIDGETS_CATALOG: Record<string, string[]> = {
Suggested: ["Input", "JSON Form", "List", "Select", "Table", "Text"],
Inputs: [
"Currency Input",
"DatePicker",
"FilePicker",
"Input",
"Phone Input",
"Rich Text Editor",
],
Buttons: ["Button", "Button Group", "Icon button", "Menu button"],
Select: ["Multi TreeSelect", "MultiSelect", "Select", "TreeSelect"],
Display: ["Chart", "Iframe", "List", "Map Chart", "Stats Box", "Table"],
Layout: ["Container", "Divider", "Form", "JSON Form", "Modal", "Tabs"],
Media: ["Audio", "Document Viewer", "Image", "Video"],
Toggles: [
"Checkbox",
"Checkbox Group",
"Radio Group",
"Switch",
"Switch Group",
],
Sliders: ["Category Slider", "Number Slider", "Range Slider"],
Content: ["Map", "Progress", "Rating", "Text"],
External: ["Audio Recorder", "Camera", "Code Scanner"],
};
// When adding a new widget or tag, we need to manually add it to this list.
const WIDGETS_CATALOG: Record<string, string[]> = {
Suggested: ["Input", "JSON Form", "List", "Select", "Table", "Text"],
Inputs: [
"Currency Input",
"DatePicker",
"FilePicker",
"Input",
"Phone Input",
"Rich Text Editor",
],
Buttons: ["Button", "Button Group", "Icon button", "Menu button"],
Select: ["Multi TreeSelect", "MultiSelect", "Select", "TreeSelect"],
Display: ["Chart", "Iframe", "List", "Map Chart", "Stats Box", "Table"],
Layout: ["Container", "Divider", "Form", "JSON Form", "Modal", "Tabs"],
Media: ["Audio", "Document Viewer", "Image", "Video"],
Toggles: [
"Checkbox",
"Checkbox Group",
"Radio Group",
"Switch",
"Switch Group",
],
Sliders: ["Category Slider", "Number Slider", "Range Slider"],
Content: ["Map", "Progress", "Rating", "Text"],
External: ["Audio Recorder", "Camera", "Code Scanner"],
};
if (Cypress.env("AIRGAPPED")) {
// Remove map widget in case of airgap
WIDGETS_CATALOG.Content = ["Progress", "Rating", "Text"];
}
if (Cypress.env("AIRGAPPED")) {
// Remove map widget in case of airgap
WIDGETS_CATALOG.Content = ["Progress", "Rating", "Text"];
}
const getTotalNumberOfWidgets = () => {
return Object.values(WIDGETS_CATALOG).reduce(
(totalLength, widgets) => totalLength + widgets.length,
0,
);
};
const getTotalNumberOfWidgets = () => {
return Object.values(WIDGETS_CATALOG).reduce(
(totalLength, widgets) => totalLength + widgets.length,
0,
);
};
it("1. All widget tags should be visible and open by default.", () => {
PageLeftPane.switchSegment(PagePaneSegment.Widgets);
it("1. All widget tags should be visible and open by default.", () => {
PageLeftPane.switchSegment(PagePaneSegment.Widgets);
agHelper.AssertElementLength(
entityExplorer._widgetTagsList,
Object.keys(WIDGET_TAGS).length,
);
agHelper.AssertElementLength(
entityExplorer._widgetTagsList,
Object.keys(WIDGET_TAGS).length,
);
agHelper.GetElement(entityExplorer._widgetTagsList).each(($widgetTag) => {
cy.wrap($widgetTag)
.find(locators._adsV2Content)
.should("have.css", "display", "flex");
agHelper.GetElement(entityExplorer._widgetTagsList).each(($widgetTag) => {
cy.wrap($widgetTag)
.find(locators._adsV2Content)
.should("have.css", "display", "flex");
});
});
});
it("2. All widgets should be present within their tags and these tags should be collapsible", () => {
agHelper.GetElement(entityExplorer._widgetTagsList).each(($widgetTag) => {
// check that tags are collapsible
cy.wrap($widgetTag).find(locators._adsV2CollapsibleHeader).click({
force: true,
});
cy.wrap($widgetTag)
.find(locators._adsV2Content)
.should("have.css", "display", "none");
cy.wrap($widgetTag).find(locators._adsV2CollapsibleHeader).click({
force: true,
});
// check that all widgets are present within their tags
const widgetsInThisTag: string[] = [];
cy.wrap($widgetTag)
.find(entityExplorer._widgetCardTitle)
.each(($widgetName) => {
const value = $widgetName.text();
widgetsInThisTag.push(value);
})
.then(() => {
cy.wrap($widgetTag)
.find(
`${locators._adsV2CollapsibleHeader} span${locators._adsV2Text}`,
)
.then(($widgetTagTitle) => {
const expectedWidgetsInThisTag =
WIDGETS_CATALOG[$widgetTagTitle.text()].sort();
widgetsInThisTag.sort();
expect(widgetsInThisTag).to.deep.eq(expectedWidgetsInThisTag);
});
it("2. All widgets should be present within their tags and these tags should be collapsible", () => {
agHelper.GetElement(entityExplorer._widgetTagsList).each(($widgetTag) => {
// check that tags are collapsible
cy.wrap($widgetTag).find(locators._adsV2CollapsibleHeader).click({
force: true,
});
cy.wrap($widgetTag)
.find(locators._adsV2Content)
.should("have.css", "display", "none");
cy.wrap($widgetTag).find(locators._adsV2CollapsibleHeader).click({
force: true,
});
});
});
it("3. All widgets should be ordered alphabetically within their tags, except Essential widgets, which should be sorted by their static rank.", () => {
agHelper
.GetElement(
`${entityExplorer._widgetTagsList}:not(${entityExplorer._widgetTagSuggestedWidgets})`,
)
.each(($widgetTag) => {
// check that all widgets are present within their tags
const widgetsInThisTag: string[] = [];
cy.wrap($widgetTag)
@ -144,51 +116,83 @@ describe("Entity explorer tests related to widgets and validation", function ()
widgetsInThisTag.push(value);
})
.then(() => {
const sortedWidgetsInThisTag = [...widgetsInThisTag].sort();
cy.wrap($widgetTag)
.find(
`${locators._adsV2CollapsibleHeader} span${locators._adsV2Text}`,
)
.then(($widgetTagTitle) => {
const expectedWidgetsInThisTag =
WIDGETS_CATALOG[$widgetTagTitle.text()].sort();
widgetsInThisTag.sort();
expect(widgetsInThisTag).to.deep.eq(sortedWidgetsInThisTag);
expect(widgetsInThisTag).to.deep.eq(expectedWidgetsInThisTag);
});
});
});
});
const widgetsInEssentialWidgetsTag: string[] = [];
agHelper
.GetElement(
`${entityExplorer._widgetTagsList}${entityExplorer._widgetTagSuggestedWidgets}`,
)
.find(entityExplorer._widgetCardTitle)
.each(($widgetName) => {
const value = $widgetName.text();
it("3. All widgets should be ordered alphabetically within their tags, except Essential widgets, which should be sorted by their static rank.", () => {
agHelper
.GetElement(
`${entityExplorer._widgetTagsList}:not(${entityExplorer._widgetTagSuggestedWidgets})`,
)
.each(($widgetTag) => {
const widgetsInThisTag: string[] = [];
widgetsInEssentialWidgetsTag.push(value);
})
.then(() => {
const sortedWidgetsInEssentialWidgetsTag = [
...widgetsInEssentialWidgetsTag,
].sort(
(a, b) => SUGGESTED_WIDGETS_ORDER[a] - SUGGESTED_WIDGETS_ORDER[b],
);
cy.wrap($widgetTag)
.find(entityExplorer._widgetCardTitle)
.each(($widgetName) => {
const value = $widgetName.text();
expect(widgetsInEssentialWidgetsTag).to.deep.eq(
sortedWidgetsInEssentialWidgetsTag,
);
});
});
widgetsInThisTag.push(value);
})
.then(() => {
const sortedWidgetsInThisTag = [...widgetsInThisTag].sort();
it("4. Widget search should work", () => {
agHelper.TypeText(entityExplorer._widgetSearchInput, "text");
agHelper.AssertElementLength(entityExplorer._widgetCards, 3);
expect(widgetsInThisTag).to.deep.eq(sortedWidgetsInThisTag);
});
});
agHelper.TypeText(entityExplorer._widgetSearchInput, "p");
agHelper.AssertElementLength(entityExplorer._widgetCards, 2);
const widgetsInEssentialWidgetsTag: string[] = [];
agHelper
.GetElement(
`${entityExplorer._widgetTagsList}${entityExplorer._widgetTagSuggestedWidgets}`,
)
.find(entityExplorer._widgetCardTitle)
.each(($widgetName) => {
const value = $widgetName.text();
agHelper.ClearNType(entityExplorer._widgetSearchInput, "cypress");
agHelper.AssertElementLength(entityExplorer._widgetCards, 0);
widgetsInEssentialWidgetsTag.push(value);
})
.then(() => {
const sortedWidgetsInEssentialWidgetsTag = [
...widgetsInEssentialWidgetsTag,
].sort(
(a, b) => SUGGESTED_WIDGETS_ORDER[a] - SUGGESTED_WIDGETS_ORDER[b],
);
agHelper.ClearTextField(entityExplorer._widgetSearchInput);
expect(widgetsInEssentialWidgetsTag).to.deep.eq(
sortedWidgetsInEssentialWidgetsTag,
);
});
});
agHelper.AssertElementLength(
entityExplorer._widgetCards,
getTotalNumberOfWidgets(),
);
});
});
it("4. Widget search should work", () => {
agHelper.TypeText(entityExplorer._widgetSearchInput, "text");
agHelper.AssertElementLength(entityExplorer._widgetCards, 3);
agHelper.TypeText(entityExplorer._widgetSearchInput, "p");
agHelper.AssertElementLength(entityExplorer._widgetCards, 2);
agHelper.ClearNType(entityExplorer._widgetSearchInput, "cypress");
agHelper.AssertElementLength(entityExplorer._widgetCards, 0);
agHelper.ClearTextField(entityExplorer._widgetSearchInput);
agHelper.AssertElementLength(
entityExplorer._widgetCards,
getTotalNumberOfWidgets(),
);
});
},
);

View File

@ -5,38 +5,42 @@ import EditorNavigation, {
const apiwidget = require("../../../../locators/apiWidgetslocator.json");
import * as _ from "../../../../support/Objects/ObjectsCore";
describe("Entity explorer tests related to widgets and validation", function () {
before(() => {
_.agHelper.AddDsl("displayWidgetDsl");
});
describe(
"Entity explorer tests related to widgets and validation",
{ tags: ["@tag.IDE"] },
function () {
before(() => {
_.agHelper.AddDsl("displayWidgetDsl");
});
it("1. Widget edit/delete/copy to clipboard validation", function () {
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [
"Container4",
]);
_.entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Text1",
action: "Show bindings",
it("1. Widget edit/delete/copy to clipboard validation", function () {
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [
"Container4",
]);
_.entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Text1",
action: "Show bindings",
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(2);
expect($lis.eq(0)).to.contain("{{Text1.isVisible}}");
expect($lis.eq(1)).to.contain("{{Text1.text}}");
});
_.entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Text1",
action: "Edit name",
});
cy.EditApiNameFromExplorer("TextUpdated");
_.entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "TextUpdated",
action: "Show bindings",
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(2);
expect($lis.eq(0)).to.contain("{{TextUpdated.isVisible}}");
expect($lis.eq(1)).to.contain("{{TextUpdated.text}}");
});
cy.DeleteWidgetFromSideBar();
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(2);
expect($lis.eq(0)).to.contain("{{Text1.isVisible}}");
expect($lis.eq(1)).to.contain("{{Text1.text}}");
});
_.entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "Text1",
action: "Edit name",
});
cy.EditApiNameFromExplorer("TextUpdated");
_.entityExplorer.ActionContextMenuByEntityName({
entityNameinLeftSidebar: "TextUpdated",
action: "Show bindings",
});
cy.get(apiwidget.propertyList).then(function ($lis) {
expect($lis).to.have.length(2);
expect($lis.eq(0)).to.contain("{{TextUpdated.isVisible}}");
expect($lis.eq(1)).to.contain("{{TextUpdated.text}}");
});
cy.DeleteWidgetFromSideBar();
});
});
},
);