|
5 | 5 |
|
6 | 6 | describe "Add new comment" do
|
7 | 7 | context "when React Router", page: :main, js: true, type: :system do
|
8 |
| - it "with Horizontal Form" do |
9 |
| - click_link "Inline Form" |
10 |
| - click_link "Horizontal Form" |
11 |
| - submit_form |
12 |
| - include_examples "check if comment is added", true |
13 |
| - include_examples "expect successful validation" |
| 8 | + describe "with Horizontal Form" do |
| 9 | + before { |
| 10 | + click_link "Inline Form" |
| 11 | + click_link "Horizontal Form" |
| 12 | + submit_form |
| 13 | + } |
| 14 | + context "same examples" do |
| 15 | + include_examples "check if comment is added", true |
| 16 | + include_examples "expect successful validation" |
| 17 | + end |
14 | 18 | end
|
15 | 19 |
|
16 |
| - it "with Inline Form" do |
17 |
| - click_link "Inline Form" |
18 |
| - submit_form |
19 |
| - include_examples "check if comment is added", true |
20 |
| - include_examples "expect successful validation" |
| 20 | + describe "with Inline Form" do |
| 21 | + before { |
| 22 | + click_link "Inline Form" |
| 23 | + submit_form |
| 24 | + } |
| 25 | + context "same examples" do |
| 26 | + include_examples "check if comment is added", true |
| 27 | + include_examples "expect successful validation" |
| 28 | + end |
21 | 29 | end
|
22 | 30 |
|
23 |
| - it "with Stacked Form" do |
24 |
| - click_link "Stacked Form" |
25 |
| - submit_form |
26 |
| - include_examples "check if comment is added", true |
27 |
| - include_examples "expect successful validation" |
| 31 | + describe "with Stacked Form" do |
| 32 | + before { |
| 33 | + click_link "Stacked Form" |
| 34 | + submit_form |
| 35 | + } |
| 36 | + context "same examples" do |
| 37 | + include_examples "check if comment is added", true |
| 38 | + include_examples "expect successful validation" |
| 39 | + end |
28 | 40 | end
|
29 | 41 | end
|
30 | 42 |
|
31 | 43 | context "when React/Redux", page: :react_demo, js: true, type: :system do
|
32 |
| - it "with Horizontal Form" do |
33 |
| - click_link "Inline Form" |
34 |
| - click_link "Horizontal Form" |
35 |
| - submit_form |
36 |
| - include_examples "check if comment is added", true |
37 |
| - include_examples "expect successful validation" |
| 44 | + describe "with Horizontal Form" do |
| 45 | + before { |
| 46 | + click_link "Inline Form" |
| 47 | + click_link "Horizontal Form" |
| 48 | + submit_form |
| 49 | + } |
| 50 | + context "same examples" do |
| 51 | + include_examples "check if comment is added", true |
| 52 | + include_examples "expect successful validation" |
| 53 | + end |
38 | 54 | end
|
39 | 55 |
|
40 |
| - it "with Inline Form" do |
41 |
| - click_link "Inline Form" |
42 |
| - submit_form |
43 |
| - include_examples "check if comment is added", true |
44 |
| - include_examples "expect successful validation" |
| 56 | + describe "with Inline Form" do |
| 57 | + before { |
| 58 | + click_link "Inline Form" |
| 59 | + submit_form |
| 60 | + } |
| 61 | + context "same examples" do |
| 62 | + include_examples "check if comment is added", true |
| 63 | + include_examples "expect successful validation" |
| 64 | + end |
45 | 65 | end
|
46 | 66 |
|
47 |
| - it "with Stacked Form" do |
48 |
| - click_link "Stacked Form" |
49 |
| - submit_form |
50 |
| - include_examples "check if comment is added", true |
51 |
| - include_examples "expect successful validation" |
| 67 | + describe "with Stacked Form" do |
| 68 | + before { |
| 69 | + click_link "Stacked Form" |
| 70 | + submit_form |
| 71 | + } |
| 72 | + context "same examples" do |
| 73 | + include_examples "check if comment is added", true |
| 74 | + include_examples "expect successful validation" |
| 75 | + end |
52 | 76 | end
|
53 | 77 | end
|
54 | 78 |
|
55 | 79 | context "when simple page", page: :simple, js: true, type: :system do
|
56 |
| - it "with Horizontal Form" do |
57 |
| - click_link "Inline Form" |
58 |
| - click_link "Horizontal Form" |
59 |
| - submit_form |
60 |
| - include_examples "check if comment is added", false |
61 |
| - include_examples "expect successful validation" |
| 80 | + describe "with Horizontal Form" do |
| 81 | + before { |
| 82 | + click_link "Inline Form" |
| 83 | + click_link "Horizontal Form" |
| 84 | + submit_form |
| 85 | + } |
| 86 | + context "same examples" do |
| 87 | + include_examples "check if comment is added", true |
| 88 | + include_examples "expect successful validation" |
| 89 | + end |
62 | 90 | end
|
63 | 91 |
|
64 |
| - it "with Inline Form" do |
65 |
| - click_link "Inline Form" |
66 |
| - submit_form |
67 |
| - include_examples "check if comment is added", false |
68 |
| - include_examples "expect successful validation" |
| 92 | + describe "with Inline Form" do |
| 93 | + before { |
| 94 | + click_link "Inline Form" |
| 95 | + submit_form |
| 96 | + } |
| 97 | + context "same examples" do |
| 98 | + include_examples "check if comment is added", true |
| 99 | + include_examples "expect successful validation" |
| 100 | + end |
69 | 101 | end
|
70 | 102 |
|
71 |
| - it "with the Stacked Form" do |
72 |
| - click_link "Stacked Form" |
73 |
| - submit_form |
74 |
| - include_examples "check if comment is added", false |
75 |
| - include_examples "expect successful validation" |
| 103 | + describe "with the Stacked Form" do |
| 104 | + before { |
| 105 | + click_link "Stacked Form" |
| 106 | + submit_form |
| 107 | + } |
| 108 | + context "same examples" do |
| 109 | + include_examples "check if comment is added", true |
| 110 | + include_examples "expect successful validation" |
| 111 | + end |
76 | 112 | end
|
77 | 113 | end
|
78 | 114 | end
|
0 commit comments