Disable VisualEditor welcome dialog when running Selenium tests
authorŽeljko Filipin <zeljko.filipin@gmail.com>
Wed, 5 Jul 2017 11:52:47 +0000 (13:52 +0200)
committerŽeljko Filipin <zeljko.filipin@gmail.com>
Fri, 7 Jul 2017 09:54:46 +0000 (11:54 +0200)
Bug: T164721
Change-Id: I7b5f73c6fbaaa221ac1b689344f9015fb903220f

tests/selenium/specs/page.js
tests/selenium/specs/user.js

index 04b3dc5..06d3d60 100644 (file)
@@ -1,13 +1,20 @@
 'use strict';
 const assert = require( 'assert' ),
        EditPage = require( '../pageobjects/edit.page' ),
-       HistoryPage = require( '../pageobjects/history.page' );
+       HistoryPage = require( '../pageobjects/history.page' ),
+       UserLoginPage = require( '../pageobjects/userlogin.page' );
 
 describe( 'Page', function () {
 
        var content,
                name;
 
+       before( function () {
+               // disable VisualEditor welcome dialog
+               UserLoginPage.open();
+               browser.localStorage( 'POST', { key: 've-beta-welcome-dialog', value: '1' } );
+       } );
+
        beforeEach( function () {
                browser.deleteCookie();
                content = Math.random().toString();
index 193095d..3f3872d 100644 (file)
@@ -9,6 +9,12 @@ describe( 'User', function () {
        var password,
                username;
 
+       before( function () {
+               // disable VisualEditor welcome dialog
+               UserLoginPage.open();
+               browser.localStorage( 'POST', { key: 've-beta-welcome-dialog', value: '1' } );
+       } );
+
        beforeEach( function () {
                browser.deleteCookie();
                username = `User-${Math.random().toString()}`;