Skip to content

Commit

Permalink
Adds Turbo Drive components
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysm committed Dec 22, 2023
1 parent 043f86e commit 00c1ddc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<meta name="turbo-cache-control" content="no-cache">
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<meta name="turbo-cache-control" content="no-preview">
1 change: 1 addition & 0 deletions resources/views/components/page-requires-reload.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<meta name="turbo-visit-control" content="reload">
14 changes: 14 additions & 0 deletions tests/Views/ComponentsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,18 @@ public function invalid_refresh_scroll()
<x-turbo::refreshes-with :method="$method" :scroll="$scroll" />
BLADE, ['method' => RefreshesWith::DEFAULT_METHOD, 'scroll' => 'invalid']);
}

/** @test */
public function turbo_drive_components()
{
$this->blade(
<<<'BLADE'
<x-turbo::exempts-page-from-cache />
<x-turbo::exempts-page-from-preview />
<x-turbo::page-requires-reload />
BLADE)
->assertSee('<meta name="turbo-cache-control" content="no-cache">', false)
->assertSee('<meta name="turbo-cache-control" content="no-preview">', false)
->assertSee('<meta name="turbo-visit-control" content="reload">', false);
}
}

0 comments on commit 00c1ddc

Please sign in to comment.