MinervaNeue/tests/selenium/specs/watchstar.js
jdlrobson 544b0e70c9 Port remaining @login tests to Node.js
Bug: T219920
Change-Id: I9f651d73cae8d6494ffa585ac3cbd791686b926a
2019-04-11 21:17:45 +00:00

32 lines
1007 B
JavaScript

const { iAmViewingAWatchedPage,
iAmViewingAnUnwatchedPage } = require( '../features/step_definitions/create_page_api_steps' ),
{
iShouldSeeAToastNotificationWithMessage,
iAmLoggedIntoTheMobileWebsite
} = require( '../features/step_definitions/common_steps' ),
{
theWatchstarShouldNotBeSelected, theWatchstarShouldBeSelected,
iClickTheWatchstar, iClickTheUnwatchStar } = require( '../features/step_definitions/watch_steps' );
// @chrome @smoke @test2.m.wikipedia.org @login @vagrant
describe( 'Manage Watchlist', () => {
beforeEach( () => {
iAmLoggedIntoTheMobileWebsite();
} );
it( 'Remove an article from the watchlist', () => {
iAmViewingAWatchedPage();
iClickTheUnwatchStar();
iShouldSeeAToastNotificationWithMessage( 'Removed' );
theWatchstarShouldNotBeSelected();
} );
it( 'Add an article to the watchlist', () => {
iAmViewingAnUnwatchedPage();
iClickTheWatchstar();
iShouldSeeAToastNotificationWithMessage( 'Added' );
theWatchstarShouldBeSelected();
} );
} );