@@ -55,15 +55,15 @@ public function can_render_component_as_html_or_json(): void
55
55
56
56
$ this ->browser ()
57
57
->throwExceptions ()
58
- ->get ('/components /component1? ' .http_build_query ($ dehydrated ))
58
+ ->get ('/_components /component1? ' .http_build_query ($ dehydrated ))
59
59
->assertSuccessful ()
60
60
->assertHeaderContains ('Content-Type ' , 'html ' )
61
61
->assertContains ('Prop1: ' .$ entity ->id )
62
62
->assertContains ('Prop2: 2021-03-05 9:23 ' )
63
63
->assertContains ('Prop3: value3 ' )
64
64
->assertContains ('Prop4: (none) ' )
65
65
66
- ->get ('/components /component1? ' .http_build_query ($ dehydrated ), ['headers ' => ['Accept ' => 'application/vnd.live-component+json ' ]])
66
+ ->get ('/_components /component1? ' .http_build_query ($ dehydrated ), ['headers ' => ['Accept ' => 'application/vnd.live-component+json ' ]])
67
67
->assertSuccessful ()
68
68
->assertHeaderEquals ('Content-Type ' , 'application/vnd.live-component+json ' )
69
69
->assertJsonMatches ('keys(@) ' , ['html ' , 'data ' ])
@@ -99,26 +99,26 @@ public function can_execute_component_action(): void
99
99
100
100
$ this ->browser ()
101
101
->throwExceptions ()
102
- ->get ('/components /component2? ' .http_build_query ($ dehydrated ))
102
+ ->get ('/_components /component2? ' .http_build_query ($ dehydrated ))
103
103
->assertSuccessful ()
104
104
->assertHeaderContains ('Content-Type ' , 'html ' )
105
105
->assertContains ('Count: 1 ' )
106
106
->use (function (HtmlResponse $ response ) use (&$ token ) {
107
107
// get a valid token to use for actions
108
108
$ token = $ response ->crawler ()->filter ('div ' )->first ()->attr ('data-live-csrf-value ' );
109
109
})
110
- ->post ('/components /component2/increase? ' .http_build_query ($ dehydrated ), [
110
+ ->post ('/_components /component2/increase? ' .http_build_query ($ dehydrated ), [
111
111
'headers ' => ['X-CSRF-TOKEN ' => $ token ]
112
112
])
113
113
->assertSuccessful ()
114
114
->assertHeaderContains ('Content-Type ' , 'html ' )
115
115
->assertContains ('Count: 2 ' )
116
116
117
- ->get ('/components /component2? ' .http_build_query ($ dehydrated ), ['headers ' => ['Accept ' => 'application/vnd.live-component+json ' ]])
117
+ ->get ('/_components /component2? ' .http_build_query ($ dehydrated ), ['headers ' => ['Accept ' => 'application/vnd.live-component+json ' ]])
118
118
->assertSuccessful ()
119
119
->assertJsonMatches ('data.count ' , 1 )
120
120
->assertJsonMatches ("contains(html, 'Count: 1') " , true )
121
- ->post ('/components /component2/increase? ' .http_build_query ($ dehydrated ), [
121
+ ->post ('/_components /component2/increase? ' .http_build_query ($ dehydrated ), [
122
122
'headers ' => [
123
123
'Accept ' => 'application/vnd.live-component+json ' ,
124
124
'X-CSRF-TOKEN ' => $ token ,
@@ -136,7 +136,7 @@ public function can_execute_component_action(): void
136
136
public function cannot_execute_component_action_for_get_request (): void
137
137
{
138
138
$ this ->browser ()
139
- ->get ('/components /component2/increase ' )
139
+ ->get ('/_components /component2/increase ' )
140
140
->assertStatus (405 )
141
141
;
142
142
}
@@ -147,7 +147,7 @@ public function cannot_execute_component_action_for_get_request(): void
147
147
public function missing_csrf_token_for_component_action_fails (): void
148
148
{
149
149
$ this ->browser ()
150
- ->post ('/components /component2/increase ' )
150
+ ->post ('/_components /component2/increase ' )
151
151
->assertStatus (400 )
152
152
;
153
153
}
@@ -158,7 +158,7 @@ public function missing_csrf_token_for_component_action_fails(): void
158
158
public function invalid_csrf_token_for_component_action_fails (): void
159
159
{
160
160
$ this ->browser ()
161
- ->post ('/components /component2/increase ' , [
161
+ ->post ('/_components /component2/increase ' , [
162
162
'headers ' => ['X-CSRF-TOKEN ' => 'invalid ' ]
163
163
])
164
164
->assertStatus (400 )
@@ -187,7 +187,7 @@ public function before_re_render_hook_only_executed_during_ajax(): void
187
187
->visit ('/render-template/template1 ' )
188
188
->assertSuccessful ()
189
189
->assertSee ('BeforeReRenderCalled: No ' )
190
- ->get ('/components /component2? ' .http_build_query ($ dehydrated ))
190
+ ->get ('/_components /component2? ' .http_build_query ($ dehydrated ))
191
191
->assertSuccessful ()
192
192
->assertSee ('BeforeReRenderCalled: Yes ' )
193
193
;
@@ -214,19 +214,19 @@ public function can_redirect_from_component_action(): void
214
214
215
215
$ this ->browser ()
216
216
->throwExceptions ()
217
- ->get ('/components /component2? ' .http_build_query ($ dehydrated ))
217
+ ->get ('/_components /component2? ' .http_build_query ($ dehydrated ))
218
218
->assertSuccessful ()
219
219
->use (function (HtmlResponse $ response ) use (&$ token ) {
220
220
// get a valid token to use for actions
221
221
$ token = $ response ->crawler ()->filter ('div ' )->first ()->attr ('data-live-csrf-value ' );
222
222
})
223
223
->interceptRedirects ()
224
- ->post ('/components /component2/redirect? ' .http_build_query ($ dehydrated ), [
224
+ ->post ('/_components /component2/redirect? ' .http_build_query ($ dehydrated ), [
225
225
'headers ' => ['X-CSRF-TOKEN ' => $ token ]
226
226
])
227
227
->assertRedirectedTo ('/ ' )
228
228
229
- ->post ('/components /component2/redirect? ' .http_build_query ($ dehydrated ), [
229
+ ->post ('/_components /component2/redirect? ' .http_build_query ($ dehydrated ), [
230
230
'headers ' => [
231
231
'Accept ' => 'application/json ' ,
232
232
'X-CSRF-TOKEN ' => $ token ,
0 commit comments