fix(wildlife): point the Acartia card link only at acartia.io

The card's "Acartia" link was built from the contributor-supplied
photo_url, so any https site could appear labelled as Acartia. Acartia
has no documented per-sighting page, so the source link is now always
the Acartia site, on the server projection and again in the card.
The separate "Open on Acartia" fallback link is no longer needed.
This commit is contained in:
Sameh Khamis committed 2026-11-05 16:05:02 -08:00
1 parent 82138478d0
commit 3cb30c3f97
16 files changed
+45 -29

No files matched your search

+30
View File
@@ -373,6 +373,36 @@ test('missing, restricted, obscured and Acartia photos all use the same compact
});
});
test('an Acartia card labels only the Acartia site as Acartia', async (context) => {
for (const link of [
'https://provider.example/photos/synthetic.jpg',
'https://acartia.io.attacker.example/',
'https://acartia.io/',
])
await context.test(link, async (context) => {
const f = fixture(context, {
...row,
origin: 'acartia',
stableId: 'acartia:456',
provider: { name: 'Synthetic network' },
link,
});
await f.click();
const card = f.cardElement();
const hrefs = [...card.querySelectorAll('a')].map((a) =>
a.getAttribute('href'),
);
assert.deepEqual(hrefs, [
'https://acartia.io/',
'https://www.bewhalewise.org',
]);
assert.equal(
card.querySelector('.wildlife-sighting-card-source').textContent,
'Acartia ↗',
);
});
});
test('safe placements near each viewport edge exclude actual HUD, toolbar and rail rects', () => {
const obstacles = [
rect(0, 0, 260, 160),