Skip to content

Commit 29ef711

Browse files
committed
wip
1 parent 48aa631 commit 29ef711

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tests/Browser/PluginSettingsTest.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@
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
});

0 commit comments

Comments
 (0)