@@ -7,8 +7,7 @@ defmodule DeveloperCreatesPostTest do
77 alias Tilex.Integration.Pages.PostShowPage
88 alias Tilex.Integration.Pages.PostForm
99
10- test "fills out form and save" , % { session: session } do
11- Ecto.Adapters.SQL.Sandbox . allow ( Tilex.Repo , self ( ) , Process . whereis ( Tilex.Notifications ) )
10+ feature "fills out form and save" , % { session: session } do
1211 Factory . insert! ( :channel , name: "phoenix" )
1312 developer = Factory . insert! ( :developer )
1413
@@ -48,8 +47,7 @@ defmodule DeveloperCreatesPostTest do
4847 |> Navigation . ensure_heading ( "TODAY I LEARNED" )
4948 end
5049
51- test "fills out form and save & publish" , % { session: session } do
52- Ecto.Adapters.SQL.Sandbox . allow ( Tilex.Repo , self ( ) , Process . whereis ( Tilex.Notifications ) )
50+ feature "fills out form and save & publish" , % { session: session } do
5351 Factory . insert! ( :channel , name: "phoenix" )
5452 developer = Factory . insert! ( :developer )
5553
@@ -88,7 +86,7 @@ defmodule DeveloperCreatesPostTest do
8886 |> Navigation . ensure_heading ( "TODAY I LEARNED" )
8987 end
9088
91- test "cancels submission" , % { session: session } do
89+ feature "cancels submission" , % { session: session } do
9290 developer = Factory . insert! ( :developer )
9391
9492 session
@@ -99,7 +97,7 @@ defmodule DeveloperCreatesPostTest do
9997 |> IndexPage . ensure_page_loaded ( )
10098 end
10199
102- test "fails to enter things" , % { session: session } do
100+ feature "fails to enter things" , % { session: session } do
103101 developer = Factory . insert! ( :developer )
104102
105103 session
@@ -113,7 +111,7 @@ defmodule DeveloperCreatesPostTest do
113111 |> CreatePostPage . expect_form_has_error ( "Channel can't be blank" )
114112 end
115113
116- test "enters a title that is too long" , % { session: session } do
114+ feature "enters a title that is too long" , % { session: session } do
117115 Factory . insert! ( :channel , name: "phoenix" )
118116 developer = Factory . insert! ( :developer )
119117
@@ -131,7 +129,7 @@ defmodule DeveloperCreatesPostTest do
131129 |> CreatePostPage . expect_form_has_error ( "Title should be at most 50 character(s)" )
132130 end
133131
134- test "enters a body that is too long" , % { session: session } do
132+ feature "enters a body that is too long" , % { session: session } do
135133 Factory . insert! ( :channel , name: "phoenix" )
136134 developer = Factory . insert! ( :developer )
137135
@@ -149,7 +147,7 @@ defmodule DeveloperCreatesPostTest do
149147 |> CreatePostPage . expect_form_has_error ( "Body should be at most 200 word(s)" )
150148 end
151149
152- test "enters markdown code into the body" , % { session: session } do
150+ feature "enters markdown code into the body" , % { session: session } do
153151 Factory . insert! ( :channel , name: "phoenix" )
154152 developer = Factory . insert! ( :developer )
155153
@@ -166,7 +164,7 @@ defmodule DeveloperCreatesPostTest do
166164 assert find ( session , Query . css ( "strong" , text: "bold powerup" ) )
167165 end
168166
169- test "views parsed markdown preview" , % { session: session } do
167+ feature "views parsed markdown preview" , % { session: session } do
170168 Factory . insert! ( :channel , name: "phoenix" )
171169 developer = Factory . insert! ( :developer )
172170
0 commit comments