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

Function checkElementUpgrade

test/integration/test-extensions-loading.js:6–14  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

4
5// Checks if an amp element gets upgraded.
6function checkElementUpgrade(element) {
7 expect(element).to.have.class('i-amphtml-element');
8 expect(element).to.have.class('i-amphtml-layout-responsive');
9 expect(element).to.have.class('i-amphtml-layout-size-defined');
10 expect(element).to.not.have.class('amp-notbuilt');
11 expect(element).to.not.have.class('i-amphtml-notbuilt');
12 expect(element).to.not.have.class('amp-unresolved');
13 expect(element).to.not.have.class('i-amphtml-unresolved');
14}
15
16/**
17 * Check all elements in the fixture are upgraded correctly.

Callers 1

testLoadOrderFixtureFunction · 0.70

Calls 1

expectFunction · 0.85

Tested by

no test coverage detected