Merge pull request #1663 from bilawalsidhu/sameh/news-test-shared-time

test(news): briefing stories share one published time
This commit is contained in:
Sameh Khamis authored and GitHub committed 2026-11-10 21:29:18 -08:00
commit aff5ce7f17
1 file changed
+5 -1
+5 -1
View File
@@ -171,11 +171,15 @@ test('regional news and local conditions render what the region returned', async
assert.equal(text('#cockpit-local-coordinates'), 'POSITION UNAVAILABLE');
});
// One time for every story: newest-first order then keeps the order a test
// lists them in. A clock read per story could tick between two of them and
// swap them.
const STORY_PUBLISHED_AT = new Date().toISOString();
const story = (id, url = `https://example.com/${id}`) => ({
url,
title: `Story ${id}`,
domain: 'example.com',
publishedAt: new Date().toISOString(),
publishedAt: STORY_PUBLISHED_AT,
});
test('a refreshed news list keeps a focused story on its own link', async (t) => {