feature-githubSearch¶
- Intent
- This feature is mainly used as an enviroment check just to make sure the overall cucumber / webdriver / selenium / browser setup is functioning.
- Success
- Passing and Failing test that detect expected text on this repo on https://github.com/ctrees/drpfeature/.
- Related Information
- feature file location src/features/githubSearch.features
Below is the current githubSearch.feature file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | Feature: drpfeature repo chech at Github
As a Developer in Test
I want to search drpfeature repository
So that I can use it in my future tests
Scenario: open-URL
Given I open the url "https://github.com/ctrees/drpfeature"
Then I expect that the url is "https://github.com/ctrees/drpfeature"
And I expect that the title is "GitHub - ctrees/drpfeature: Digital Rebar Provision UX Feature Testing Automation"
@Pending
Scenario: search for webdriverio repository
Given I open the url "https://github.com/search"
And the inputfield ".input-block" not contains any text
And I set "webdriverio" to the inputfield ".input-block"
And I press "Space"
And I add "selenium" to the inputfield ".input-block"
When I submit the form "#search_form"
Then I expect that element ".input-block" contains the text "webdriverio selenium"
And I expect that element ".repo-list-item:first-child > .repo-list-description" contains the text "Webdriver/Selenium 2.0 JavaScript bindings for Node.js"
@Pending
Scenario: login with fake credentials
Given I open the url "https://github.com/"
When I log in to site with username "marketionist" and password "1234"
Then I expect that element "#js-flash-container .flash-error" is visible
|
The above test is run using the following command.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | catmini:drpfeature msops$ yarn run wdio --spec ./src/features/githubSearch.feature
yarn run v1.3.2
$ /Users/msops/Code/drpfeature/node_modules/.bin/wdio --spec ./src/features/githubSearch.feature
------------------------------------------------------------------
[chrome #0-0] Session ID: 02f516ab-8e38-4449-9847-1f1501989541
[chrome #0-0] Spec: /Users/msops/Code/drpfeature/src/features/githubSearch.feature
[chrome #0-0] Running: chrome
[chrome #0-0]
[chrome #0-0] Github test
[chrome #0-0]
[chrome #0-0] open URL
[chrome #0-0] ✓ I open the url "https://github.com/ctrees/drpfeature"
[chrome #0-0] ✓ I expect that the url is "https://github.com/ctrees/drpfeature"
[chrome #0-0] ✓ I expect that the title is "GitHub - ctrees/drpfeature: Digital Rebar Provision UX Feature Testing Automation"
[chrome #0-0]
[chrome #0-0]
[chrome #0-0] 3 passing (3s)
[chrome #0-0]
✨ Done in 7.20s.
catmini:drpfeature msops$
|
Currently this test only checks https://github.com/ctrees/drpfeature html title. GitHub search and ‘fake login’ Scenarios are commented out.