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

COMPASS-470 Add zoom in & out #741

Merged
merged 3 commits into from
Jan 12, 2017
Merged

COMPASS-470 Add zoom in & out #741

merged 3 commits into from
Jan 12, 2017

Commits on Jan 12, 2017

  1. Configuration menu
    Copy the full SHA
    9de50b8 View commit details
    Browse the repository at this point in the history
  2. Add electron-mocha main and renderer tests

    1. test/main-process/menu.zoom.test.js: Called by `npm run test-main`.
    This unit tests the menu items exist and have keyboard shortcut accelerators
    2. test/renderer-process/zoom.test.js: Called by `npm run test-renderer`
    This unit tests that calling the zoom functions call the native electron.webFrame.get/setZoomLevel functions.
    
    Architecture based on:
    http://stackoverflow.com/questions/34485182/how-to-access-remote-module-from-unit-tests
    
    Also electron-mocha was already a devDependency, we just were not using it, so let’s bump the version and use it:
    https://github.com/jprichardson/electron-mocha
    pzrq committed Jan 12, 2017
    Configuration menu
    Copy the full SHA
    6d22707 View commit details
    Browse the repository at this point in the history
  3. Hack: Move main/renderer process tests from test dir into tests dir

    So “Zoom renderer tests” do not fail:
      Zoom renderer tests
        3) should zoom reset
        4) "after each" hook for "should zoom reset"
    …
      3) Zoom renderer tests should zoom reset:
         TypeError: Cannot read property 'setZoomLevel' of undefined
          at zoomReset (src/app/menu-renderer.js:10:10)
          at Context.it (test/renderer-process/zoom.test.js:9:12)
    
      4) Zoom renderer tests "after each" hook for "should zoom reset":
         TypeError: Cannot read property 'setZoomLevel' of undefined
          at zoomReset (src/app/menu-renderer.js:10:10)
          at Context.afterEach (test/renderer-process/zoom.test.js:6:5)
    
    Also hadron-build does not support the notion of separate testing processes, just a combined one, so we’ll want to revisit this later when we can agree what should go where.
    pzrq committed Jan 12, 2017
    Configuration menu
    Copy the full SHA
    e56a9a1 View commit details
    Browse the repository at this point in the history