Commit graph

149 commits

Author SHA1 Message Date
Juan Tejada 6315bc9d80 fix(extension-adapter): Update adapter to support all versions of extension api we've used
Summary:
- Rewrites composer extension adpater to support all versions of the
  ComposerExtension API we've ever declared. This will allow old plugins (or
  plugins that haven't been reinstalled after update) to keep functioning
  without breaking N1
- Adds specs

Test Plan: - Unit tests

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2399
2015-12-30 15:11:37 -05:00
Dave Perdue 848fb0d688 Fix broken GNOME dock icon
This addresses an issue mentioned in Issue #465 regarding a missing icon.
2015-12-16 12:14:26 -08:00
Dave Perdue 2fc66a42fa Remove redundant path in .desktop for Linux
The install-task has two instructions that add an extra "resources" to the iconName directory and thus the icon doesn't work. The resulting nylus.desktop has an invalid path for the icon.
2015-12-16 11:59:01 -08:00
Ben Gotow 159bb51a10 fix(locales): Copy lproj files to ensure navigator.language works
See https://github.com/atom/electron/issues/2484
2015-12-15 11:34:56 -08:00
Evan Morikawa 267a339250 fix(bootstrap): split commands 2015-12-14 15:22:47 -08:00
Juan Tejada 5a8ca1ef51 add(integration-test): Adds test for onboarding flow with Exchange
Summary:
- Make sure user can log in using exchange
- Adds some test helpers for the test
- Updates eslint.json and cleans up lint errors

Test Plan: - Integration Tests

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2346
2015-12-14 15:14:58 -08:00
Ben Gotow 8ea8df8efc fix(ci): stable instead of release/* branches 2015-12-11 17:13:42 -08:00
Ben Gotow 0f67438c9f fix(ci): Publish appveyor release branch builds 2015-12-11 15:11:13 -08:00
Ben Gotow 922a9e80ec fix(ci): Publish builds on release branches 2015-12-11 14:44:53 -08:00
Ben Gotow 0e4e736607 Merge pull request #628 from mbilker/task-helper-undefined-process-env
Replace function accessor with property accessor in Grunt's task-helper script
2015-12-09 16:02:09 -08:00
Evan Morikawa a2c8145a75 bump(internal): update submodule reference 2015-12-09 18:14:01 -05:00
Evan Morikawa aef0c8a681 fix(spellcheck): check for existing languages and add tests 2015-12-09 18:10:55 -05:00
Ben Gotow 8ecf3bba3f fix(auth): Log first account creation 2015-12-08 17:05:59 -08:00
mbilker 23a2de603c fix(tests): replace () with [] for properties of process.env
This bug appeared during a Travis test run, and only appeared on
the Linux hosts running the tests. The function appears to treat
the `process.env` as a set of functions, not properties. This
commit correctly interprets them as properties.
2015-12-08 18:06:41 -05:00
Evan Morikawa d95cb45147 feat(ci): add Travis and AppVeyor ci support 2015-12-07 12:48:26 -05:00
Juan Tejada 07f81f81a6 feat(components): Add EditableList component to component-kit
Summary:
- Generic list component wich supports adding, editing and removing
string-like items or components
- Needs some css love

Test Plan: - Unit tests.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2322
2015-12-07 08:15:40 -08:00
Evan Morikawa 1fb58d5c52 feat(build): add nylas resources 2015-12-02 15:12:56 -08:00
Evan Morikawa 2f1a6c3dd8 feat(build): add nylas build resources 2015-12-02 13:59:54 -08:00
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
Ben Gotow 02633ffd57 fix(build): Temporarily disable tests on linux CI. See details
The linux CI server @ Nylas is running debian wheezy, which is too old to run N1 / Electron 0.35+. We need to switch to making the builds with Travis or https://packagecloud.io/.
2015-11-30 15:04:28 -08:00
Ben Gotow 9899de30a2 fix(specs): Remove promise usage, process.env as fn to fix node 0.10 2015-11-30 12:39:17 -08:00
mbilker e3460a7a9b fix(redhat-spec): copy 512x512 icon to /usr/local/share/nylas/resources/app/nylas.png
The icon build/resources/nylas.png is exactly the same as build/resources/linux/icons/512.png
Not confident that the spec script is run from base N1 directory to use the nylas.png in the spec file
2015-11-27 16:20:04 -05:00
mbilker e32d52ff3d fix(grunt): update location of rpm icon name 2015-11-27 15:18:46 -05:00
mbilker c46a38362f fix(fedora-spec): copy nylas icons into hicolor folder 2015-11-27 14:41:53 -05:00
Evan Morikawa 2dea234de0 fix(task): spec task uses Promise 2015-11-26 13:03:44 -08:00
Ben Gotow 72a840e1f0 rm(spectron): Don't run during CI builds, it's timeout-based and fails randomly 2015-11-25 15:06:34 -08:00
Ben Gotow 1889bfac9d Merge pull request #396 from luixal/patch-2
Allows package to be installed in ElementaryOS
2015-11-25 14:38:17 -08:00
mbilker cb0be78d1c fix(spectron): prevent execution for windows only 2015-11-24 00:17:00 -05:00
mbilker 0f20c13501 fix(spectron): typo with darwin 2015-11-23 23:34:37 -05:00
mbilker 4a8b358013 fix(spectron): reenable for Linux and choose executablePath based on platform 2015-11-23 23:31:37 -05:00
mbilker b7a7dde23a fix(travis): enable fake Xorg window to allow electron testing on Linux 2015-11-23 23:31:37 -05:00
Ben Gotow 6aeda7583b fix(spectron): Run against built version of the app to avoid timeouts 2015-11-23 18:54:42 -08:00
Evan Morikawa 669995961a fix(spec): cleanup N1.sh and make specs fail with exit code 1 2015-11-23 16:00:55 -05:00
Evan Morikawa 971089aeb0 fix(build): bail if script/bootstrap fails and enhance test output
Have the test output
2015-11-23 14:34:18 -05:00
mbilker dc29b746b2 fix(packages): remove vm-compatibility-layer
vm-compatibility-layer was designed to support obsolete APIs in node
v0.11.x of node v0.10.x. It is only used in the build Gruntfile and
nowhere else in the project.
2015-11-21 00:17:27 -05:00
Juan Tejada 091749545b fix(spectron): Update spectron setup:
- Passes new arguments to spectron.Application
- Updates setup of test suite to wait for application to boot before
specs are run
2015-11-19 12:29:03 -08:00
Juan Tejada c6b4adbcd1 ci(spectron): Add support to execute spectron/chrome-driver tests
Summary:
- Sets up spectron test suite inside its own directory and with its own
  dependencies (must run on a build of the app)
- Sets up dummy test
- Adds `run-spectron-specs` grunt task, and adds it to cibuild task
- Cleans up spec tasks code

Test Plan: - Run specs

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2256
2015-11-18 16:36:58 -08:00
Evan Morikawa 488dff0f90 refactor(env): new NylasEnv global
Converted all references of global atom to NylasEnv

Temporary rename atom.io

find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.io/temporaryAtomIoReplacement/g'

atom.config to NylasEnv.config

find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.config/NylasEnv.config/g'

atom.packages -> NylasEnv.packages

atom.commands -> NylasEnv.commands atom.getLoadSettings

find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.commands/NylasEnv.commands/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.getLoadSettings/NylasEnv.getLoadSettings/g'

More common atom methods

find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.styles/NylasEnv.styles/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.emitError/NylasEnv.emitError/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.inSpecMode/NylasEnv.inSpecMode/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.inDevMode/NylasEnv.inDevMode/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.getWindowType/NylasEnv.getWindowType/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.displayWindow/NylasEnv.displayWindow/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.quit/NylasEnv.quit/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.close/NylasEnv.close/g'

More atom method changes

find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.keymaps/NylasEnv.keymaps/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.hide/NylasEnv.hide/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.getCurrentWindow/NylasEnv.getCurrentWindow/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.menu/NylasEnv.menu/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.getConfigDirPath/NylasEnv.getConfigDirPath/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.isMainWindow/NylasEnv.isMainWindow/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.finishUnload/NylasEnv.finishUnload/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.isWorkWindow/NylasEnv.isWorkWindow/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.showSaveDialog/NylasEnv.showSaveDialog/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.append/NylasEnv.append/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.confirm/NylasEnv.confirm/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.clipboard/NylasEnv.clipboard/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.getVersion/NylasEnv.getVersion/g'

More atom renaming

Rename atom methods

More atom methods

Fix grunt config variable

Change atom.cmd to N1.cmd

Rename atom.coffee and atom.js to nylas-env.coffee nylas-env.js

Fix atom global reference in specs manually

Fix atom requires

Change engine from atom to nylas

got rid of global/nylas-env

rename to nylas-win-bootup

Fix onWindowPropsChanged to onWindowPropsReceived

fix nylas-workspace

atom-text-editor to nylas-theme-wrap

atom-text-editor -> nylas-theme-wrap

Replacing atom keyword

AtomWindow -> NylasWindow

Replace Atom -> N1

Rename atom items

nylas.asar -> atom.asar

Remove more atom references

Remove 6to5 references

Remove license exception for atom
2015-11-17 16:41:20 -08:00
Ben Gotow 0380704c41 ASAR v0.8, because apparently 0.5 can skip files 2015-11-16 10:02:31 -08:00
Christine Spang 3b1b43a3d0 Merge pull request #301 from nicholascapo/update-libgcrypt-dependency
Update debian package libgcrypt dependency
2015-11-11 15:43:39 -08:00
Luis Alberto Pérez García ce3d5c51d1 Allows package to be installed in ElementaryOS
Changes the condition for detecting the distro name so ElementaryOS (ubuntu based) goes as an Ubuntu and the package installs.
2015-11-11 21:28:03 +01:00
Evan Morikawa 58873e81ea fix(keymap): run cmdctrl preprocessor on build too 2015-11-09 15:09:04 -05:00
Ben Gotow 6a79bc58dc fix(deps): Go away git-utils, we never used you anyway 2015-11-07 18:05:24 -08:00
Ben Gotow e64e6e526d fix(babel): Roll back to babel@5, see details
- move babelrc to static so that it can be used during the build process and also whenever the app is transpiling things on the fly.
- move babel back to version 5, which is compatible with `apm install`. (babel 6 seems to require the "dedupe" behavior of NPM3)
- update harmony-collections to use an unpublished commit that fixes the "WeakMap is not generic" issue
2015-11-07 14:27:18 -08:00
Juan Tejada 2e3ab31952 Update grunt tasks to lint and transpile es6 code using babel
Summary: - Linter uses predefined rules for ES6 and React from airbnb

Test Plan: - Manuel

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2242
2015-11-06 17:40:42 -08:00
Ben Gotow 77b62c594e fix(win10): Add more resolutions to the windows .ico
Fixes #351
2015-11-06 12:24:24 -08:00
Ben Gotow 88e7f4cc4e fix(packaging): Resolve codesign issue on 10.11 due to bad symlink 2015-10-30 15:27:39 -07:00
Nicholas Capo 23e9772471 Update debian package libgcrypt dependency
* Package libgcrypt11 is no longer available in Debian or Ubuntu
* Allow installing the package with libgcrypt20 instead
2015-10-29 21:00:49 -05:00
Asher Wood fca5db4e45 Merge pull request #240 from Zeklandia/master
commit fc34b1fcb08a6f4a84e20c42eb2c6fd0952cf73a
Author: Ben Gotow <bengotow@gmail.com>
Date:   Thu Oct 29 13:37:59 2015 -0700

    Revert one small capitalization change on Windows

commit c4b30c9b84166bd8847c83b748da316f8861650e
Author: Ben Gotow <bengotow@gmail.com>
Date:   Thu Oct 29 12:56:32 2015 -0700

    Fix one remaining uppercase Nylas, remove unneeded build task

commit 1767341a36bd20990f884c636da236454fbf3761
Author: Asher Wood <awood5659@gmail.com>
Date:   Thu Oct 29 10:34:47 2015 -0700

    Update list of supported OSes

commit 2bac5a7e1c30ca63ae7be0d679b2a61a032449f9
Author: Asher Wood <awood5659@gmail.com>
Date:   Thu Oct 29 10:30:53 2015 -0700

    Nylas --> nylas

commit 19eed9bf096819df3588d82a4307770c1069c366
Author: Asher Wood <awood5659@gmail.com>
Date:   Thu Oct 29 10:17:55 2015 -0700

    Change '../Nylas' to `../nylas`

commit 9c7cba6ea29652d0d1544d51c387861984bc511a
Author: Asher Wood <awood5659@gmail.com>
Date:   Tue Oct 27 21:33:29 2015 -0700

    More uppercase/lowercase confusion. The icon is still not in the right place after install, but at least Nylas will open.

commit 30510f6978364398b7917917369b3f011b533606
Author: Asher Wood <awood5659@gmail.com>
Date:   Tue Oct 27 21:06:33 2015 -0700

    Fixed building rpms
    Many file paths had had `/usr/local/share/nylas` instead of `/usr/local/share/Nylas`
2015-10-29 13:46:47 -07:00
Ben Gotow 537b23d08b fix(cibuild): unlinkSync => rmdirSync 2015-10-27 18:45:59 -07:00