Enter your booking reference.
+ + + Help + `) + ) + expect(snapshot.elements.map((el) => el.index)).toEqual([1, 2, 3]) + expect(snapshot.elements.map((el) => el.tag)).toEqual(['input', 'button', 'a']) + expect(snapshot.text).toContain('Enter your booking reference.') + }) + + it('names elements by aria-label, text, then placeholder', () => { + const snapshot = collectInteractiveElements( + page(` + + + + `) + ) + expect(snapshot.elements.map((el) => el.name)).toEqual([ + 'Close dialog', + 'Save changes', + 'Search flights' + ]) + }) + + it('includes role-interactive elements and onclick handlers', () => { + const snapshot = collectInteractiveElements( + page(` +