-
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
132dbda
commit 39811ae
Showing
4 changed files
with
1,866 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const Application = require('spectron').Application; | ||
const assert = require('assert'); | ||
const electronPath = require('electron'); // Require Electron from the binaries included in node_modules. | ||
const path = require('path'); | ||
|
||
describe('Application launch', function () { | ||
this.timeout(10000); | ||
|
||
beforeEach(function () { | ||
this.app = new Application({ | ||
path: electronPath, | ||
args: [path.join(__dirname, '..')] | ||
}); | ||
return this.app.start(); | ||
}); | ||
|
||
afterEach(function () { | ||
if (this.app && this.app.isRunning()) { | ||
return this.app.stop(); | ||
} | ||
}); | ||
|
||
it('shows an initial window', function () { | ||
return this.app.client.getWindowCount().then(function (count) { | ||
assert.equal(count, 1); | ||
}); | ||
}); | ||
|
||
it('shows the empty page on load', function () { | ||
return this.app.client.getText('.empty-page h1') | ||
.then((text) => { | ||
assert.equal(text, 'Pennywise'); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.