Skip to content

Commit 700f198

Browse files
authored
test(ui5-notification-list): stabilze test (#11953)
Fixes: #11716
1 parent 92f5fe7 commit 700f198

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

packages/fiori/cypress/specs/NotificationList.cy.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import NotificationListItem from "../../src/NotificationListItem.js";
66
function Sample() {
77
return <NotificationList id="nl1">
88
<NotificationListGroupItem
9-
titleText="Group 1"
9+
titleText="Group 1"
1010
id="group1"
1111
growing="Button">
1212
<NotificationListItem id="item11" showClose>
@@ -24,7 +24,7 @@ function Sample() {
2424
</NotificationListGroupItem>
2525
<NotificationListGroupItem
2626
id="group2"
27-
titleText="Group 2">
27+
titleText="Group 2">
2828
<NotificationListItem id="item21" showClose>
2929
Group 2 Item 1
3030
</NotificationListItem>
@@ -40,7 +40,7 @@ function Sample() {
4040
</NotificationListGroupItem>
4141
<NotificationListGroupItem
4242
growing="Button"
43-
titleText="Group 3">
43+
titleText="Group 3">
4444
<NotificationListItem showClose>
4545
Group 3 Item 1
4646
</NotificationListItem>
@@ -91,7 +91,7 @@ describe("Notification List Item Tests", () => {
9191
cy.get("#nlgi3")
9292
.shadow()
9393
.find(".ui5-nli-group-root")
94-
.should("have.attr", "tabindex");
94+
.should("have.attr", "tabindex");
9595

9696
cy.get("#nlgi3").realClick();
9797
cy.get("#nlgi3").should("be.focused");
@@ -183,7 +183,7 @@ describe("Notification List Item Tests", () => {
183183
<NotificationListItem
184184
id="nli3a"
185185
importance="Important"
186-
titleText="New payment #2900 and more more more more more more more more more more more more more more more text to make the title truncate"
186+
titleText="New payment #2900 and more more more more more more more more more more more more more more more text to make the title truncate"
187187
style="width: 25rem;" />
188188
</NotificationList>
189189
);
@@ -210,9 +210,9 @@ describe("Notification List Item Tests", () => {
210210
.find('.ui5-nli-content')
211211
.invoke('outerHeight')
212212
.as("heightAfterContent");
213-
213+
214214
cy.get("@heightAfterContent")
215-
.should(function(heightAfterContent) {
215+
.should(function (heightAfterContent) {
216216
expect(heightAfterContent).to.be.greaterThan(this.heightBeforeContent);
217217
});
218218

@@ -223,7 +223,7 @@ describe("Notification List Item Tests", () => {
223223
.as("heightAfterTitle");
224224

225225
cy.get("@heightAfterTitle")
226-
.should(function(heightAfterTitle) {
226+
.should(function (heightAfterTitle) {
227227
expect(heightAfterTitle).to.be.greaterThan(this.heightBeforeTitle);
228228
});
229229

@@ -234,15 +234,15 @@ describe("Notification List Item Tests", () => {
234234
.shadow()
235235
.find('.ui5-nli-content')
236236
.invoke('outerHeight')
237-
.should(function(heightAfterKeysContent) {
237+
.should(function (heightAfterKeysContent) {
238238
expect(this.heightAfterContent).to.be.greaterThan(heightAfterKeysContent);
239239
});
240240

241241
cy.get('#nli3a')
242242
.shadow()
243243
.find('.ui5-nli-title-text')
244244
.invoke('outerHeight')
245-
.then(function(heightAfterKeysTitle) {
245+
.then(function (heightAfterKeysTitle) {
246246
expect(this.heightAfterTitle).to.be.greaterThan(heightAfterKeysTitle);
247247
});
248248
});
@@ -251,7 +251,7 @@ describe("Notification List Item Tests", () => {
251251
cy.mount(
252252
<NotificationListItem
253253
id="nli3"
254-
titleText="New payment #2900 and more more more more more more more more more more more more more more more text to make the title truncate"
254+
titleText="New payment #2900 and more more more more more more more more more more more more more more more text to make the title truncate"
255255
>
256256
And with a very long description and long labels of the action buttons - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent feugiat, turpis vel scelerisque pharetra, tellus odio vehicula dolor, nec elementum lectus turpis at nunc.
257257
</NotificationListItem>
@@ -311,7 +311,7 @@ describe("Notification List Item Tests", () => {
311311
.should("not.exist");
312312
});
313313

314-
it.skip("tests menu", () => {
314+
it("tests menu", () => {
315315
cy.mount(
316316
<NotificationList>
317317
<NotificationListGroupItem>
@@ -331,7 +331,7 @@ describe("Notification List Item Tests", () => {
331331

332332
cy.get("#nli1")
333333
.find("[ui5-menu]")
334-
.should("have.attr", "open");
334+
.ui5MenuOpened();
335335

336336
cy.get("#nli1")
337337
.shadow()
@@ -348,15 +348,15 @@ describe("Notification List Item Tests", () => {
348348
cy.realPress(["F10", "Shift"]);
349349
cy.get("#nli1")
350350
.find("[ui5-menu]")
351-
.should("have.attr", "open");
351+
.ui5MenuOpened();
352352
});
353353

354354
// Accessibility tests follows
355355

356356
it("tests List Item ACC ariaLabelledBy and ariaDescribedBy", () => {
357357
cy.mount(
358358
<NotificationListGroupItem>
359-
<NotificationListItem id="nli1" titleText="New order #2201">
359+
<NotificationListItem id="nli1" titleText="New order #2201">
360360
And with a very long description and long labels of the action buttons - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent feugiat, turpis vel scelerisque pharetra, tellus odio vehicula dolor, nec elementum lectus turpis at nunc.
361361

362362
<span slot="footnotes">Office Notifications</span>
@@ -366,7 +366,7 @@ describe("Notification List Item Tests", () => {
366366
<NotificationListItem
367367
id="nli3"
368368
importance="Important"
369-
titleText="New payment #2900 and more more more more more more more more more more more more more more more text to make the title truncate"
369+
titleText="New payment #2900 and more more more more more more more more more more more more more more more text to make the title truncate"
370370
>
371371
And with a very long description and long labels of the action buttons - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent feugiat, turpis vel scelerisque pharetra, tellus odio vehicula dolor, nec elementum lectus turpis at nunc.
372372

@@ -523,7 +523,7 @@ describe("Notification List Item Tests", () => {
523523
it("tests aria attributes click on ShowMore", () => {
524524
cy.mount(
525525
<NotificationListItem id="nli3a"
526-
titleText="New payment #2900 and more more more more more more more more more more more more more more more text to make the title truncate"
526+
titleText="New payment #2900 and more more more more more more more more more more more more more more more text to make the title truncate"
527527
style={{ width: '25rem' }} />
528528
);
529529

@@ -563,7 +563,7 @@ describe("Notification List Item Tests", () => {
563563
it("tests Group List aria-labelledby", () => {
564564
cy.mount(
565565
<NotificationList>
566-
<NotificationListGroupItem id="nlgi1" titleText="Orders" />
566+
<NotificationListGroupItem id="nlgi1" titleText="Orders" />
567567

568568
<NotificationListGroupItem id="nlgi4" loading />
569569
</NotificationList>

0 commit comments

Comments
 (0)