-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✅ [bento-vimeo] add e2e test (#36664)
* [bento-vimeo] add e2e test * update test description Co-authored-by: Alan Orozco <alanorozco@users.noreply.github.com> Co-authored-by: Alan Orozco <alanorozco@users.noreply.github.com>
- Loading branch information
1 parent
e572b5b
commit 5ebed63
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
describes.endtoend( | ||
'bento-vimeo', | ||
{ | ||
version: '1.0', | ||
fixture: 'bento/vimeo.html', | ||
environments: ['single'], | ||
}, | ||
(env) => { | ||
let controller; | ||
|
||
beforeEach(() => { | ||
controller = env.controller; | ||
}); | ||
|
||
it('should render a vimeo video', async () => { | ||
const element = await controller.findElement('bento-vimeo'); | ||
await controller.switchToShadowRoot(element); | ||
|
||
const iframe = await controller.findElement('iframe'); | ||
|
||
await expect(controller.getElementAttribute(iframe, 'src')).to.equal( | ||
'https://player.vimeo.com/video/23237102' | ||
); | ||
}); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Bento Vimeo</title> | ||
<meta | ||
name="viewport" | ||
content="width=device-width,minimum-scale=1,initial-scale=1" | ||
/> | ||
<script async src="https://cdn.ampproject.org/bento.js"></script> | ||
<script | ||
async | ||
src="https://cdn.ampproject.org/v0/bento-vimeo-1.0.js" | ||
></script> | ||
</head> | ||
<body> | ||
<h1>Vimeo</h1> | ||
<p> | ||
<bento-vimeo | ||
data-videoid="23237102" | ||
width="358" | ||
height="204" | ||
layout="responsive" | ||
style="height: 204px; width: 358px" | ||
> | ||
fallback message here | ||
</bento-vimeo> | ||
</p> | ||
</body> | ||
</html> |