mediawiki-extensions-CodeMi.../tests/selenium/specs/highlighting-disabled.js
Adam Wight 27f964e240 Browser tests for CodeMirror (wikitext 2017 editor)
Bug: T270240
Change-Id: If1a2530e428122713277fbe87cd015cb729ab550
Depends-On: I2ba889e1a5dd03549d8d7cb00678a30882ff03fe
2021-01-11 12:47:49 +01:00

24 lines
710 B
JavaScript

'use strict';
const assert = require( 'assert' ),
EditPage = require( '../pageobjects/edit.page' ),
FixtureContent = require( '../fixturecontent' ),
LoginPage = require( 'wdio-mediawiki/LoginPage' ),
UserPreferences = require( '../userpreferences' );
describe( 'CodeMirror bracket match default', function () {
before( function () {
LoginPage.loginAdmin();
UserPreferences.enableWikitext2010EditorWithCodeMirror();
this.title = FixtureContent.createFixturePage();
} );
it( 'disables highlighting', function () {
EditPage.openForEditing( this.title );
EditPage.clickText();
EditPage.cursorToPosition( 0 );
assert.strictEqual( EditPage.getHighlightedMatchingBrackets(), '' );
} );
} );