aboutsummaryrefslogtreecommitdiff
blob: dd23a994f9430cf85b5b5a3599e232d1299e5da4 (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
Feature: gentoo-dev-announce
  As a recruiting lead
  I want recruits to send actual emails instead of writing
  So that they learn in practice

  Scenario: Testing gentoo-dev-announce-posting
    Given recruit that should answer gentoo-dev-announce posting question
    And I am logged in as "recruit"
    When I send wrong email announcement
    And I am on show "gentoo-dev-announce posting" question page
    Then I should see "Your answer should have subject (without quotes)"
    Then I should see subject for email "recruit" should send to answer "gentoo-dev-announce posting"

    When I follow "View you answer"
    Then I should see "Email you sent didn't match requirements"

    When I send proper email announcement
    And I am on show "gentoo-dev-announce posting" question page
    Then I should see "Remember to replace @gentoo.org with localhost"

    When I follow "View you answer"
    Then I should see "You sent proper email"

  Scenario: Don't see answer it link on email question page
    Given recruit that should answer gentoo-dev-announce posting question
    And I am logged in as "recruit"
    And I am on show "gentoo-dev-announce posting" question page
    Then I should not see "Answer it"

  Scenario: Protect from forged responses
    Given recruit that should answer gentoo-dev-announce posting question
    And someone sends forged answer
    And I am logged in as "recruit"
    And I am on show "gentoo-dev-announce posting" question page
    Then I should not see "View you answer"

 Scenario: Don't show answering subject to guest
    Given recruit that should answer gentoo-dev-announce posting question
    When I am on show "gentoo-dev-announce posting" question page
    Then I should not see "Your answer should have subject (without quotes)"

  Scenario: Create and edit email question
    Given I am logged in as administrator
    When I follow "New Question"
    And I fill in "some question" for "question[title]"
    And I press "Create Question"
    Then I should see "The question was created successfully" within ".flash.notice"

    When I follow "Add email content"
    And I fill in "some question" for "question_content_email[description]"
    And I fill in "To : me" for "question_content_email[req_text]"
    And press "Create Question Content Email"
    Then I should see "The question content email was created successfully" within ".flash.notice"

    When I am on show "some question" question page
    And I follow "content"
    And I fill in "Some question." for "question_content_email[description]"
    And press "Save"
    Then I should see "Changes to the question content email were saved" within ".flash.notice"