Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps.html
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,8 @@ <h3>Chaos - Stranger Missions</h3>
const terms = text.split(/\s+/).filter(Boolean);
let shown = 0;
cards.forEach(card => {
const app = slug(card), content = clean(card.textContent || '');
// Include the stable catalog slug so former/internal app names stay findable.
const app = slug(card), content = clean((card.textContent || '') + ' ' + app + ' ' + app.replace(/-/g, ' '));
const inGoal = goal === 'all' || (groups[goal] || []).includes(app);
const visible = inGoal && terms.every(term => content.includes(term));
card.hidden = !visible;
Expand Down
3 changes: 3 additions & 0 deletions scripts/check_growth_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ def check(path, key, valid):
check("/apps", "no_stale_live_store_claim", "92 free apps on Google Play" not in catalog)
check("/apps", "store_click_tracking", "catalog_store_click" in catalog and "download_click" in catalog)
check("/apps", "detail_click_tracking", "catalog_app_detail_click" in catalog)
check("/apps", "search_includes_app_slug",
"const app = slug(card), content = clean((card.textContent || '') + ' ' + app" in catalog
and "app.replace(/-/g, ' ')" in catalog)
check("/apps", "empty_search_reset",
'id="finder-reset"' in catalog and
"reset.addEventListener('click'" in catalog and
Expand Down
12 changes: 12 additions & 0 deletions scripts/test_growth_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def valid_pages():
pages["/apps"] = (
'<script type="application/ld+json">' + json.dumps(listing) + '</script>' +
cards + " catalog_store_click download_click catalog_app_detail_click " +
"const app = slug(card), content = clean((card.textContent || '') + ' ' + app; app.replace(/-/g, ' ')" +
'id="finder-reset" reset.addEventListener(\'click\' input.value = \'\' goal = \'all\' render(); catalog_search_reset ' +
" ".join(f'<a href="/support/{slug}/" data-detail-app="{slug}">' for slug in SLUGS)
)
Expand Down Expand Up @@ -186,6 +187,17 @@ def test_store_schema_package_mismatch_fails(self):
"id=jp.appdevelopsk.testapp1", "id=jp.appdevelopsk.unlisted", 1)
self.assertFalse(inspect(data)["passed"])

def test_missing_slug_search_fails(self):
data = valid_pages()
data["/apps"] = data["/apps"].replace(
"const app = slug(card), content = clean((card.textContent || '') + ' ' + app", "content = clean(card.textContent)")
self.assertFalse(inspect(data)["passed"])

def test_missing_hyphen_alias_fails(self):
data = valid_pages()
data["/apps"] = data["/apps"].replace("app.replace(/-/g, ' ')", "")
self.assertFalse(inspect(data)["passed"])

def test_missing_empty_search_reset_fails(self):
data = valid_pages()
data["/apps"] = data["/apps"].replace('id="finder-reset"', 'id="missing-reset"')
Expand Down
Loading