From b43acdd0d0b070d3e843c03efd047523b1515f82 Mon Sep 17 00:00:00 2001 From: sahil Date: Fri, 7 May 2021 11:38:53 +0530 Subject: [PATCH] Selenium: update README.md file Bug: T210726 Change-Id: I99d32dee1d8b8d2949b475abb94d4b3705e1fda6 --- tests/selenium/README.md | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/tests/selenium/README.md b/tests/selenium/README.md index 35530690c..73f30f19e 100644 --- a/tests/selenium/README.md +++ b/tests/selenium/README.md @@ -1,29 +1,21 @@ # Selenium tests -Please see tests/selenium/README.md file in mediawiki/core repository and -https://www.mediawiki.org/wiki/Selenium/Node.js. +For more information see https://www.mediawiki.org/wiki/Selenium -## Usage +## Setup -Set up MediaWiki-Vagrant: +See https://www.mediawiki.org/wiki/MediaWiki-Docker/Extension/Math - cd mediawiki/vagrant - vagrant up - vagrant roles enable math - vagrant provision +## Run all specs -Run both mediawiki/core and Math tests from mediawiki/core folder: + npm run selenium-test - npm run selenium +## Run specific tests -To run only Math tests in one terminal window or tab start Chromedriver: +Filter by file name: - chromedriver --url-base=/wd/hub --port=4444 + npm run selenium-test -- --spec tests/selenium/specs/[FILE-NAME] -In another terminal tab or window go to mediawiki/core folder: +Filter by file name and test name: - ./node_modules/.bin/wdio tests/selenium/wdio.conf.js --spec extensions/Math/tests/selenium/specs/*.js - -Run only one Math test file from mediawiki/core: - - ./node_modules/.bin/wdio tests/selenium/wdio.conf.js --spec extensions/Math/tests/selenium/specs/basic.js + npm run selenium-test -- --spec tests/selenium/specs/[FILE-NAME] --mochaOpts.grep [TEST-NAME]