Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1427206
Undo.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
948 B
Referenced Files
None
Subscribers
None
Undo.js
View Options
'use strict'
;
const
{
action
,
assert
,
utils
}
=
require
(
'api-testing'
);
describe
(
'Testing undo functionality'
,
()
=>
{
const
title
=
utils
.
title
(
'Undo_'
);
let
alice
,
revisionID
;
before
(
async
()
=>
{
alice
=
await
action
.
alice
();
}
);
it
(
'should create a page'
,
async
()
=>
{
await
alice
.
edit
(
title
,
{
text
:
'Undo Page\n\nFoo'
,
createonly
:
true
}
);
}
);
it
(
'should edit a page, revision 2'
,
async
()
=>
{
const
edit
=
await
alice
.
edit
(
title
,
{
text
:
'Undo Pages\n\nFoo'
}
);
revisionID
=
edit
.
newrevid
;
}
);
it
(
'should edit a page, revision 3'
,
async
()
=>
{
await
alice
.
edit
(
title
,
{
text
:
'Undo Page\n\nFoo\n\nBar'
}
);
}
);
it
(
'should undo revision 2'
,
async
()
=>
{
await
alice
.
edit
(
title
,
{
undo
:
revisionID
}
);
}
);
it
(
'should confirm undo action'
,
async
()
=>
{
const
html
=
await
alice
.
getHtml
(
title
);
assert
.
match
(
html
,
/<p>Undo Page\n<\/p><p>Foo\n<\/p><p>Bar\n<\/p>/
);
}
);
}
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 16, 14:20 (1 d, 9 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
4c/fd/74bfe303d7786e2304dc2341ab41
Default Alt Text
Undo.js (948 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment