Skip to content

Commit f6796a9

Browse files
Merge branch 'release' into fix/helm-keycloak-driver-external-pg
2 parents 7532daf + 3ff3060 commit f6796a9

42 files changed

Lines changed: 5271 additions & 48 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,10 @@ mongodb*
4848
!deploy/helm/**/mongodb*
4949

5050
# ignore the task file as it will be different for different project implementations.
51-
TASKS.md
51+
TASKS.md
52+
53+
# Local artifacts from driving a browser against a dev instance (Playwright MCP
54+
# writes snapshots/console logs here, and screenshots land in the repo root).
55+
.playwright-mcp/
56+
card-widget-height-verified.png
57+
card-bind-flow-dp.png

app/client/cypress/e2e/Regression/Apps/CommunityIssues_Spec.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ describe(
3131
});
3232

3333
let selectedRow: number;
34+
35+
// Tests 8-10 create, update and delete a row in the AForce Postgres
36+
// datasource, which is shared by every run of this spec. A fixed title
37+
// makes those rows collide: a run that fails after test 8 leaves a row
38+
// behind, and the next attempt's search matches both the leftover and the
39+
// new row, so test 9 updates whichever sorts first. Giving each run its own
40+
// title keeps the search filter down to the single row this run created.
41+
const issueTitle = `Adding Title Suggestion via script ${Date.now()}`;
42+
const updatedIssueTitle = `${issueTitle}-updating title`;
43+
3444
it("1. Import application json and validate headers", () => {
3545
homePage.NavigateToHome();
3646
homePage.ImportApp("CommunityIssuesExport.json");
@@ -314,9 +324,7 @@ describe(
314324
agHelper.AssertElementVisibility(locators._modal);
315325
agHelper.SelectFromDropDown("Suggestion", "t--modal-widget");
316326

317-
cy.get(locators._inputWidgetv1InDeployed)
318-
.eq(3)
319-
.type("Adding Title Suggestion via script");
327+
cy.get(locators._inputWidgetv1InDeployed).eq(3).type(issueTitle);
320328
cy.get(locators._textAreainputWidgetv1InDeployed)
321329
.eq(1)
322330
.type("Adding Description Suggestion via script");
@@ -339,15 +347,15 @@ describe(
339347

340348
agHelper.ClickButton("Confirm");
341349
agHelper.AssertElementAbsence(locators._toastMsg); //Making sure internal api doesnt throw error
342-
table.SearchTable("Suggestion");
350+
table.SearchTable(issueTitle);
343351
table.WaitUntilTableLoad(0, 0, "v2");
344352

345353
table.ReadTableRowColumnData(0, 0, "v2", 4000).then((cellData) => {
346354
expect(cellData).to.be.equal("Suggestion");
347355
});
348356

349357
table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => {
350-
expect(cellData).to.be.equal("Adding Title Suggestion via script");
358+
expect(cellData).to.be.equal(issueTitle);
351359
});
352360
});
353361

@@ -407,9 +415,7 @@ describe(
407415
});
408416

409417
table.ReadTableRowColumnData(0, 1, "v2").then((cellData) => {
410-
expect(cellData).to.be.equal(
411-
"Adding Title Suggestion via script-updating title",
412-
);
418+
expect(cellData).to.be.equal(updatedIssueTitle);
413419
});
414420
});
415421

app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Sidebar.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ describe(
4545
Buttons: ["Button", "Button Group", "Icon button", "Menu button"],
4646
Select: ["Multi TreeSelect", "MultiSelect", "Select", "TreeSelect"],
4747
Display: [
48+
"Card",
4849
"Chart",
4950
"Custom",
5051
"Iframe",
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
import {
2+
agHelper,
3+
deployMode,
4+
draggableWidgets,
5+
entityExplorer,
6+
locators,
7+
propPane,
8+
} from "../../../../../support/Objects/ObjectsCore";
9+
import EditorNavigation, {
10+
EntityType,
11+
} from "../../../../../support/Pages/EditorNavigation";
12+
13+
const cardHeader = '[data-card-zone="header"]';
14+
const cardFooter = '[data-card-zone="footer"]';
15+
const cardBody = '[data-card-zone="body"]';
16+
const expandToggle = "[data-testid='t--card-expand-toggle']";
17+
const deployedCardArticle = `${locators._widgetInDeployed(
18+
"card1",
19+
)} [data-card-zone="card"]`;
20+
21+
// Expected assertion values, named to avoid inline strings in assertions.
22+
const DEFAULT_TITLE = "Card title";
23+
const DEFAULT_SUBTITLE = "Card subtitle";
24+
const UPDATED_TITLE = "Customer profile";
25+
const UPDATED_SUBTITLE = "Acme Inc";
26+
const UPDATED_BADGE = "Active";
27+
const CLICK_TOAST = "Card clicked";
28+
const ARIA_PRESSED_UNSELECTED = "false";
29+
const ARIA_PRESSED_SELECTED = "true";
30+
const ARIA_EXPANDED_OPEN = "true";
31+
const ARIA_EXPANDED_COLLAPSED = "false";
32+
33+
describe("Card widget spec", { tags: ["@tag.Widget", "@tag.Binding"] }, () => {
34+
before(() => {
35+
/**
36+
* On the canvas we have a Card widget
37+
*/
38+
entityExplorer.DragDropWidgetNVerify(draggableWidgets.CARD, 329, 124);
39+
});
40+
41+
it("1. Validate the card zones render with default content", () => {
42+
agHelper.AssertElementExist(cardHeader);
43+
agHelper.AssertElementExist(cardBody);
44+
agHelper.AssertElementExist(cardFooter);
45+
agHelper.GetNAssertElementText(cardHeader, DEFAULT_TITLE, "contain.text");
46+
agHelper.GetNAssertElementText(
47+
cardHeader,
48+
DEFAULT_SUBTITLE,
49+
"contain.text",
50+
);
51+
});
52+
53+
it("2. Update title, subtitle and badge from the property pane", () => {
54+
EditorNavigation.SelectEntityByName("Card1", EntityType.Widget);
55+
propPane.UpdatePropertyFieldValue("Title", UPDATED_TITLE);
56+
propPane.UpdatePropertyFieldValue("Subtitle", UPDATED_SUBTITLE);
57+
propPane.UpdatePropertyFieldValue("Badge text", UPDATED_BADGE);
58+
agHelper.GetNAssertElementText(cardHeader, UPDATED_TITLE, "contain.text");
59+
agHelper.GetNAssertElementText(
60+
cardHeader,
61+
UPDATED_SUBTITLE,
62+
"contain.text",
63+
);
64+
agHelper.GetNAssertElementText(cardHeader, UPDATED_BADGE, "contain.text");
65+
});
66+
67+
it("3. Toggle header and footer visibility", () => {
68+
EditorNavigation.SelectEntityByName("Card1", EntityType.Widget);
69+
propPane.TogglePropertyState("Show header", "Off");
70+
agHelper.AssertElementAbsence(cardHeader);
71+
propPane.TogglePropertyState("Show footer", "Off");
72+
agHelper.AssertElementAbsence(cardFooter);
73+
propPane.TogglePropertyState("Show header", "On");
74+
agHelper.AssertElementExist(cardHeader);
75+
propPane.TogglePropertyState("Show footer", "On");
76+
agHelper.AssertElementExist(cardFooter);
77+
});
78+
79+
it("4. Fire onCardClick when clickable and the card chrome is clicked", () => {
80+
EditorNavigation.SelectEntityByName("Card1", EntityType.Widget);
81+
propPane.TogglePropertyState("Clickable", "On");
82+
propPane.EnterJSContext(
83+
"onCardClick",
84+
"{{showAlert('Card clicked','success')}}",
85+
true,
86+
true,
87+
);
88+
deployMode.DeployApp(locators._widgetInDeployed("card1"));
89+
// Clicking the header (card chrome) fires the event; the body
90+
// canvas and footer are excluded by design.
91+
agHelper.GetNClick(cardHeader);
92+
agHelper.ValidateToastMessage(CLICK_TOAST);
93+
deployMode.NavigateBacktoEditor();
94+
});
95+
96+
it("5. Toggle selection on click when selection is enabled", () => {
97+
EditorNavigation.SelectEntityByName("Card1", EntityType.Widget);
98+
propPane.TogglePropertyState("Enable selection", "On");
99+
deployMode.DeployApp(locators._widgetInDeployed("card1"));
100+
agHelper.AssertAttribute(
101+
deployedCardArticle,
102+
"aria-pressed",
103+
ARIA_PRESSED_UNSELECTED,
104+
);
105+
agHelper.GetNClick(cardHeader);
106+
agHelper.AssertAttribute(
107+
deployedCardArticle,
108+
"aria-pressed",
109+
ARIA_PRESSED_SELECTED,
110+
);
111+
deployMode.NavigateBacktoEditor();
112+
});
113+
114+
it("6. Collapse the card body with the header chevron", () => {
115+
EditorNavigation.SelectEntityByName("Card1", EntityType.Widget);
116+
propPane.TogglePropertyState("Enable selection", "Off");
117+
propPane.TogglePropertyState("Enable expand and collapse", "On");
118+
agHelper.AssertElementExist(expandToggle);
119+
deployMode.DeployApp(locators._widgetInDeployed("card1"));
120+
agHelper.AssertAttribute(expandToggle, "aria-expanded", ARIA_EXPANDED_OPEN);
121+
agHelper.AssertElementExist(cardBody);
122+
agHelper.GetNClick(expandToggle);
123+
agHelper.AssertAttribute(
124+
expandToggle,
125+
"aria-expanded",
126+
ARIA_EXPANDED_COLLAPSED,
127+
);
128+
agHelper.AssertElementAbsence(cardBody);
129+
deployMode.NavigateBacktoEditor();
130+
});
131+
});
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import {
2+
agHelper,
3+
deployMode,
4+
locators,
5+
} from "../../../../../support/Objects/ObjectsCore";
6+
7+
const cardHeader = '[data-card-zone="header"]';
8+
9+
// Row titles bound to {{currentItem.name}} in simpleListWithCard, one per
10+
// repeated row. Named to avoid inline assertion strings.
11+
const ROW_TITLES = ["Blue", "Green", "Red"];
12+
13+
describe(
14+
"Card widget inside List v2",
15+
{ tags: ["@tag.Widget", "@tag.List", "@tag.Binding"] },
16+
() => {
17+
before(() => {
18+
// List v2 with a Card in the row template; the card title is
19+
// bound to {{currentItem.name}} (rows: Blue, Green, Red).
20+
agHelper.AddDsl("Listv2/simpleListWithCard");
21+
});
22+
23+
it("1. Renders one card per row with row-scoped currentItem bindings", () => {
24+
deployMode.DeployApp(locators._widgetInDeployed("list1"));
25+
ROW_TITLES.forEach((title, index) => {
26+
agHelper.GetNAssertElementText(
27+
cardHeader,
28+
title,
29+
"contain.text",
30+
index,
31+
);
32+
});
33+
deployMode.NavigateBacktoEditor();
34+
});
35+
},
36+
);

0 commit comments

Comments
 (0)