Debian Codegraph @

tests/selenium/docs/Stack/specs/expect.js

raw symbols SCIP
1 // Example code for Selenium/Explanation/Stack
2 // https://www.mediawiki.org/wiki/Selenium/Explanation/Stack
3
4 'use strict';
5
6 // baseUrl is required for our continuous integration.
7 // If you don't have MW_SERVER and MW_SCRIPT_PATH environment variables set
8 // you can probably hardcode it to something like this:
9 // const baseUrl = 'http://localhost:8080/wiki/';
10 const baseUrl = `${ process.env.MW_SERVER }${ process.env.MW_SCRIPT_PATH }/index.php?title=`;
11
12 describe( 'Main page', () => {
13 it( 'should have "Log in" link when using expect', async () => {
14 await browser.url( `${ baseUrl }Main_Page` );
15 await expect( $( 'li#pt-login-2 a' ) ).toExist();
16 } );
17 } );