Skip to content

Commit b8597a0

Browse files
committed
List widget UI property pane test cases
1 parent 7e54625 commit b8597a0

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import {
2+
getWidgetSelector,
3+
WIDGET,
4+
} from "../../../../../locators/WidgetLocators";
5+
import { ObjectsRegistry } from "../../../../../support/Objects/Registry";
6+
7+
const agHelper = ObjectsRegistry.AggregateHelper;
8+
const ee = ObjectsRegistry.EntityExplorer;
9+
const propPane = ObjectsRegistry.PropertyPane;
10+
const locator = ObjectsRegistry.CommonLocators;
11+
12+
describe("List widget v1 spec", () => {
13+
before(() => {
14+
/**
15+
* On the canvas we have a List Widget
16+
*/
17+
cy.fixture("listWidgetDsl").then((dsl: string) => {
18+
agHelper.AddDsl(dsl);
19+
});
20+
});
21+
22+
it("1. Validate if the 'items' property is present in the property pane", () => {
23+
ee.SelectEntityByName("List1", "Widgets");
24+
agHelper.AssertElementVisible(locator._listWidgetItemsDatalabel);
25+
});
26+
it("2. Validate if the 'server-side pagination' property is present in the property pane", () => {
27+
// ee.SelectEntityByName("List1", "Widgets");
28+
agHelper.AssertElementVisible(locator._listWidgetPaginationlabel);
29+
});
30+
it("3. Validate if the 'Visible' property is present in the property pane", () => {
31+
agHelper.AssertElementVisible(locator._listWidgetVisiblelabel);
32+
});
33+
it("4. Validate if the 'Animate Loading' property is present in the property pane", () => {
34+
agHelper.AssertElementVisible(locator._listWidgetAnimateLoadinglabel);
35+
});
36+
it("4. Validate if the 'OnListItemClick' property is present in the property pane", () => {
37+
agHelper.AssertElementVisible(locator._listWidgetClickEventlabel);
38+
});
39+
});

app/client/cypress/support/Objects/CommonLocators.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,10 @@ export class CommonLocators {
169169
_editorVariable = ".cm-variable";
170170
_consoleString = ".cm-string";
171171
_commentString = ".cm-comment";
172+
_listWidgetItemsDatalabel = ".t--property-pane-section-data";
173+
_listWidgetVisiblelabel = "//label[contains(text(),'Visible')]";
174+
_listWidgetAnimateLoadinglabel = "//label[contains(text(),'Animate Loading')]";
175+
_listWidgetClickEventlabel = "//label[contains(text(),'onListItemClick')]";
176+
_listWidgetPaginationlabel = "//label[contains(text(),'Server Side Pagination')]";
172177
}
178+

0 commit comments

Comments
 (0)