jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Standardise on MEDIAWIKI_URL ......................................................................
Hygiene: Standardise on MEDIAWIKI_URL export MEDIAWIKI_URL=http://localhost/w/index.php where http://localhost/w/index.php/San Francisco is the San Francisco article in the desktop skin Adjust the QA tests so that they pass the useformat mobile parameter Change-Id: I131f1d6f5ab48094fcf8818bb61ac956e14e4e62 --- M scripts/cachedpage.sh M scripts/cucumber.sh M scripts/qunit.sh M scripts/validatehtml.sh M tests/acceptance/features/support/modules/url_module.rb 5 files changed, 13 insertions(+), 13 deletions(-) Approvals: JGonera: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/cachedpage.sh b/scripts/cachedpage.sh index 01ddb21..1ae5674 100755 --- a/scripts/cachedpage.sh +++ b/scripts/cachedpage.sh @@ -21,12 +21,12 @@ #Generate the 'cached' pages mkdir -p tmp -URL=${MEDIAWIKI_URL:-"http://127.0.0.1:80"} +URL=${MEDIAWIKI_URL:-"http://127.0.0.1:80/w/index.php"} TITLE=${2:="Main_Page"} echo "Using $URL as a development environment host." echo "To specify a different host set MEDIAWIKI_URL environment variable" -echo '(e.g. by running "export MEDIAWIKI_URL=http://localhost:8080/w")' -wget "$URL/index.php/$TITLE?useformat=mobile" -O tmp/cached.html +echo '(e.g. by running "export MEDIAWIKI_URL=http://127.0.0.1:80/w/index.php")' +wget "$URL/$TITLE?useformat=mobile" -O tmp/cached.html #Return to previous branch git checkout $cur_branch diff --git a/scripts/cucumber.sh b/scripts/cucumber.sh index f10689f..816021a 100755 --- a/scripts/cucumber.sh +++ b/scripts/cucumber.sh @@ -3,9 +3,9 @@ echo Please ensure you have a user account for User:Selenium_user if command -v rvm > /dev/null ; then # FIXME: inconsistent MEDIAWIKI_URL - URL=${MEDIAWIKI_URL:-"http://127.0.0.1:80"} + URL=${MEDIAWIKI_URL:-"http://127.0.0.1:80/w/index.php"} cd tests/acceptance - MEDIAWIKI_URL=${URL}/index.php/ bundle exec cucumber -f pretty + bundle exec cucumber -f pretty else echo "You need to install rvm and Ruby to run Cucumber tests!" echo "See http://rvm.io/" diff --git a/scripts/qunit.sh b/scripts/qunit.sh index 0e199ff..7f519ec 100755 --- a/scripts/qunit.sh +++ b/scripts/qunit.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash echo "Running QUnit tests..." if command -v phantomjs > /dev/null ; then - URL=${MEDIAWIKI_URL:-"http://127.0.0.1:80"} + URL=${MEDIAWIKI_URL:-"http://127.0.0.1:80/w/index.php"} if [ -z "$1" ]; then FILTER="" else @@ -9,8 +9,8 @@ fi echo "Using $URL as a development environment host." echo "To specify a different host set MEDIAWIKI_URL environment variable" - echo '(e.g. by running "export MEDIAWIKI_URL=http://localhost:8080/w")' - phantomjs tests/externals/phantomjs-qunit-runner.js "$URL/index.php/Special:JavaScriptTest/qunit?useformat=mobile$FILTER" + echo '(e.g. by running "export MEDIAWIKI_URL=http://127.0.0.1:80/w/index.php")' + phantomjs tests/externals/phantomjs-qunit-runner.js "$URL/Special:JavaScriptTest/qunit?useformat=mobile$FILTER" else echo "You need to install PhantomJS to run QUnit tests in terminal!" echo "See http://phantomjs.org/" diff --git a/scripts/validatehtml.sh b/scripts/validatehtml.sh index a8d63e6..76a2a14 100755 --- a/scripts/validatehtml.sh +++ b/scripts/validatehtml.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash mkdir -p tmp TITLE=${1:-"W3CValidationTest"} -URL=${MEDIAWIKI_URL:-"http://127.0.0.1:80"} -curl -sG "$URL/index.php/$TITLE?useformat=mobile" > tmp/validate.html +URL=${MEDIAWIKI_URL:-"http://127.0.0.1:80/w/index.php"} +curl -sG "$URL/$TITLE?useformat=mobile" > tmp/validate.html curl -sF "uploaded_file=@tmp/validate.html;type=text/html" -F output=json http://validator.w3.org/check > tmp/validate.json #check the validation results of a page in the main namespace @@ -14,7 +14,7 @@ # if no parameter was set do a special page check as well if [ -z "$1" ]; then - curl -sG "$URL/index.php/Special:MobileOptions?useformat=mobile" > tmp/validate_special.html + curl -sG "$URL/Special:MobileOptions?useformat=mobile" > tmp/validate_special.html curl -sF "uploaded_file=@tmp/validate_special.html;type=text/html" -F output=json http://validator.w3.org/check > tmp/validate_special.json #check the validation results of a page in the special namespace if grep -q '"type": "error"' tmp/validate_special.json diff --git a/tests/acceptance/features/support/modules/url_module.rb b/tests/acceptance/features/support/modules/url_module.rb index 5ac84a3..b370971 100644 --- a/tests/acceptance/features/support/modules/url_module.rb +++ b/tests/acceptance/features/support/modules/url_module.rb @@ -3,8 +3,8 @@ if ENV['MEDIAWIKI_URL'] mediawiki_url = ENV['MEDIAWIKI_URL'] else - mediawiki_url = 'http://127.0.0.1:80/wiki/' + mediawiki_url = 'http://127.0.0.1:80/w/index.php' end - "#{mediawiki_url}#{name}" + "#{mediawiki_url}/#{name}?useformat=mobile" end end -- To view, visit https://gerrit.wikimedia.org/r/87640 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I131f1d6f5ab48094fcf8818bb61ac956e14e4e62 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: JGonera <jgon...@wikimedia.org> Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: Mgrover <mgro...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits