Skip to content

Commit 30c1a5a

Browse files
committed
chore: make tests stricter
1 parent 2b11237 commit 30c1a5a

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

cmp/compiler/tests/e2e/shared/development.test.ts

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ test.describe.serial("Development Mode", () => {
2323
let fixture: TestFixture;
2424
let devServer: DevServer;
2525

26-
test.beforeAll(async ({}, testInfo) => {
26+
test.beforeAll(async () => {
2727
fixture = await setupFixture({ framework: "next" });
2828
devServer = await fixture.startDev();
2929
});
@@ -85,14 +85,7 @@ test.describe.serial("Development Mode", () => {
8585
console.log("German heading:", germanHeading);
8686
expect(germanHeading).toBeTruthy();
8787

88-
// Log if translation system changed the text
89-
if (germanHeading !== heading) {
90-
console.log("✅ Translation changed the heading");
91-
} else {
92-
console.log(
93-
"⚠️ Heading unchanged (pseudo-translation may not modify all text)",
94-
);
95-
}
88+
expect.soft(germanHeading).not.toEqual(heading);
9689

9790
// Verify translation request was made (optional check)
9891
console.log("Translation requests:", translationRequests);
@@ -127,7 +120,7 @@ test.describe.serial("Development Mode", () => {
127120
let fixture: TestFixture;
128121
let devServer: DevServer;
129122

130-
test.beforeAll(async ({}) => {
123+
test.beforeAll(async () => {
131124
fixture = await setupFixture({ framework: "vite" });
132125
devServer = await fixture.startDev();
133126
});
@@ -171,11 +164,7 @@ test.describe.serial("Development Mode", () => {
171164
await expect(spanishHeading).toBeVisible();
172165
const spanishHeadingText = await spanishHeading.textContent();
173166

174-
if (spanishHeadingText !== initialHeadingText) {
175-
console.log("✅ Translation system changed the text");
176-
} else {
177-
console.log("⚠️ Text unchanged");
178-
}
167+
expect(spanishHeadingText).not.toEqual(initialHeadingText);
179168
});
180169

181170
test("should navigate between pages and persist locale", async ({
@@ -197,7 +186,6 @@ test.describe.serial("Development Mode", () => {
197186
// Verify locale persisted
198187
const currentLocale = await getCurrentLocale(page);
199188
expect(currentLocale).toBe(newLocale);
200-
console.log(`✅ Locale persisted across navigation to ${newLocale}`);
201189
});
202190
});
203191
});

0 commit comments

Comments
 (0)