blob: 5ce7367f88a5af98e6544d260f209729a3abd02f (
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
|
Feature: Upload .poll_result files
As a pollster
I want to upload .poll_result files
So that researcher can compute them like a chunk of the whole poll result
Scenario: Upload one valid .poll_result file
Given I am logged in as "Pollster"
And "closed_poll" exists
And "encuestador" is binded to "closed_poll"
And "valid.poll_result" is authored by "encuestador"
When I visit the "upload" page
And I upload "valid.poll_result"
Then I should see a message that says "valid.poll_result" and "éxito"
And "valid.poll_result" has the time string "31/12/1999 23:59hs"
Scenario: Invalid .poll_result file
Given I am logged in as "Pollster"
When I visit the "upload" page
And I upload "invalid.poll_result"
Then I should see a message that says "invalid.poll_result"
And I should see a message that says "No es un .poll_result válido."
Scenario: Upload .poll_result file that exists already
Given I am logged in as "Pollster"
And "closed_poll" exists
And "encuestador" is binded to "closed_poll"
And "valid.poll_result" is authored by "encuestador"
When I visit the "upload" page
And I upload "valid.poll_result"
When I visit the "upload" page
And I upload "valid.poll_result"
Then I should see a message that says "valid.poll_result"
And I should see a message that says "ya se encuentran publicados"
Scenario: Upload .poll_result file which its content had been uploaded
Given I am logged in as "Pollster"
And "closed_poll" exists
And "encuestador" is binded to "closed_poll"
And "valid.poll_result" is authored by "encuestador"
When I visit the "upload" page
And I upload "valid.poll_result"
And "valid_copy.poll_result" is authored by "encuestador"
When I visit the "upload" page
And I upload "valid_copy.poll_result"
Then I should see a message that says "valid_copy.poll_result"
And I should see a message that says "ya se encuentran publicados"
Scenario: Upload .poll_result wich its not authored by logged in pollster
Given I am logged in as "Pollster"
And "closed_poll" exists
When I visit the "upload" page
And I upload "other_owner.poll_result"
Then I should see a message that says "no pertencen a una encuesta realizada por usted"
Scenario: Upload .poll_result with a poll not assigned to logged in pollster
Given I am logged in as "Pollster"
And "poll" exists
When I visit the "upload" page
And I upload "not_asigned_poll.poll_result"
Then I should see a message that says "Estos son resultados de una encuesta que no le fué asignada."
Scenario: Upload two .poll_result with the same content at the same time
Given I am logged in as "Pollster"
And "poll" exists
When I visit the "upload" page
And I load "same_time.poll_result" on position "1"
And I load "same_time_copy.poll_result" on position "2"
When I upload loaded files
Then I should see a message that says "same_time.poll_result"
And I should see a message that says "éxito"
And I should see a message that says "same_time_copy.poll_result"
And I should see a message that says "ya se encuentran publicados"
|