* removed wait_until where possible * replaced wait_until with DOM obersavtions * added match: :first to all finders that assumed getting the first element * replaced evaluate_script with execute_script where possible * replaced a few execute_script with DOM observations through Capybara * removed sleep where possible * replaced sleep with DOM obersvations * replaced "wait for ajax" with DOM obersavations * replaced alert confirmation with new selenium API * bump selenium webdriver * made any other fixes to get green again
37 lines
1.2 KiB
Gherkin
37 lines
1.2 KiB
Gherkin
@javascript
|
|
Feature: Keyboard navigation
|
|
In order not to have to move my hand to the mouse
|
|
As a user
|
|
I want to be able to navigate the stream by keyboard
|
|
|
|
Background:
|
|
Given many posts from alice for bob
|
|
And I sign in as "bob@bob.bob"
|
|
|
|
Scenario: navigate downwards
|
|
When I am on the home page
|
|
And I press the "J" key somewhere
|
|
Then post 1 should be highlighted
|
|
And I should have navigated to the highlighted post
|
|
|
|
When I press the "J" key somewhere
|
|
Then post 2 should be highlighted
|
|
And I should have navigated to the highlighted post
|
|
|
|
Given I expand the publisher
|
|
When I press the "J" key in the publisher
|
|
Then post 2 should be highlighted
|
|
|
|
Scenario: navigate upwards
|
|
When I am on the home page
|
|
And I scroll to post 3
|
|
When I press the "K" key somewhere
|
|
Then post 2 should be highlighted
|
|
And I should have navigated to the highlighted post
|
|
|
|
Scenario: expand the comment form in the main stream
|
|
When I am on the home page
|
|
Then the first comment field should be closed
|
|
When I press the "J" key somewhere
|
|
And I press the "C" key somewhere
|
|
Then the first comment field should be open
|