Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6058330
mocha.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
813 B
Referenced Files
None
Subscribers
None
mocha.js
View Options
// Example code for Selenium/Explanation/Stack
// https://www.mediawiki.org/wiki/Selenium/Explanation/Stack
// baseUrl is required for our continuous integration.
// If you don't have MW_SERVER and MW_SCRIPT_PATH environment variables set
// you can probably hardcode it to something like this:
// const baseUrl = 'http://localhost:8080/wiki/';
const
baseUrl
=
`
${
process
.
env
.
MW_SERVER
}${
process
.
env
.
MW_SCRIPT_PATH
}
/index.php?title=`
;
describe
(
'Main page'
,
()
=>
{
it
(
'should have edit link when using mocha'
,
async
()
=>
{
await
browser
.
url
(
`
${
baseUrl
}
Main_Page`
);
const
displayed
=
await
$
(
'a[title="Edit section: Getting started"]'
).
isDisplayed
();
if
(
displayed
===
false
)
{
throw
new
Error
(
'Edit link not visible'
);
}
else
{
console
.
log
(
'Edit link visible'
);
}
}
);
}
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 5 2026, 01:45 (5 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c6/77/f435cec8cbe80cce5c55043e3a42
Default Alt Text
mocha.js (813 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment