mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-12-12 14:25:06 +00:00
d1863e4d0b
This legacy CM5 test has always been flaky and is now consistently failing. It can be reinstated with T357482, or not at all, seeing as bracket matching is a core extension in CodeMirror 6 and probably doesn't need a dedicated test on top of what's upstream. Change-Id: I77362c1c47be902cc888682aae926154470f1a56
38 lines
1.3 KiB
JavaScript
38 lines
1.3 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' ),
|
|
EditPage = require( '../pageobjects/edit.page' ),
|
|
FixtureContent = require( '../fixturecontent' ),
|
|
LoginPage = require( 'wdio-mediawiki/LoginPage' ),
|
|
UserPreferences = require( '../userpreferences' ),
|
|
Util = require( 'wdio-mediawiki/Util' );
|
|
|
|
// Disable as test is consistently failing on CI.
|
|
describe.skip( 'CodeMirror bracket match highlighting for the wikitext 2017 editor', function () {
|
|
let title;
|
|
|
|
before( async function () {
|
|
title = Util.getTestString( 'CodeMirror-fixture1-' );
|
|
await LoginPage.loginAdmin();
|
|
await FixtureContent.createFixturePage( title );
|
|
await UserPreferences.enableWikitext2017EditorWithCodeMirror();
|
|
} );
|
|
|
|
beforeEach( async function () {
|
|
await EditPage.openForEditing( title );
|
|
await EditPage.visualEditorSave.waitForDisplayed();
|
|
assert( !( await EditPage.wikiEditorToolbar.isDisplayed() ) );
|
|
await EditPage.clickText();
|
|
} );
|
|
|
|
it( 'highlights matching bracket', async function () {
|
|
await EditPage.cursorToPosition( 0 );
|
|
assert.strictEqual( await EditPage.getHighlightedMatchingBrackets(), '[]' );
|
|
} );
|
|
|
|
it( 'matches according to cursor movement', async function () {
|
|
await EditPage.cursorToPosition( 3 );
|
|
assert.strictEqual( await EditPage.getHighlightedMatchingBrackets(), '{}' );
|
|
} );
|
|
} );
|