| my $t = Test::Mojo->new('Kalamar'); |
| $t->app->plugin('Piwik' => { |
| url => 'https://piwik.korap.ids-mannheim.de/', |
| $t->app->plugin('Kalamar::Plugin::Piwik'); |
| ->text_like('section[name=piwik-opt-out] h3', qr!can I opt-out!) |
| ->element_exists('section[name=piwik-opt-out] iframe') |
| ->content_like(qr!var _paq!) |
| ->content_like(qr!window\.addEventListener\('korapRequest!) |
| ->content_like(qr!setDocumentTitle!) |
| ->content_like(qr!setCustomUrl!) |
| ->content_like(qr!trackPageView!) |
| $t->app->plugin('Piwik' => { |
| url => 'https://piwik.korap.ids-mannheim.de/', |
| ->text_like('section[name=piwik-opt-out] h3', qr!can I opt-out!) |
| ->element_exists_not('section[name=piwik-opt-out] iframe') |
| ->content_unlike(qr!var _paq!) |
| ->content_unlike(qr!window\.addEventListener\('korapRequest!) |