We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
name
1 parent 59a6c95 commit ee5fc9cCopy full SHA for ee5fc9c
test/standalone/index.test.ts
@@ -78,6 +78,15 @@ describe('lib/index.ts', () => {
78
expect(text).toEqual('Hello h2')
79
})
80
81
+ test('should handle the getBy* methods with a regex name', async () => {
82
+ const document = await getDocument(page)
83
+ const element = await queries.getByRole(document, 'button', {name: /getBy.*Test/})
84
+
85
+ const text = await page.evaluate(el => el.textContent, element)
86
87
+ expect(text).toEqual('getByRole Test')
88
+ })
89
90
it('attaches `getNodeText`', async () => {
91
const document = await getDocument(page)
92
const element = await queries.getByText(document, 'Hello h1')
0 commit comments