Share says why an episode gets no play link (#454)
A private feed's episode, or one ipx-play could not make a link for, was offered its own address with no word of why, so someone expecting a page anyone can play could not tell it was on purpose. The menu now says the feed is private to them, or that the link could not be made just now, beside the warning for an address carrying their access. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -331,3 +331,15 @@ test('a shared link starts where you are, from five seconds in (#447)', () => {
|
||||
assert.equal(run(`shareAt(${JSON.stringify(url)}, 754.6)`), `${url}?t=754`);
|
||||
assert.equal(run(`shareAt(${JSON.stringify(url)}, 3)`), url);
|
||||
});
|
||||
|
||||
test('Share says why an episode gets no page anyone can play, and warns of a key in its address (#454)', () => {
|
||||
const note = (why: string | null, url: string) => run(`noLinkNote(${JSON.stringify(why)}, ${JSON.stringify(url)})`) as string;
|
||||
const paid = 'https://c10.patreonusercdn.com/ep.mp3?token-hash=abc';
|
||||
assert.match(note('private', paid), /private to you.*includes your own access/s);
|
||||
assert.match(note('failed', 'https://example.com/ep.mp3'), /could not be made just now/);
|
||||
assert.doesNotMatch(note('failed', 'https://example.com/ep.mp3'), /own access/);
|
||||
// A server with no ipx-play shares as it always has, with no reason to give.
|
||||
assert.equal(note('not_set_up', 'https://example.com/ep.mp3'), '');
|
||||
// The request failed outright: no reason known, but the key is still warned of.
|
||||
assert.match(note(null, paid), /own access/);
|
||||
});
|
||||
|
||||
@@ -2266,6 +2266,7 @@ test('Share hands the feed, and an episode as a link to its page on ipx-play (#4
|
||||
const e = (await api('/api/feeds/paid-show/entries') as ListPage).entries[0];
|
||||
await shareEpisode({ ...e, link: 'https://www.patreon.com/posts/1?auth=secret123' }, null);
|
||||
});
|
||||
await expect(page.locator('#modalCard')).toContainText('private to you');
|
||||
await expect(page.locator('#modalCard')).toContainText('includes your own access');
|
||||
await expect(page.locator('#shat')).toHaveCount(0);
|
||||
await page.locator('#shlink').click();
|
||||
|
||||
Reference in New Issue
Block a user