NOTE: Make sure you've done {T248016} and {T248232} before this task.
Pick a simple test from mediawiki/core, for example `User should be able to create account` and implement it using Cypress. Feel free to pick any other test, this is just an example.
webdriverio implementation:
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/master/tests/selenium/specs/user.js#21
```lang=js
describe( 'User', function () {
it( 'should be able to create account', function () {
// create
CreateAccountPage.createAccount( username, password );
// check
assert.strictEqual( CreateAccountPage.heading.getText(), `Welcome, ${username}!` );
} );
} );
```
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/master/tests/selenium/pageobjects/createaccount.page.js
```lang=js
class CreateAccountPage extends Page {
get username() { return $( '#wpName2' ); }
get password() { return $( '#wpPassword2' ); }
get confirmPassword() { return $( '#wpRetype' ); }
get create() { return $( '#wpCreateaccount' ); }
get heading() { return $( '#firstHeading' ); }
open() {
super.openTitle( 'Special:CreateAccount' );
}
createAccount( username, password ) {
this.open();
this.username.setValue( username );
this.password.setValue( password );
this.confirmPassword.setValue( password );
this.create.click();
}
}
```
Steps:
- open `Special:CreateAccount` page
- populate required fileds with random strings
- click `Create your account` button
Assertions:
- check that text `Welcome, ${username}!` appears on the page
For more information on page object pattern see (draft) page https://www.mediawiki.org/wiki/Selenium/Explanation/Page_object_pattern
Students:
[] @AlQaholic007
[] @Gbahdeyboh