* 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
52 lines
1.8 KiB
Gherkin
52 lines
1.8 KiB
Gherkin
@javascript
|
|
Feature: posting from own profile page
|
|
In order to be all cool and stuff
|
|
I want to post from my profile page
|
|
|
|
Background:
|
|
Given I am on the home page
|
|
And a user with username "alice"
|
|
When I sign in as "alice@alice.alice"
|
|
Given I have following aspects:
|
|
| Family |
|
|
| Work |
|
|
Given I am on "alice@alice.alice"'s page
|
|
|
|
Scenario: posting some text
|
|
Given I expand the publisher
|
|
And I have turned off jQuery effects
|
|
And I append "I want to understand people" to the publisher
|
|
And I select "Family" on the aspect dropdown
|
|
|
|
And I press "Share"
|
|
|
|
Then I should see "I want to understand people"
|
|
|
|
When I am on the home page
|
|
Then I should see "I want to understand people"
|
|
|
|
When I am on the aspects page
|
|
And I select only "Family" aspect
|
|
Then I should see "I want to understand people"
|
|
|
|
When I select only "Work" aspect
|
|
Then I should not see "I want to understand people"
|
|
|
|
Scenario: post a photo with text
|
|
Given I expand the publisher
|
|
When I attach the file "spec/fixtures/button.png" to hidden "file" within "#file-upload"
|
|
When I fill in the following:
|
|
| status_message_fake_text | who am I? |
|
|
|
|
And I press "Share"
|
|
|
|
When I am on the home page
|
|
Then I should see a "img" within ".stream_element div.photo_attachments"
|
|
And I should see "who am I?" within ".stream_element"
|
|
|
|
Scenario: back out of posting a photo-only post
|
|
Given I expand the publisher
|
|
And I have turned off jQuery effects
|
|
When I attach the file "spec/fixtures/button.png" to hidden "file" within "#file-upload"
|
|
And I click to delete the first uploaded photo
|
|
Then I should not see an uploaded image within the photo drop zone
|