Tests: expect Harmony instead of Matrix on the homepage and members page
c5d7dc7 replaced the Matrix card with Harmony (free at every level, eom.dev's
own icon) and changed the Bronze benefit text, but three tests still
expected Matrix, element.eom.dev and the old "Gold · Levels 3–5" kicker.
Update them to the intended content. Found while adding CI.
Refs DevOps/software-infrastructure#52
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -128,18 +128,20 @@ class ServiceDisplayTests(TestCase):
|
||||
parser = DirectoryParser()
|
||||
parser.feed(homepage.read_text(encoding="utf-8"))
|
||||
text = " ".join(parser.text)
|
||||
for name in ("Discourse", "Matrix", "Gitea", "Mastodon", "PeerTube", "Owncast"):
|
||||
for name in ("Discourse", "Harmony", "Gitea", "Mastodon", "PeerTube", "Owncast"):
|
||||
self.assertIn(name, text)
|
||||
self.assertIn("Free · Level 0 and above", text)
|
||||
self.assertIn("Gold · Levels 3–5", text)
|
||||
self.assertIn("Public videos", text)
|
||||
self.assertIn("/members/", parser.links)
|
||||
self.assertIn("https://element.eom.dev/", parser.links)
|
||||
self.assertIn("https://harmony.eom.dev/", parser.links)
|
||||
homepage_html = homepage.read_text(encoding="utf-8")
|
||||
self.assertNotIn('id="start-here"', homepage_html)
|
||||
self.assertNotIn("Three ways into the lab", homepage_html)
|
||||
self.assertNotIn("Hosted games", text)
|
||||
for host in ("discourse.eom.dev", "element.eom.dev", "gitea.eom.dev", "mastodon.eom.dev", "peertube.eom.dev", "owncast.eom.dev"):
|
||||
for host in ("discourse.eom.dev", "gitea.eom.dev", "mastodon.eom.dev", "peertube.eom.dev", "owncast.eom.dev"):
|
||||
self.assertIn(f'src="https://{host}/', homepage_html)
|
||||
# Harmony uses eom.dev's own icon (its logo is a trademark).
|
||||
self.assertIn('src="/static/favicon.svg"', homepage_html)
|
||||
self.assertNotIn("Dex · Shared sign-in", text)
|
||||
projects = homepage_html.split('id="projects"', 1)[1].split("</section>", 1)[0]
|
||||
self.assertIn('id="gitea-projects"', projects)
|
||||
|
||||
+2
-2
@@ -168,7 +168,7 @@ test('prior game, service, account and donation destinations remain intact', asy
|
||||
'https://gitea.eom.dev/WikiDeck/wikideck', 'https://button.eom.dev/',
|
||||
'https://gitea.eom.dev/Gaming/the-button', 'https://discourse.eom.dev/t/luanti-season-v/690',
|
||||
'https://gitea.eom.dev/explore/repos', 'https://discourse.eom.dev/',
|
||||
'https://element.eom.dev/', 'https://gitea.eom.dev/', 'https://mastodon.eom.dev/',
|
||||
'https://harmony.eom.dev/', 'https://gitea.eom.dev/', 'https://mastodon.eom.dev/',
|
||||
'https://peertube.eom.dev/', 'https://owncast.eom.dev/', 'https://discourse.eom.dev/latest',
|
||||
'https://peertube.eom.dev/videos/browse', 'https://mastodon.eom.dev/@eric/',
|
||||
'mailto:eric@eom.dev', '/eric@eom.dev.pub', '/members/', '/members/register/',
|
||||
@@ -269,7 +269,7 @@ test('homepage groups creative sections before the library and membership distin
|
||||
assert.ok(positions.every((position, index) => position >= 0 && (!index || position > positions[index - 1])));
|
||||
const template = await readFile(new URL('membership/templates/members.html', repository), 'utf8');
|
||||
assert.match(template, /services included at your membership level/u);
|
||||
assert.match(template, /Bronze adds exclusive Discourse and Matrix content; Silver adds previews when available; Gold adds project-topic polls/u);
|
||||
assert.match(template, /Bronze adds exclusive Discourse and Harmony content; Silver adds previews when available; Gold adds project-topic polls/u);
|
||||
assert.ok(template.indexOf('class="member-grid"') < template.indexOf('Community services by level'));
|
||||
assert.match(template, /No paid-exclusive game servers are currently included/u);
|
||||
assert.match(template, /There is no fixed release schedule/u);
|
||||
|
||||
Reference in New Issue
Block a user