Mailspring/static/jasmine.less
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

226 lines
3.3 KiB
Text

#jasmine_content {
position: fixed;
right: 100%;
}
body {
background-color: #fff;
padding: 0;
}
.spec-reporter {
font-size: 11px;
line-height: 1.6em;
color: #333;
.plain-text-output {
display: none;
}
.list-unstyled {
list-style: none;
}
.reload-button {
color: #333;
background-color: #fff;
border: 1px solid #ccc;
&:hover {
background-color: #ddd;
color: #222;
}
}
.symbol-header {
font-size: 18px;
font-weight: bold;
padding-bottom: 10px;
}
.symbol-area {
padding: 10px;
}
.symbol-summary {
overflow: hidden;
margin: 0;
li {
font-family: Monaco, Consolas, monospace;
float: left;
line-height: 10px;
height: 10px;
width: 10px;
font-size: 10px;
&.passed {
color: #5cb85c;
}
&.failed {
color: #d9534f;
}
&.skipped {
color: #f0ad4e;
}
&.pending {
color: #eee;
}
&:before {
content: "\02022";
}
}
}
.status {
font-size: 20px;
line-height: 2em;
padding: 5px;
border-radius: 0;
text-align: center;
.spec-count {
float: left;
}
.time {
float: right;
}
}
.results {
padding: 10px;
.description {
font-size: 16px;
padding: 5px 0 5px 0;
}
> .suite {
> .description {
font-size: 18px;
font-weight: bold;
}
margin-bottom: 20px;
}
.spec {
margin-top: 5px;
padding: 0 10px 10px 10px;
border-left: 3px solid #d9534f;
.spec-toggle {
// .octicon(fold);
float: right;
cursor: pointer;
opacity: 0;
color: #999;
&.folded {
// .octicon(unfold);
}
}
.spec-toggle:hover {
color: #333;
}
&:hover .spec-toggle {
opacity: 1;
}
}
.suite > .suite,
.suite > .spec {
margin-left: 10px;
}
}
.result-message {
font-size: 16px;
font-weight: bold;
color: #d9534f;
padding: 5px 0 5px 0;
}
.result-message.deprecation-message {
font-weight: normal;
color: darken(#f0ad4e, 20%);
line-height: 1.4;
a {
color: darken(#f0ad4e, 15%);
}
code {
color: darken(#f0ad4e, 20%);
background: lighten(#f0ad4e, 35%);
}
}
.stack-trace {
font-size: 12px;
margin: 5px 0 0 0;
border-radius: 2px;
line-height: 18px;
color: #666;
border: 1px solid #ddd;
overflow: auto;
}
.tooltip {
.tooltip-inner {
border: 1px solid #ccc;
background: #fff;
color: #666;
max-width: 400px;
}
&.in {
opacity: 1;
}
.tooltip-arrow {
visibility: hidden;
}
}
.result-message.fail, .stack-trace.padded {
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 10;
overflow: hidden;
&.expanded {
-webkit-line-clamp: inherit;
// overflow: hidden;
}
}
.deprecation-toggle {
// .octicon(fold);
float: right;
cursor: pointer;
opacity: 0;
color: #999;
&.folded {
// .octicon(unfold);
}
}
.deprecation-toggle:hover {
color: #333;
}
&:hover .deprecation-toggle {
opacity: 1;
}
}