File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,4 +73,19 @@ public function test_ucp_module()
7373 $ this ->assertContainsLang ('NOTIFY_WEBPUSH_ENABLE ' , $ crawler ->filter ('label[for="subscribe_webpush"] ' )->text ());
7474 $ this ->assertContainsLang ('NOTIFICATION_METHOD_PHPBB_WPN_WEBPUSH ' , $ crawler ->filter ('th.mark ' )->eq (2 )->text ());
7575 }
76+
77+ public function test_dropdown_subscribe_button ()
78+ {
79+ $ this ->login ();
80+
81+ $ this ->add_lang_ext ('phpbb/webpushnotifications ' , 'webpushnotifications_module_ucp ' );
82+
83+ $ crawler = self ::request ('GET ' , 'index.php ' );
84+ $ this ->assertCount (1 , $ crawler ->filter ('.wpn-notification-dropdown-footer ' ));
85+ $ this ->assertContainsLang ('NOTIFY_WEBPUSH_SUBSCRIBE ' , $ crawler ->filter ('.wpn-notification-dropdown-footer #subscribe_webpush ' )->text ());
86+ $ this ->assertContainsLang ('NOTIFY_WEBPUSH_SUBSCRIBED ' , $ crawler ->filter ('.wpn-notification-dropdown-footer #unsubscribe_webpush ' )->text ());
87+
88+ $ crawler = self ::request ('GET ' , 'ucp.php?i=ucp_notifications&mode=notification_options ' );
89+ $ this ->assertCount (0 , $ crawler ->filter ('.wpn-notification-dropdown-footer ' ));
90+ }
7691}
You can’t perform that action at this time.
0 commit comments