Skip to content

Commit e015175

Browse files
authored
test(ui5-carousel): test i18n texts via the i18n bundle (#12533)
1 parent f61ddd1 commit e015175

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

packages/main/cypress/specs/Carousel.cy.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@ import Button from "../../src/Button.js";
22
import Carousel from "../../src/Carousel.js";
33
import Card from "../../src/Card.js";
44
import Input from "../../src/Input.js";
5-
import List from "../../src/List.js";
6-
import CardHeader from "../../src/CardHeader.js";
7-
import Icon from "../../src/Icon.js";
8-
import ListItemGroup from "../../src/ListItemGroup.js";
9-
import Avatar from "../../src/Avatar.js";
10-
import ListItemStandard from "../../src/ListItemStandard.js";
5+
6+
import { CAROUSEL_DOT_TEXT } from "../../src/generated/i18n/i18n-defaults.js";
117

128
describe("Carousel general interaction", () => {
139
it("rendering", () => {
@@ -168,8 +164,8 @@ describe("Carousel general interaction", () => {
168164
});
169165

170166
it("Aria attributes are set", () => {
171-
const PAGE_INDICATOR_ARIA_LABEL1 = "Item 1 of 5 displayed";
172-
const PAGE_INDICATOR_ARIA_LABEL2 = "Item 2 of 5 displayed";
167+
const PAGE_INDICATOR_ARIA_LABEL1 = Carousel.i18nBundle.getText(CAROUSEL_DOT_TEXT, 1, 5);
168+
const PAGE_INDICATOR_ARIA_LABEL2 = Carousel.i18nBundle.getText(CAROUSEL_DOT_TEXT, 2, 5);
173169
const CAROUSEL_ITEM3_POS = "3";
174170
const CAROUSEL_ITEM4_POS = "4";
175171
const SETSIZE = "8";

0 commit comments

Comments
 (0)