Skip to content

Commit 3e9ecdd

Browse files
committed
fix(dashboard): make tests also work at night
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent f7c1af0 commit 3e9ecdd

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

apps/dashboard/src/DashboardApp.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,28 +234,28 @@ export default {
234234
const good = {
235235
morning: {
236236
generic: t('dashboard', 'Good morning'),
237-
withName: t('dashboard', 'Good morning, {name}', { name: this.displayName }, undefined, { escape: false }),
237+
withName: t('dashboard', 'Good morning, {name}', { name: this.displayName }, { escape: false }),
238238
},
239239
240240
afternoon: {
241241
generic: t('dashboard', 'Good afternoon'),
242-
withName: t('dashboard', 'Good afternoon, {name}', { name: this.displayName }, undefined, { escape: false }),
242+
withName: t('dashboard', 'Good afternoon, {name}', { name: this.displayName }, { escape: false }),
243243
},
244244
245245
evening: {
246246
generic: t('dashboard', 'Good evening'),
247-
withName: t('dashboard', 'Good evening, {name}', { name: this.displayName }, undefined, { escape: false }),
247+
withName: t('dashboard', 'Good evening, {name}', { name: this.displayName }, { escape: false }),
248248
},
249249
250250
night: {
251251
// Don't use "Good night" as it's not a greeting
252-
generic: t('dashboard', 'Hello'),
253-
withName: t('dashboard', 'Hello, {name}', { name: this.displayName }, undefined, { escape: false }),
252+
generic: t('dashboard', 'Hello') /* TRANSLATORS: Greeting to be used at night (in English there is no specific greeting, think of it like "good morning") */,
253+
withName: t('dashboard', 'Hello, {name}', { name: this.displayName }, { escape: false }) /* TRANSLATORS: Greeting to be used at night (in English there is no specific greeting, think of it like "Good morning, J. Doe" but at night) */,
254254
},
255255
256256
birthday: {
257257
generic: t('dashboard', 'Happy birthday 🥳🤩🎂🎉'),
258-
withName: t('dashboard', 'Happy birthday, {name} 🥳🤩🎂🎉', { name: this.displayName }, undefined, { escape: false }),
258+
withName: t('dashboard', 'Happy birthday, {name} 🥳🤩🎂🎉', { name: this.displayName }, { escape: false }),
259259
},
260260
}
261261

tests/playwright/e2e/dashboard/widget-performance.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ test('dashboard: only loads the data of enabled widgets', async ({ page, user })
2727

2828
const loaded = page.waitForResponse((r) => WIDGET_ITEMS_API.test(r.url()))
2929
await page.goto('apps/dashboard')
30-
await expect(page.getByRole('heading', { name: /Good (morning|afternoon|evening|night)/ })).toBeVisible()
30+
await expect(page.getByRole('heading', { name: /(Good (morning|afternoon|evening)|Hello)/ })).toBeVisible()
3131
await loaded
3232

3333
// Give any further (unwanted) widget request time to be fired …

0 commit comments

Comments
 (0)