Skip to content

Commit 1d0657e

Browse files
authored
Merge pull request #6 from marvinrabe/patch-1
Inertia View path might be different
2 parents a98d877 + 3ea0077 commit 1d0657e

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

src/InertiaResponseRenderer.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44

55
use Inertia\Inertia;
66
use Illuminate\Support\Str;
7-
use Illuminate\Support\Facades\File;
87
use Arcanist\Contracts\ResponseRenderer;
98
use Illuminate\Contracts\Support\Renderable;
109
use Illuminate\Contracts\Support\Responsable;
1110
use Symfony\Component\HttpFoundation\Response;
12-
use Arcanist\Exception\StepTemplateNotFoundException;
1311

1412
class InertiaResponseRenderer implements ResponseRenderer
1513
{
@@ -23,11 +21,6 @@ public function renderStep(
2321
array $data = []
2422
): Response | Responsable | Renderable {
2523
$component = $this->componentBasePath . '/' . Str::studly($wizard::$slug) . '/' . Str::studly($step->slug);
26-
$componentPath = resource_path('js/Pages/' . $component . '.vue');
27-
28-
if (!File::exists($componentPath)) {
29-
throw new StepTemplateNotFoundException($step);
30-
}
3124

3225
$viewData = [
3326
'arcanist' => array_filter([

tests/InertiaResponseRendererTest.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -145,20 +145,6 @@ public function it_redirects_with_an_error(): void
145145
$response->assertSessionHasErrors('wizard');
146146
}
147147

148-
/** @test */
149-
public function it_throws_an_exception_if_the_template_does_not_exist(): void
150-
{
151-
File::shouldReceive('exists')
152-
->with(resource_path('js/Pages/Wizards/InertiaWizard/InertiaStep.vue'))
153-
->andReturnFalse();
154-
155-
$this->expectException(StepTemplateNotFoundException::class);
156-
$this->expectErrorMessage('No template found for step [inertia-step].');
157-
158-
$this->makeRenderer()
159-
->renderStep($this->step, $this->wizard, []);
160-
}
161-
162148
protected function makeRenderer(): ResponseRenderer
163149
{
164150
return new InertiaResponseRenderer('Wizards');

0 commit comments

Comments
 (0)