forked from shakacode/react-webpack-rails-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd_new_comment_spec.rb
55 lines (51 loc) · 1.97 KB
/
add_new_comment_spec.rb
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
require "rails_helper"
require "system/shared/examples"
require "system/shared/contexts"
feature "Add new comment" do
context "React Router", page: :main, js: true, type: :system do
context "via Horizontal Form", form: :horizontal do
include_examples "New Comment Submission", true
include_examples "Validation errors displaying"
end
context "via Inline Form", form: :inline do
include_examples "New Comment Submission", true
include_examples "Validation errors displaying"
end
context "via Stacked Form", form: :stacked do
include_examples "New Comment Submission", true
include_examples "Validation errors displaying"
end
end
context "React/Redux", page: :react_demo, js: true, type: :system do
context "via Horizontal Form", form: :horizontal do
include_examples "New Comment Submission", true
include_examples "Validation errors displaying"
end
context "via Inline Form", form: :inline do
include_examples "New Comment Submission", true
include_examples "Validation errors displaying"
end
context "via Stacked Form", form: :stacked do
include_examples "New Comment Submission", true
include_examples "Validation errors displaying"
end
end
context "simple page", page: :simple, js: true, type: :system do
context "via Horizontal Form", form: :horizontal do
include_examples "New Comment Submission", false
include_examples "Validation errors displaying"
end
context "via Inline Form", form: :inline do
include_examples "New Comment Submission", false
include_examples "Validation errors displaying"
end
context "via the Stacked Form", form: :stacked do
include_examples "New Comment Submission", false
include_examples "Validation errors displaying"
end
end
context "from classic page", page: :classic do
background { click_link "New Comment" }
include_examples "New Comment Submission", false
end
end