Cover six actions/communication behaviours the browser suite missed
Plan step 36's handoff listed six behaviours no browser test exercised yet: - FieldsTest: <x-select>'s open list uses the customizable picker (appearance: base-select) where the browser supports it, drawn as M3's 48px-row menu. - CommunicationTest: a two-line snackbar's action stays on the title's row from 600px, only wrapping under it below that (toast.css's [data-md-toast-wrap]). - ActionsTest: a disabled menu item reached by the keyboard withholds its state layer (interaction.css's [aria-disabled="true"] rule). - DataTest: a paginator's page step shows md-focus-ring's outline on keyboard focus, alongside its already-tested 48px target. - CommunicationTest: a transient rich tooltip stays open 1.5s after focus leaves rather than closing at once (rich-tooltip.js's LEAVE_GRACE_MS). - ActionsTest: an xs or sm group segment takes a press at its 48px edge, past its drawn size, now that the target comes from the shared md-touch-target class rather than a rule of its own. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
4bf1ca13a3
commit
a29a147f1a
@@ -144,6 +144,22 @@ it('binds a select to Livewire', function () {
|
||||
->assertSeeIn('#hours', '1');
|
||||
});
|
||||
|
||||
it('opens the customizable select picker as M3\'s menu, where the browser supports it', function () {
|
||||
$select = "document.querySelector('#hours-field')";
|
||||
$option = "{$select}.querySelector('option')";
|
||||
|
||||
$page = fieldProbe()
|
||||
// menu.css only styles the picker inside @supports (appearance: base-select), so this
|
||||
// also confirms the browser running the suite actually has it.
|
||||
->assertScript("CSS.supports('appearance', 'base-select') === true")
|
||||
->assertScript("getComputedStyle({$select}).appearance === 'base-select'");
|
||||
|
||||
$page->click('#hours-field')
|
||||
->assertScript("{$select}.matches(':open')")
|
||||
// M3's menu row height (menu-item.css's 48px), not the browser's own tiny option row.
|
||||
->assertScript("parseFloat(getComputedStyle({$option}).minBlockSize) === 48");
|
||||
});
|
||||
|
||||
it('keeps a partly ticked checkbox in step with the server', function () {
|
||||
$all = "document.querySelector('#all')";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user