Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4106213
highlighting-wikitext2010.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
highlighting-wikitext2010.js
View Options
'use strict'
;
const
assert
=
require
(
'assert'
),
EditPage
=
require
(
'../pageobjects/edit.page'
),
FixtureContent
=
require
(
'../fixturecontent'
),
UserPreferences
=
require
(
'../userpreferences'
),
Util
=
require
(
'wdio-mediawiki/Util'
);
describe
(
'CodeMirror bracket match highlighting for the wikitext 2010 editor'
,
()
=>
{
let
title
;
before
(
async
()
=>
{
title
=
Util
.
getTestString
(
'CodeMirror-fixture1-'
);
await
UserPreferences
.
loginAsOther
();
await
FixtureContent
.
createFixturePage
(
title
);
await
UserPreferences
.
enableWikitext2010EditorWithCodeMirror
();
}
);
beforeEach
(
async
()
=>
{
await
EditPage
.
openForEditing
(
title
);
await
EditPage
.
wikiEditorToolbar
.
waitForDisplayed
();
await
EditPage
.
clickText
();
}
);
it
(
'highlights matching bracket'
,
async
()
=>
{
await
EditPage
.
cursorToPosition
(
0
);
assert
.
strictEqual
(
await
EditPage
.
getHighlightedMatchingBrackets
(),
'[]'
);
}
);
it
(
'matches according to cursor movement'
,
async
()
=>
{
await
EditPage
.
cursorToPosition
(
3
);
assert
.
strictEqual
(
await
EditPage
.
getHighlightedMatchingBrackets
(),
'{}'
);
}
);
}
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Aug 18, 19:21 (2 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
21/96/0ce4685f28559e3e0115ec56f6a3
Default Alt Text
highlighting-wikitext2010.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment