File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 88const SA_DEFAULT_SCRIPT = '<script type="text/javascript" src="https://scripts.simpleanalyticscdn.com/latest.js"></script> ' ;
99const WP_PLUGIN_ROW_SELECTOR = 'tr[data-slug="simpleanalytics"] ' ;
1010const WP_ACTIVATE_PLUGIN_SELECTOR = '#activate-simpleanalytics ' ;
11+ const WP_DEACTIVATE_PLUGIN_SELECTOR = '#deactivate-simpleanalytics ' ;
12+ const WP_PLUGIN_MENU_ITEM = 'a[href="options-general.php?page=simpleanalytics"] ' ;
1113
1214it ('can be activated ' , function () {
1315 asAdmin ()
1416 ->navigate ('http://localhost:8100/wp-admin/plugins.php ' )
1517 ->screenshot ()
1618 ->assertPresent (WP_PLUGIN_ROW_SELECTOR )
17- ->click (WP_ACTIVATE_PLUGIN_SELECTOR );
19+ ->click (WP_ACTIVATE_PLUGIN_SELECTOR )
20+ ->assertPresent (WP_PLUGIN_MENU_ITEM )
21+ ->assertPresent (WP_DEACTIVATE_PLUGIN_SELECTOR );
1822});
1923
2024it ('adds a script by default ' , function () {
You can’t perform that action at this time.
0 commit comments