Welcome to mirror list, hosted at ThFree Co, Russian Federation.

post_preview.feature « desktop « features - github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bf6301c12a139a0136a80b40dd21aa2c72972bf5 (plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@javascript
Feature: preview posts in the stream
    In order to test markdown without posting
    As a user
    I want to see a preview of my posts in the stream

    Background:
      Given following users exist:
        | username     | email             |
        | Bob Jones    | bob@bob.bob       |
        | Alice Smith  | alice@alice.alice |
      And a user with email "bob@bob.bob" is connected with "alice@alice.alice"
      When I sign in as "bob@bob.bob"
      Then I should not see any posts in my stream

    Scenario: preview and post a text-only message
      Given I expand the publisher
      When I write the status message "I am eating yogurt"
      And I preview the post
      Then I should see "I am eating yogurt" in the preview

      Given I edit the post
      When I write the status message "This preview rocks"
      And I preview the post
      Then I should see "This preview rocks" in the preview
      And I should not see "I am eating a yogurt" in the preview

      Given I edit the post
      When I write the status message "I like rocks"
      And I press "Share"
      Then "I like rocks" should be post 1
      When I expand the publisher
      Then I should not be in preview mode

    Scenario: preview a very long message
      Given I expand the publisher
      When I insert an extremely long status message
      And I preview the post
      Then the preview should not be collapsed
      When I press "Share"
      Then the post should be collapsed

    Scenario: preview a photo with text
      Given I expand the publisher
      And I attach "spec/fixtures/button.png" to the publisher
      When I fill in the following:
          | status_message_text    | Look at this dog    |
      And I preview the post
      Then I should see a "img" within ".md-preview .stream-element .photo-attachments"
      And I should see "Look at this dog" within ".md-preview .stream-element"
      And I close the publisher

    Scenario: preview a post with mentions
      Given I expand the publisher
      And I mention Alice in the publisher
      And I preview the post
      And I confirm the alert after I follow "Alice Smith"
      Then I should see "Alice Smith"

    Scenario: preview a post on tag page
      Given there is a user "Samuel Beckett" who's tagged "#rockstar"
      When I go to the tag page for "rockstar"
      Then I should see "Samuel Beckett"
      When I expand the publisher
      And I fill in the following:
          | status_message_text    | This preview rocks    |
      And I preview the post
      Then I should see "This preview rocks" in the preview
      And I close the publisher

    Scenario: preview a post with the poll
      Given I expand the publisher
      When I fill in the following:
          | status_message_text    | I am eating yogurt    |
      And I click on selector "#poll_creator"
      When I fill in the following:
          | status_message_text    | I am eating yogurt |
          | poll_question          | What kind of yogurt do you like? |
      And I fill in the following for the options:
          | normal |
          | not normal  |
      And I preview the post
      Then I should see a ".poll-form" within ".md-preview .stream-element"
      And I should see a "form" within ".md-preview .stream-element"
      And I close the publisher

    Scenario: preview a post with location
      Given I expand the publisher
      When I fill in the following:
          | status_message_text    | I am eating yogurt    |
      And I allow geolocation
      And I click on selector "#locator"
      When I fill in the following:
          | status_message_text    | I am eating yogurt |
          | location_address       | Some cool place |
      And I preview the post
      Then I should see a ".near-from" within ".md-preview .stream-element"
      And I should see "Some cool place" within ".md-preview .stream-element .near-from"
      And I close the publisher