Conversation
| $currentSite = Sites::getCurrentSite(); | ||
| $isInstalled = Cms::isInstalled(); | ||
|
|
||
| if (! $isInstalled) { | ||
| return parent::share($request); | ||
| } | ||
|
|
||
| $currentSite = Sites::getCurrentSite(); | ||
| $updates = app(Updates::class); | ||
| $nav = app(Navigation::class); | ||
|
|
||
| if ($isInstalled && ! $updates->isCraftUpdatePending()) { | ||
| if (! $updates->isCraftUpdatePending()) { |
There was a problem hiding this comment.
@brianjhanson I had to return early here if not installed because the installer was throwing exceptions that there was no site.
Might want to double-check what is needed for the installer here or if just doing parent::share is enough
There was a problem hiding this comment.
I don't think the installer needs any of this stuff at the moment so this should be good. I've made a similar change in my branches but apparently forgot to commit it 🤦
|
Would we be able to point Playwright tests at this? |
I'd maybe look into https://pestphp.com/docs/browser-testing as that runs on Playwright but is fully integrated with the test environment |
Yeah, I tried to get that working but didn't have any luck on my first attempt. I forget exactly what I ran int though. The other piece is that we already have some e2e tests written with Playwright that it would be good to point at 6.x and not have to rewrite in Pest |
A barebones setup of Workbench for testing the package while developing without needing a separate "host" application.
The current seeder creates the following:
Pageentry type with this field layoutHomesinglePagesstructurePostschannelI'll probably improve this further when I've had a chance to use it a bit more.
The test changes / fixes are related to the Laravel request not being available in tests.
Workbench
Workbench allows you to run a live Craft CMS application during development without needing a separate Laravel project. This is useful for manually testing features, debugging, and exploring the CMS.
Quick Start
This starts a development server at
http://127.0.0.1:8000.How It Works
Workbench uses Orchestra Testbench to bootstrap a minimal Laravel application with Craft CMS loaded. The setup consists of:
vendor/orchestra/testbench-core/laravelworkbench/testbench.yamlWhen you run
composer run serve, Workbench:testbench.yamlworkbench/Directory Structure
Configuration
The
testbench.yamlfile controls Workbench behavior:Running artisan commands
Rebuilding the workbench
This runs the build recipes defined in
testbench.yaml.Further Reading