Give browser tests on CI more time and wait for Alpine in the theme test
tests / lint (push) Has been cancelled
tests / feature (8.4) (push) Has been cancelled
tests / feature (8.5) (push) Has been cancelled
tests / browser (chrome, chromium) (push) Has been cancelled
tests / browser (firefox, firefox) (push) Has been cancelled
tests / browser (safari, webkit) (push) Has been cancelled
tests / lint (push) Has been cancelled
tests / feature (8.4) (push) Has been cancelled
tests / feature (8.5) (push) Has been cancelled
tests / browser (chrome, chromium) (push) Has been cancelled
tests / browser (firefox, firefox) (push) Has been cancelled
tests / browser (safari, webkit) (push) Has been cancelled
CI's WebKit job failed twice on a slow runner: a carousel scroll that had not settled within five seconds, and a press on the theme switch before Alpine had revealed it. BROWSER_TIMEOUT raises the assertion timeout, and the workflow sets it to fifteen seconds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V9NnLxnPp8vaaurb3Z1MFy
This commit is contained in:
co-authored by
Claude Opus 5
parent
cbf874a5a6
commit
eca6b8fb05
@@ -19,8 +19,10 @@ it('follows the operating system while the visitor has not chosen', function ()
|
||||
});
|
||||
|
||||
it('keeps the visitor\'s choice over the operating system', function () {
|
||||
// The theme switch waits for Alpine (x-cloak); a press before then would find nothing to press.
|
||||
$page = visit('/material')->inDarkMode()
|
||||
->waitForEvent('networkidle')
|
||||
->assertScript("document.readyState === 'complete' && typeof window.Alpine !== 'undefined' && typeof window.Livewire !== 'undefined'")
|
||||
->assertScript(theme('data-theme', 'dark'));
|
||||
|
||||
$page->click('@theme-light')
|
||||
|
||||
@@ -3,3 +3,9 @@
|
||||
use NoNameWeb\LivewireMaterial\Tests\TestCase;
|
||||
|
||||
pest()->extend(TestCase::class)->in('Feature', 'Browser');
|
||||
|
||||
// A shared CI runner is slower than a workstation: an animation or a smooth scroll can take longer
|
||||
// than the default five seconds to settle there. BROWSER_TIMEOUT (milliseconds) raises the limit.
|
||||
if (($timeout = (int) getenv('BROWSER_TIMEOUT')) > 0) {
|
||||
pest()->browser()->timeout($timeout);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user