Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add e2e test to ensure we ship with non audio/video codecs #2604

Merged
merged 9 commits into from
May 1, 2020

Conversation

karanbirsingh
Copy link
Contributor

@karanbirsingh karanbirsingh commented May 1, 2020

Description of changes

We ship with a slimmer mirrored version of electron to avoid shipping the non-freely-distributable ffmpeg codecs in the base build. This PR adds an e2e test to ensure node_modules/electron/dist has minimal audio/video capabilities, since we don't need them.

Build without mirror - test fails
Build with mirror - test passes

This test only runs in the release pipeline. The mp3 file is very short white noise.

Pull request checklist

  • Addresses an existing issue: #0000
  • Ran yarn fastpass
  • Added/updated relevant unit test(s) (and ran yarn test)
  • Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • PR title AND final merge commit title both start with a semantic tag (fix:, chore:, feat(feature-name):, refactor:). See CONTRIBUTING.md.
  • (UI changes only) Added screenshots/GIFs to description above
  • (UI changes only) Verified usability with NVDA/JAWS

@karanbirsingh karanbirsingh requested a review from a team as a code owner May 1, 2020 19:20
afterEach(async () => await appController.stop());

// https://html.spec.whatwg.org/multipage/media.html#error-codes:dom-mediaerror-media_err_src_not_supported
it('has error when loading mp3 <audio> in renderer process', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like the design of this test case; this is much cleaner than verifying file hashes like I how I'd imagined this test working initially.

Copy link
Contributor

@dbjorge dbjorge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great overall, I really like the strategy the test is using. Only 1 minor comment, approving pending comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants