/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/e2e/test-amp-bind-email.js
49 строк
2 KB
Kristofer Baxter
♻️ Remove Notice from JS and Markdown (#35717)
19 авг 2021, 21:21
Не верифицирован
19 авг 2021, 21:21
f564b7e
Код
Авторство
О чём код?
describes.endtoend( 'amp-bind', { fixture: 'amp-bind/bind-amp4email.html', }, (env) => { let controller; beforeEach(() => { controller = env.controller; }); // The only difference in amp4email is that URL attributes cannot be bound. // TODO(choumx): fails in shadow env when using shadow-v0.js but succeeds when using amp-shadow.js describe('amp4email', () => { it.configure() .skipShadowDemo() .run('should NOT allow mutation of a[href]', async () => { const button = await controller.findElement('#changeHrefButton'); const a = await controller.findElement('#anchorElement'); await expect(controller.getElementAttribute(a, 'href')).to.equal( 'https://foo.com' ); await controller.click(button); await expect(controller.getElementAttribute(a, 'href')).to.equal( 'https://foo.com' ); }); it.configure() .skipShadowDemo() .run('should NOT allow mutation of img[src]', async () => { const button = await controller.findElement('#changeImgSrcButton'); const image = await controller.findElement('#image'); await expect(controller.getElementAttribute(image, 'src')).to.equal( 'https://foo.com/foo.jpg' ); await controller.click(button); await expect(controller.getElementAttribute(image, 'src')).to.equal( 'https://foo.com/foo.jpg' ); }); }); } );