/
import_feature_ajax_functionality.feature
58 lines (53 loc) · 2.15 KB
/
import_feature_ajax_functionality.feature
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
Feature: Import feature ajax functionality
In order to help the user stay within the import view
As a user
I want the import view to be re-rendered once the import form has been submitted
Scenario: Importing a feature via AJAX should re-render the import view
Given there is a project
And the project has a project path
When the project is viewed
When I click "span.view-panel"
Then the import link should be visible
When I click "a#import"
Then I should see the imports page
When I import "button.button"
Then there should be an AJAX request
And the imports will be rendered via AJAX
Scenario: Clicking on a feature tab should display the importable feature
Given there is a project
And the project has a project path
When the project is viewed
When I click "span.view-panel"
Then the import link should be visible
When I click "a#import"
Then I should see the imports page
And select the "Tag cloud" tab
Then the "Import tag cloud" button should be visible
Scenario: Upon importing a feature the related tab should be removed
Given there is a project
And the project has a project path
When the project is viewed
When I click "span.view-panel"
Then the import link should be visible
When I click "a#import"
Then I should see the imports page
And select the "Tag cloud" tab
And I click "button.button"
Then the "Tag cloud" tab should not be visible
Scenario: Upon importing a feature a flash message should be displayed
Given there is a project
And the project has a project path
When the project is viewed
When I click "span.view-panel"
Then the import link should be visible
When I click "a#import"
Then I should see the imports page
And select the "Tag cloud" tab
And I click "button.button"
Then the flash message "was created" should be displayed
Scenario: Importing a feature should disable the submit button on sumbission
Given there is a project
And the project has a project path
When I am on the "import project" page
When I import "button.button"
Then the submit button should be disabled