mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-11 05:42:22 +00:00
Merge pull request #1663 from bilawalsidhu/sameh/news-test-shared-time
test(news): briefing stories share one published time
This commit is contained in:
1 file changed
+5
-1
@@ -171,11 +171,15 @@ test('regional news and local conditions render what the region returned', async
|
|||||||
assert.equal(text('#cockpit-local-coordinates'), 'POSITION UNAVAILABLE');
|
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}`) => ({
|
const story = (id, url = `https://example.com/${id}`) => ({
|
||||||
url,
|
url,
|
||||||
title: `Story ${id}`,
|
title: `Story ${id}`,
|
||||||
domain: 'example.com',
|
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) => {
|
test('a refreshed news list keeps a focused story on its own link', async (t) => {
|
||||||
|
|||||||
Reference in new issue
Block a user