Phone hit: PhoneHit on the ten dialog and prompt close buttons, with a pinning test
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 5m26s
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 5m26s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
54ac1ba480
commit
0b40f4c66f
11 changed files with 49 additions and 11 deletions
28
src/app/phoneHit.dialogs.test.ts
Normal file
28
src/app/phoneHit.dialogs.test.ts
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import { describe, it } from 'vitest';
|
||||
import { expectPhoneHitClasses, expectSizeTie } from './phoneHitTestKit';
|
||||
|
||||
// Dialog and prompt close buttons: each is a 32 px button (24 px Icon + 8 px padding) alone at the end of a
|
||||
// header whose title is not tappable, so the plain PhoneHit; no neighbour to spread from, no clipping container.
|
||||
describe('icon buttons in dialogs and prompts', () => {
|
||||
const expected: Record<string, string[]> = {
|
||||
'features/create-space/CreateSpaceModal.tsx': ['PhoneHit'],
|
||||
'features/create-room/CreateRoomModal.tsx': ['PhoneHit'],
|
||||
'features/add-existing/AddExisting.tsx': ['PhoneHit'],
|
||||
'components/room-topic-viewer/RoomTopicViewer.tsx': ['PhoneHit'],
|
||||
'components/leave-room-prompt/LeaveRoomPrompt.tsx': ['PhoneHit'],
|
||||
'components/leave-space-prompt/LeaveSpacePrompt.tsx': ['PhoneHit'],
|
||||
'components/event-readers/EventReaders.tsx': ['PhoneHit'],
|
||||
'components/invite-user-prompt/InviteUserPrompt.tsx': ['PhoneHit'],
|
||||
'components/join-address-prompt/JoinAddressPrompt.tsx': ['PhoneHit'], // join cancel
|
||||
'components/user-profile/PowerChip.tsx': ['PhoneHit', 'PhoneHit'], // self demotion, shared power
|
||||
};
|
||||
|
||||
it.each(Object.entries(expected))(
|
||||
'%s: each IconButton carries its own PhoneHit class',
|
||||
(file, want) => expectPhoneHitClasses(file, want)
|
||||
);
|
||||
|
||||
it.each(Object.keys(expected))('%s: a sized variant matches the drawn size', (file) =>
|
||||
expectSizeTie(file)
|
||||
);
|
||||
});
|
||||
Loading…
Reference in a new issue