[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Port go_browser.feature to nodejs
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/393076 ) Change subject: Port go_browser.feature to nodejs .. Port go_browser.feature to nodejs - introduced TitlePage and moved the title param to it. I found it misleading to have a title param for pages like /w/index.php - added wiki support on World.visit - added search_steps to reflect what we had with ruby but "browser_steps" would probably be more approriate Change-Id: I6bba0baac4a8f565508eb2b153c0c27a2af8f23c --- M tests/integration/config/wdio.conf.js A tests/integration/features/go_browser.feature M tests/integration/features/step_definitions/page_steps.js A tests/integration/features/step_definitions/search_steps.js M tests/integration/features/support/pages/article_page.js M tests/integration/features/support/pages/page.js A tests/integration/features/support/pages/search_results_page.js M tests/integration/features/support/pages/special_version.js A tests/integration/features/support/pages/title_page.js M tests/integration/features/support/world.js 10 files changed, 119 insertions(+), 40 deletions(-) Approvals: Cindy-the-browser-test-bot: Looks good to me, but someone else must approve EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/integration/config/wdio.conf.js b/tests/integration/config/wdio.conf.js index c30dcb2..1af44b6 100644 --- a/tests/integration/config/wdio.conf.js +++ b/tests/integration/config/wdio.conf.js @@ -39,17 +39,20 @@ cirrustest: { username: 'Admin', password: 'vagrant', - apiUrl: 'http://cirrustest.wiki.local.wmftest.net:8080/w/api.php' + apiUrl: 'http://cirrustest.wiki.local.wmftest.net:8080/w/api.php', + baseUrl: 'http://cirrustest.wiki.local.wmftest.net:8080' }, commons: { username: 'Admin', password: 'vagrant', - apiUrl: 'http://commons.wiki.local.wmftest.net:8080/w/api.php' + apiUrl: 'http://commons.wiki.local.wmftest.net:8080/w/api.php', + baseUrl: 'http://cirrustest.wiki.local.wmftest.net:8080' }, ru: { username: 'Admin', password: 'vagrant', - apiUrl: 'http://ru.wiki.local.wmftest.net:8080/w/api.php' + apiUrl: 'http://ru.wiki.local.wmftest.net:8080/w/api.php', + baseUrl: 'http://ru.wiki.local.wmftest.net:8080' }, beta: {}, test2: {}, @@ -84,7 +87,8 @@ relPath('./integration/features/support/world.js'), relPath('./integration/features/support/hooks.js'), relPath('./integration/features/step_definitions/page_step_helpers.js'), - relPath('./integration/features/step_definitions/page_steps.js') + relPath('./integration/features/step_definitions/page_steps.js'), + relPath('./integration/features/step_definitions/search_steps.js') ] }, // Patterns to exclude. @@ -145,18 +149,6 @@ // // Saves a screenshot to a given path if a command fails. screenshotPath: './log/', - // - // Set a base URL in order to shorten url command calls. If your url parameter starts - // with "/", then the base url gets prepended. - baseUrl: ( - process.env.MW_SERVER === undefined ? - 'http://dev.wiki.local.wmftest.net:8080' : - process.env.MW_SERVER - ) + ( - process.env.MW_SCRIPT_PATH === undefined ? - '/w' : - process.env.MW_SCRIPT_PATH - ), // // Default timeout for all waitFor* commands. waitforTimeout: 2, diff --git a/tests/integration/features/go_browser.feature b/tests/integration/features/go_browser.feature new file mode 100644 index 000..b92d70f --- /dev/null +++ b/tests/integration/features/go_browser.feature @@ -0,0 +1,20 @@ +@clean @go @phantomjs +Feature: Go Search + @from_core + Scenario: I can "go" to a user's page whether it is there or not +When I go search for User:DoesntExist +Then I am on a page titled User:DoesntExist + + @options + Scenario Outline: When I near match more than one page but one is exact (case, modulo case, or converted to title case) I go to that page +When I go search for Nearmatchflattentest +Then I am on a page titled Nearmatchflattentest + Examples: +| term | title | +| bach | Johann Sebastian Bach | +| Søn Redirectnoncompete | Blah
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Port go_browser.feature to nodejs
DCausse has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393076 ) Change subject: Port go_browser.feature to nodejs .. Port go_browser.feature to nodejs - introduced TitlePage and moved the title param to it. I found it misleading to have a title param for pages like /w/index.php - added wiki support on World.visit - added search_steps to reflect what we had with ruby but "browser_steps" would probably be more approriate Change-Id: I6bba0baac4a8f565508eb2b153c0c27a2af8f23c --- M tests/integration/config/wdio.conf.js A tests/integration/features/go_browser.feature M tests/integration/features/step_definitions/page_steps.js A tests/integration/features/step_definitions/search_steps.js M tests/integration/features/support/pages/article_page.js M tests/integration/features/support/pages/page.js A tests/integration/features/support/pages/search_results_page.js M tests/integration/features/support/pages/special_version.js A tests/integration/features/support/pages/title_page.js M tests/integration/features/support/world.js 10 files changed, 119 insertions(+), 40 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/76/393076/1 diff --git a/tests/integration/config/wdio.conf.js b/tests/integration/config/wdio.conf.js index c30dcb2..1af44b6 100644 --- a/tests/integration/config/wdio.conf.js +++ b/tests/integration/config/wdio.conf.js @@ -39,17 +39,20 @@ cirrustest: { username: 'Admin', password: 'vagrant', - apiUrl: 'http://cirrustest.wiki.local.wmftest.net:8080/w/api.php' + apiUrl: 'http://cirrustest.wiki.local.wmftest.net:8080/w/api.php', + baseUrl: 'http://cirrustest.wiki.local.wmftest.net:8080' }, commons: { username: 'Admin', password: 'vagrant', - apiUrl: 'http://commons.wiki.local.wmftest.net:8080/w/api.php' + apiUrl: 'http://commons.wiki.local.wmftest.net:8080/w/api.php', + baseUrl: 'http://cirrustest.wiki.local.wmftest.net:8080' }, ru: { username: 'Admin', password: 'vagrant', - apiUrl: 'http://ru.wiki.local.wmftest.net:8080/w/api.php' + apiUrl: 'http://ru.wiki.local.wmftest.net:8080/w/api.php', + baseUrl: 'http://ru.wiki.local.wmftest.net:8080' }, beta: {}, test2: {}, @@ -84,7 +87,8 @@ relPath('./integration/features/support/world.js'), relPath('./integration/features/support/hooks.js'), relPath('./integration/features/step_definitions/page_step_helpers.js'), - relPath('./integration/features/step_definitions/page_steps.js') + relPath('./integration/features/step_definitions/page_steps.js'), + relPath('./integration/features/step_definitions/search_steps.js') ] }, // Patterns to exclude. @@ -145,18 +149,6 @@ // // Saves a screenshot to a given path if a command fails. screenshotPath: './log/', - // - // Set a base URL in order to shorten url command calls. If your url parameter starts - // with "/", then the base url gets prepended. - baseUrl: ( - process.env.MW_SERVER === undefined ? - 'http://dev.wiki.local.wmftest.net:8080' : - process.env.MW_SERVER - ) + ( - process.env.MW_SCRIPT_PATH === undefined ? - '/w' : - process.env.MW_SCRIPT_PATH - ), // // Default timeout for all waitFor* commands. waitforTimeout: 2, diff --git a/tests/integration/features/go_browser.feature b/tests/integration/features/go_browser.feature new file mode 100644 index 000..b92d70f --- /dev/null +++ b/tests/integration/features/go_browser.feature @@ -0,0 +1,20 @@ +@clean @go @phantomjs +Feature: Go Search + @from_core + Scenario: I can "go" to a user's page whether it is there or not +When I go search for User:DoesntExist +Then I am on a page titled User:DoesntExist + + @options + Scenario Outline: When I near match more than one page but one is exact (case, modulo case, or converted to title case) I go to that page +When I go search for Nearmatchflattentest +Then I am on a page titled Nearmatchflattentest + Examples: +| term | title | +| bach | Johann Sebastian Bach | +| Søn Redirectnoncompete | Blah Redirectnoncompete | +| Soñ Redirectnoncompete | Blah