ampproject / ampproject/amphtml
Consolidate style for 3p video player tests
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
3p video tests copy boilerplate across in inconsistent ways. They can be simpler since they follow the same initializing pattern, **consolidate style to reflect flow**:
1. Create an `` element.
1.1. This is configured by attributes (`createElementWithAttributes`)
2. Wait for its implementation to create an `` with a certain URL scheme.
2.1. This should probably be changed to a local blank document URL (#31785).
3. Messages are mocked by triggering an internal handler.
**Additionally:**
- Remove oddities like `opt_responsive` (use attributes instead)
- Name consistently, like `element`, `iframe` instead of e.g. `youtube`, `youtubeIframe`.
- Use `async/await` throughout.
### Progress
- [ ] amp-3q-player
- [ ] amp-brid-player
- [ ] amp-brightcove
- [ ] amp-dailymotion
- [ ] amp-delight-player
- [ ] amp-gfycat
- [ ] amp-jwplayer
- [ ] amp-minute-media-player
- [ ] amp-mowplayer
- [ ] amp-nexxtv-player
- [ ] amp-ooyala-player
- [ ] amp-powr-player
- [ ] amp-redbull-player
- [ ] amp-vimeo
- [ ] amp-viqeo-player
- [ ] amp-wistia-player
- [ ] amp-youtube
Contributor guide
Research direction
Search for the tests for the listed amp-* players and compare their initialization patterns. Refactor them to use configured attributes, consistent element and iframe names, mocked internal handlers, and async/await; review issue #31785 for the iframe URL change. Done means the checklist is complete and the affected tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100