mediawiki-extensions-Popups/tests/selenium/specs/previews.js
Stephen Niedzielski ece4670710 Hygiene: use arrow for anonymous functions
In some places, the arrow function seems more natural. This patch
approximates the following with manual amendments:

  find \
    -not \( \( -name node_modules -o -name .git -o -name vendor -o -name doc -o -name resources \) -prune \) \
    -iname \*.js|
  xargs -rd\\n sed -ri 's%function\s*(\([^)]*\))%\1 =>%g'

Files to focus on were identified with:

  rg -slg\!/resources/dist/ -g\!/i18n/ -g\!/doc/ 'this|self|arguments|bind|call|apply|new'|
  xargs -rd\\n git difftool -y

Bug: T165036
Change-Id: Ic66b6000b8fc000f9bfde39749f9cfa69924a13c
2018-03-20 09:27:08 -05:00

25 lines
455 B
JavaScript

'use strict';
const assert = require( 'assert' );
const page = require( '../pageobjects/popups.page' );
describe( 'Dwelling on a valid link', () => {
before( () => {
page.setup();
} );
it( 'I should see a preview', () => {
page.open();
page.dwellLink();
assert( page.seePreview() );
} );
it( 'Abandoning link hides preview', () => {
page.open();
page.dwellLink();
page.abandonLink();
assert( page.doNotSeePreview() );
} );
} );