Page MenuHomePhabricator

Seed catalyst DB with Central Notice banner before selenium run
Closed, ResolvedPublic

Description

Central Notice selenium tests don't run on each push like most other extensions, it runs only daily against betacluster.

Because betacluster has persistant data, it retains the central notice banner . Since catalyst is a fresh env each time, it requires a seed to run the tests.

  • Seed script lives in the CentralNotice extension repo (maintenance/SeedTestData.php), not in the catalyst/ci-charts repo
  • Running it seeds the banner and enabled campaign the selenium test needs renders #centralnotice_testbanner on the Main Page for anonymous users
  • Script skips a banner that already exists
  • The catalyst mediawiki chart runs each installed extension's maintenance/SeedTestData.php during provisioning, gated on a seedTestData flag which is off by default
  • Seed only runs in opted-in catalyst test envs and never on per-push CI, betacluster selenium, or other catalyst/dev envs
  • Verified on a fresh env: after seeding, the CentralNotice selenium test passes (banner is displayed on Main Page)

Event Timeline

Change #1312579 had a related patch set uploaded (by Vaughn Walters; author: Vaughn Walters):

[mediawiki/extensions/CentralNotice@master] Add SeedTestData maintenance script for selenium seeding

https://gerrit.wikimedia.org/r/1312579

Change #1312579 merged by jenkins-bot:

[mediawiki/extensions/CentralNotice@master] Add seedTestData.php maintenance script for selenium seeding

https://gerrit.wikimedia.org/r/1312579