Page MenuHomePhabricator

[S] Generating Image suggestions Echo notifications for QA testing
Closed, ResolvedPublic

Description

For testing (QA) Echo notifications for Image suggestions (i.e. image suggestions for experienced users and section level image suggestions), it'd be great to be able to generate such notifications.

As an example, it might be done via shell.php as it was successfully done for testing GrowthExperiments Echo notifications:get-started and 'keep-going' (thx, @Tgr!):

$testUserName = '...';
$testUser = User::newFromName( $testUserName );
$homepageTitle = Title::newFromText( 'Special:Homepage' );
EchoEvent::create( [ 'type' => 'get-started', 'title' => $homepageTitle, 'agent' => $testUser ] );
EchoEvent::create( [ 'type' => 'keep-going', 'title' => $homepageTitle, 'extra' => [ 'suggestededitcount' => 13 ], 'agent' => $testUser  ] );
NOTE: From @matthiasmullie : perhaps we can create a separate maint script that borrows code from the existing 2 maint scripts to send the notification; would remove some of the boilerplate required for testing

Update

This was already implemented as part of T330931: [L] Section Image suggestions notification UI, pending patch at https://gerrit.wikimedia.org/r/c/928584.
@Etonkovidova , the task is handled by a maintenance script in the ImageSuggestions extension. Here are instructions to generate a test notification from your current test wiki:

$ php extensions/ImageSuggestions/maintenance/SendTestNotification.php --agent YOUR_USER_NAME --title YOUR_PAGE_TITLE --section-heading YOUR_SECTION_TITLE --media-url YOUR_IMAGE_URL

If you run the script multiple times with the same page title, bundled notifications will display accordingly.

Event Timeline

Etonkovidova renamed this task from Generatiing Image suggestions Echo notifications for QA testing to Generating Image suggestions Echo notifications for QA testing.Mar 22 2023, 11:30 PM
CBogen renamed this task from Generating Image suggestions Echo notifications for QA testing to [S] Generating Image suggestions Echo notifications for QA testing.Apr 5 2023, 7:11 PM
CBogen updated the task description. (Show Details)
CBogen added a subscriber: Matthias.
mfossati changed the task status from Open to In Progress.Jun 9 2023, 2:53 PM
mfossati claimed this task.

Thanks @mfossati and @matthiasmullie!

Checked on ruwiki betalabs

  • the notifications are successfully generated
EnglishRussian
Screen Shot 2023-07-05 at 2.40.04 PM.png (1×1 px, 199 KB)
Screen Shot 2023-07-05 at 2.39.25 PM.png (512×1 px, 88 KB)
  • all links work as expected