Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4148187
index.test.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
index.test.js
View Options
QUnit
.
module
(
'Minerva pageIssues'
,
()
=>
{
const
mobile
=
require
(
'mobile.startup'
);
const
pageIssues
=
require
(
'skins.minerva.scripts/page-issues/index.js'
);
const
insertBannersOrNotice
=
pageIssues
.
test
.
insertBannersOrNotice
;
const
PageHTMLParser
=
mobile
.
PageHTMLParser
;
const
overlayManager
=
mobile
.
getOverlayManager
();
const
$mockContainer
=
$
(
'<div id="bodyContent">'
+
'<table class="ambox ambox-content">'
+
'<tbody class="mbox-text">'
+
'<tr><td><span class="mbox-text-span"> ambox text span </span></td></tr>'
+
'</tbody>'
+
'</table>'
+
'</div>'
);
const
labelText
=
'label text'
;
const
inline
=
true
;
const
SECTION
=
'0'
;
const
processedAmbox
=
insertBannersOrNotice
(
new
PageHTMLParser
(
$mockContainer
),
labelText
,
SECTION
,
inline
,
overlayManager
).
ambox
;
QUnit
.
test
(
'insertBannersOrNotice() should add a "learn more" message'
,
(
assert
)
=>
{
assert
.
true
(
/(skin-minerva-issue-learn-more)/
.
test
(
processedAmbox
.
html
()
)
);
}
);
QUnit
.
test
(
'insertBannersOrNotice() should add an icon'
,
(
assert
)
=>
{
assert
.
true
(
/(minerva-icon)/
.
test
(
processedAmbox
.
html
()
)
);
}
);
QUnit
.
test
(
'clicking on the product of insertBannersOrNotice() should trigger a URL change'
,
(
assert
)
=>
{
processedAmbox
.
click
();
assert
.
strictEqual
(
window
.
location
.
hash
,
'#/issues/'
+
SECTION
);
}
);
}
);
File Metadata
Details
Attached
Mime Type
text/html
Expires
Aug 19 2026, 18:41 (6 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f9/4f/0c36b09ba315372a2d9dc5dc6b9a
Default Alt Text
index.test.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment