-
Notifications
You must be signed in to change notification settings - Fork 374
Expand file tree
/
Copy pathadd_new_comment_spec.rb
More file actions
64 lines (52 loc) · 2.03 KB
/
add_new_comment_spec.rb
File metadata and controls
64 lines (52 loc) · 2.03 KB
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
# frozen_string_literal: true
require "rails_helper"
require "system/shared/examples"
require "system/shared/contexts"
describe "Add new comment" do
context "when React Router", page: :main, js: true, type: :system do
context "with Horizontal Form", form: :horizontal do
include_examples "New Comment Submission", true
include_examples "Validation errors displaying"
end
context "with Inline Form", form: :inline do
include_examples "New Comment Submission", true
include_examples "Validation errors displaying"
end
context "with Stacked Form", form: :stacked do
include_examples "New Comment Submission", true
include_examples "Validation errors displaying"
end
end
context "when React/Redux", page: :react_demo, js: true, type: :system do
context "with Horizontal Form", form: :horizontal do
include_examples "New Comment Submission", true
include_examples "Validation errors displaying"
end
context "with Inline Form", form: :inline do
include_examples "New Comment Submission", true
include_examples "Validation errors displaying"
end
context "with Stacked Form", form: :stacked do
include_examples "New Comment Submission", true
include_examples "Validation errors displaying"
end
end
context "when simple page", page: :simple, js: true, type: :system do
context "with Horizontal Form", form: :horizontal do
include_examples "New Comment Submission", false
include_examples "Validation errors displaying"
end
context "with Inline Form", form: :inline do
include_examples "New Comment Submission", false
include_examples "Validation errors displaying"
end
context "with the Stacked Form", form: :stacked do
include_examples "New Comment Submission", false
include_examples "Validation errors displaying"
end
end
context "when from classic page", page: :classic do
before { click_link "New Comment" }
include_examples "New Comment Submission", false
end
end