mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-12-21 18:12:42 +00:00
d6c6dbd73a
Basic tests to show that the highlighting classes have been attached to the expected elements. TODO in later patches: * tests for the wikitext 2017 editor Bug: T270240 Change-Id: I01ebd9881d38dd877f19ee3bb4fdcbb74d43afaf
24 lines
501 B
JavaScript
24 lines
501 B
JavaScript
'use strict';
|
|
|
|
const Api = require( 'wdio-mediawiki/Api' );
|
|
const Util = require( 'wdio-mediawiki/Util' );
|
|
|
|
const fixture1 = '[]{{template}}';
|
|
|
|
class FixtureContent {
|
|
/**
|
|
* Create a new fixture for testing syntax highlighting.
|
|
*
|
|
* @return {string} Page title
|
|
*/
|
|
createFixturePage() {
|
|
const title = Util.getTestString( 'CodeMirror-fixture1-' );
|
|
|
|
browser.call( () => Api.bot().then( ( bot ) => bot.edit( title, fixture1 ) ) );
|
|
|
|
return title;
|
|
}
|
|
}
|
|
|
|
module.exports = new FixtureContent();
|