MCPcopy
hub / github.com/ampproject/amphtml / waitForDisplayChange

Function waitForDisplayChange

test/integration/test-actions.js:29–35  ·  view source on GitHub ↗
(description, elementId, displayValue)

Source from the content-addressed store, hash-verified

27 });
28
29 async function waitForDisplayChange(description, elementId, displayValue) {
30 const element = doc.getElementById(elementId);
31 await poll(
32 description,
33 () => win.getComputedStyle(element)['display'] === displayValue
34 );
35 }
36
37 describe('"tap" event', () => {
38 it('<non-AMP element>.toggleVisibility', async () => {

Callers 1

test-actions.jsFile · 0.85

Calls 2

pollFunction · 0.90
getElementByIdMethod · 0.45

Tested by

no test coverage detected