File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 3838 ->click ('Save Changes ' )
3939 ->assertValue ('simpleanalytics_custom_domain ' , 'mydomain.com ' );
4040
41- expect (visit ('http://localhost:8100 ' )->content ())
42- ->toContain (str_replace ('scripts.simpleanalyticscdn.com ' , 'mydomain.com ' , SA_DEFAULT_SCRIPT ));
41+ $ script = str_replace ('scripts.simpleanalyticscdn.com ' , 'mydomain.com ' , SA_DEFAULT_SCRIPT );
42+
43+ expect (visit ('http://localhost:8100 ' )->content ())->toContain ($ script );
44+ });
45+
46+ it ('adds a script with ignored pages ' , function () {
47+ asAdmin ()
48+ ->navigate ('http://localhost:8100/wp-admin/options-general.php?page=simpleanalytics&tab=ignore-rules ' )
49+ ->fill ('simpleanalytics_ignore_pages ' , '/vouchers ' )
50+ ->click ('Save Changes ' )
51+ ->assertValue ('simpleanalytics_ignore_pages ' , '/vouchers ' );
52+
53+ expect (visit ('http://localhost:8100 ' )->content ())->toContain ('data-ignore-pages="/vouchers" ' );
4354});
You can’t perform that action at this time.
0 commit comments