MCPcopy Create free account
hub / github.com/TanStack/ai / fillPrompt

Function fillPrompt

testing/e2e/tests/helpers.ts:162–173  ·  view source on GitHub ↗
(page: Page, text: string)

Source from the content-addressed store, hash-verified

160}
161
162export async function fillPrompt(page: Page, text: string) {
163 const input = page.getByTestId('prompt-input')
164 await input.click()
165 await input.fill(text)
166 await input.dispatchEvent('input', { bubbles: true })
167 // If fill() didn't trigger React onChange, fall back to pressSequentially
168 const btn = page.getByTestId('generate-button')
169 if (await btn.isDisabled()) {
170 await input.clear()
171 await input.pressSequentially(text, { delay: 30 })
172 }
173}
174
175export async function fillTextInput(page: Page, text: string) {
176 const input = page.getByTestId('text-input')

Callers 6

video-gen.spec.tsFile · 0.90
image-gen.spec.tsFile · 0.90
audio-gen.spec.tsFile · 0.90

Calls 1

clearMethod · 0.65

Tested by

no test coverage detected