MCPcopy
hub / github.com/hotwired/turbo / nextAttributeMutationNamed

Function nextAttributeMutationNamed

src/tests/helpers/page.js:155–167  ·  view source on GitHub ↗
(page, elementId, attributeName)

Source from the content-addressed store, hash-verified

153}
154
155export async function nextAttributeMutationNamed(page, elementId, attributeName) {
156 let record
157 const startTime = new Date()
158 while (!record) {
159 if (new Date() - startTime > timeout) {
160 throw new Error(`Element ${elementId}'s ${attributeName} attribute mutation didn't occur within ${timeout}ms`)
161 }
162 const records = await readMutationLogs(page, 1)
163 record = records.find(([name, id]) => name == attributeName && id == elementId)
164 }
165 const attributeValue = record[2]
166 return attributeValue
167}
168
169export async function noNextAttributeMutationNamed(page, elementId, attributeName) {
170 const records = await readMutationLogs(page, 1)

Callers 5

frame_tests.jsFile · 0.90
loading_tests.jsFile · 0.90

Calls 2

readMutationLogsFunction · 0.85
findMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…