Mailspring/build
Evan Morikawa 73e7c1c52e feat(tests): add integration tests
comment

Adding test harness

Using key strokes in main window test

Tests work now

Clean up argument variables

Rename list manager and get rid of old spec-helper methods

Extract out time overrides from spec-helper

Spectron test for contenteditable

fix spec exit codes and boot mode

fix(spec): cleanup N1.sh and make specs fail with exit code 1

Revert tests and get it working in window

Move to spec_integration and add window load tester

Specs pass. Console logs still in

Remove console logs

Extract N1 Launcher ready method

Make integrated unit test runner

feat(tests): adding integration tests

Summary:
The /spectron folder got moved to /spec_integration

There are now unit tests (the old ones) run via the renamed
`script/grunt run-unit-tests`

There are now integration tests run via the command `script/grunt
run-integration-tests`.

There are two types of integration tests:
1. Tests that operate on the whole app via Selenium/Chromedriver. These
tests have access to Spectron APIs but do NOT have access to any JS object
running inside the application. See the `app-boot-spec.es6` for an example
of these tests. This is tricky because we want to test the Main window,
but Spectron may latch onto any other of our loading windows. Code in
`integration-helper` give us an API that finds and loads the main window
so we can test it

2. Tests that run in the unit test suite that need Spectron to perform
integration-like behavior. These are the contentedtiable specs. The
Spectron server is accessed from the app and can be used to trigger
actions on the running app, from the app. These tests use the
windowed-test runner so Spectron can identify whether the tests have
completed, passed, or failed. Unfortunately Spectron can't access the logs
, nor the exit code of the test script thereby forcing us to parse the
HTML DOM. (Note this is still a WIP)

I also revamped the `N1.sh` file when getting the launch arguments to work
properly. It's much cleaner. We didn't need most of the data.

Test Plan: new tests

Reviewers: juan, bengotow

Differential Revision: https://phab.nylas.com/D2289

Fix composer specs

Tests can properly detect when Spectron is in the environment

Report plain text output in specs

fixing contenteditable specs

Testing slow keymaps on contenteditable specs

Move to DOm mutation

Spell as `subtree` not `subTree`
2015-12-02 13:41:14 -08:00
..
config refactor(env): new NylasEnv global 2015-11-17 16:41:20 -08:00
resources fix(redhat-spec): copy 512x512 icon to /usr/local/share/nylas/resources/app/nylas.png 2015-11-27 16:20:04 -05:00
tasks feat(tests): add integration tests 2015-12-02 13:41:14 -08:00
Gruntfile.coffee feat(tests): add integration tests 2015-12-02 13:41:14 -08:00
package.json fix(task): spec task uses Promise 2015-11-26 13:03:44 -08:00
README.md Adding node version information to build/README.md 2015-10-05 23:43:33 -07:00
run-build-and-send-screenshot.scpt fix(build-flow): Slow down the script - jenkins is slow. 2015-08-18 18:19:17 -07:00

N1 Build Environment

Node version 0.10.x (Due to the version of electron currently used.)

N1 Building and Tasks

This folder contains tasks to create production builds of N1

Tasks should not be executed from this folder, but rather from /scripts. The /scripts folder has convenient methods that fix paths and do environment checks.

Note that most of the task definitions are stored in /build/tasks

Some useful tasks

NOTE: Run all of these from the N1 root folder.

Linting:

`script/grunt lint`

Building:

`script/grunt build`

The build folder has its own package.json and is isolated so we can use npm to compile against v8's headers instead of apm