diff --git a/src/components/__tests__/list-avatar-select.test.ts b/src/components/__tests__/list-avatar-select.test.ts new file mode 100644 index 00000000..49decb60 --- /dev/null +++ b/src/components/__tests__/list-avatar-select.test.ts @@ -0,0 +1,17 @@ +import { describe, expect, it } from 'vitest'; +import fs from 'node:fs'; +import path from 'node:path'; + +// Selecting mail needed a long press; native #91 asks for a tap on the +// left side, as the webmail's avatar does. + +describe('list row avatar (#91)', () => { + it('toggles the row into the selection on a tap', () => { + const src = fs.readFileSync(path.resolve(__dirname, '../../screens/EmailListScreen.tsx'), 'utf8'); + const avatar = src.slice(src.indexOf('{density.showAvatar && ('), src.indexOf('{/* Content */}')); + expect(avatar).toMatch(/ )} {density.showAvatar && ( - + // A tap on the avatar picks the row and starts selection mode, like + // a long press (#91). + + + )} {/* Content */}