Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4138021
content_editable.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
content_editable.js
View Options
'use strict'
;
const
assert
=
require
(
'assert'
);
const
EditPage
=
require
(
'../pageobjects/edit.page'
);
const
LoginPage
=
require
(
'wdio-mediawiki/LoginPage'
);
const
Util
=
require
(
'wdio-mediawiki/Util'
);
describe
(
'Content Editable'
,
()
=>
{
let
name
,
content
;
beforeEach
(
async
()
=>
{
content
=
Util
.
getTestString
();
name
=
Util
.
getTestString
();
await
LoginPage
.
loginAdmin
();
await
EditPage
.
openForEditing
(
name
);
await
EditPage
.
toolbar
.
waitForDisplayed
(
{
timeout
:
20000
}
);
}
);
afterEach
(
async
()
=>
{
// T269566: Popup with text
// 'Leave site? Changes that you made may not be saved. Cancel/Leave'
// appears after the browser tries to leave the page with the preview.
await
browser
.
reloadSession
();
}
);
it
(
'should load when an url is opened @daily'
,
async
()
=>
{
assert
(
await
EditPage
.
toolbar
.
isDisplayed
()
);
}
);
it
(
'should be editable'
,
async
()
=>
{
await
EditPage
.
veRootNode
.
setValue
(
content
);
assert
.
equal
(
await
EditPage
.
veRootNode
.
getText
(),
content
);
}
);
it
(
'should save an edit'
,
async
()
=>
{
await
EditPage
.
veRootNode
.
setValue
(
content
);
await
EditPage
.
savePageDots
.
click
();
await
EditPage
.
savePage
.
waitForClickable
();
await
EditPage
.
savePage
.
click
();
await
EditPage
.
saveComplete
();
assert
.
strictEqual
(
await
EditPage
.
notification
.
getText
(),
'The page has been created.'
);
}
);
it
(
'should insert a table'
,
async
()
=>
{
await
EditPage
.
insertTable
();
assert
(
await
EditPage
.
insertedTable
.
isDisplayed
()
);
}
);
}
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 19, 14:27 (3 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
7c/d6/163c9093318e27ff04cdbac71e71
Default Alt Text
content_editable.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment