Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Spectron testing suite #1553

Merged
merged 44 commits into from
Feb 1, 2017
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
9a9ae7b
Spectron iteration
evertonfraga Dec 19, 2016
fd26841
Updating spectron
evertonfraga Dec 19, 2016
4d03260
Creating switch for mist.lokidb for automated tests
evertonfraga Dec 20, 2016
43ebaf3
Adding chai-as-expected
evertonfraga Dec 22, 2016
4482a2c
Changing IPC flag
evertonfraga Dec 22, 2016
a69f944
Pairing spectron and electron versions
evertonfraga Dec 29, 2016
a13fe1a
[ESLint] Minor fixes
evertonfraga Jan 2, 2017
9e55aa6
Adding chai-string
evertonfraga Jan 4, 2017
380d6fa
Couple of tests passing
evertonfraga Jan 4, 2017
3c7a403
update .eslintrc.yml
Jan 6, 2017
e33638e
Simplifying code
evertonfraga Jan 10, 2017
0dfeef3
Removing delay in favor of better window management
evertonfraga Jan 13, 2017
8c2bb3a
Adding tests for URL bar
evertonfraga Jan 13, 2017
a6e30ad
Focusing window before each test
evertonfraga Jan 13, 2017
9fca756
Minor fixes
evertonfraga Jan 16, 2017
38e4943
Improving mist setup and teardown
evertonfraga Jan 16, 2017
de9c50e
Fixing wallet test
evertonfraga Jan 16, 2017
a14f8d0
adding html fixture
evertonfraga Jan 17, 2017
e021dcb
Improving test helpers
evertonfraga Jan 17, 2017
04510e5
Tests for ETH-01-002
evertonfraga Jan 17, 2017
155aec6
Updating tests
evertonfraga Jan 17, 2017
65b1379
Starting local HTTP server to deal with html fixtures
evertonfraga Jan 19, 2017
bf44704
Updating tests setup
evertonfraga Jan 23, 2017
58c4a63
Adding more tests
evertonfraga Jan 23, 2017
dd3f299
Updating travis file to run spectron tests
evertonfraga Jan 24, 2017
0cb40e6
Refactoring tests
evertonfraga Jan 26, 2017
8990b40
Tests for ETH-01-007
evertonfraga Jan 26, 2017
c78bc39
Downloading geth on the fly
evertonfraga Jan 30, 2017
5981ef5
Fine-tuning geth download during tests
evertonfraga Jan 30, 2017
7885ded
Merge branch 'develop' into ev_spectron
evertonfraga Jan 30, 2017
d965c42
Changing linux binary dir
evertonfraga Jan 30, 2017
18f9bf8
Fixing binary path on linux
evertonfraga Jan 30, 2017
86b45d9
Travis debug
evertonfraga Jan 30, 2017
6f49db9
Travis debug
evertonfraga Jan 30, 2017
5ad3883
Changing fixtures
evertonfraga Jan 30, 2017
5ebbe40
Fixing tests
evertonfraga Jan 30, 2017
862aee0
Fixing travis file
evertonfraga Jan 30, 2017
fc87c3d
More tests
evertonfraga Jan 30, 2017
cc20517
Adjusting timeouts
evertonfraga Jan 31, 2017
a9f96ae
Adjusting GULP_PLATFORM test env variable
evertonfraga Jan 31, 2017
73125b0
Adjusting timeouts
evertonfraga Jan 31, 2017
8eb4b9d
Disabling some tests for now
evertonfraga Jan 31, 2017
bc74c42
Merge branch 'develop' into ev_spectron
evertonfraga Jan 31, 2017
3637838
Disabling a test
evertonfraga Feb 1, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updating tests
  • Loading branch information
evertonfraga committed Jan 17, 2017
commit 155aec6a0b54aaf3fac32f30c7be557d1c384910
23 changes: 11 additions & 12 deletions tests/mist/basic.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ test['Sanity Check: main window is focused'] = function* () {
test['Browser bar should render urls with separators'] = function* () {
const client = this.client;

yield client.setValue('#url-input', 'http://example.com/page1/page2?param=value#hash');
yield client.setValue('#url-input', 'http://localhost:8080/page1/page2?param=value#hash');
yield client.submitForm('form.url');

yield client.waitUntil(() => {
return client.getText('.url-breadcrumb').then((e) => {
console.log('e', e);

return e === 'http://example.com ▸ page1 ▸ page2';
return e === 'http://localhost:8080 ▸ page1 ▸ page2';
});
}, 5000, 'expected breadcrumb to render as HTML encoded');
}, 2000, 'expected breadcrumb to render as HTML encoded');

(yield client.getText('.url-breadcrumb')).should.eql('http://localhost:8080 ▸ page1 ▸ page2');
};

test['Browser bar should not render script tags on breadcrumb view'] = function* () { // ETH-01-001
Expand All @@ -43,10 +43,9 @@ test['Browser bar should not render script tags on breadcrumb view'] = function*
return client.getText('.url-breadcrumb').then((e) => {
console.log('e', e);

// HTML encoded version of input
return e === '%3Cscript%3Ealert%28%29%3C ▸ script%3E';
});
}, 5000, 'expected breadcrumb to render as HTML encoded');
}, 2000, 'expected breadcrumb to render as HTML encoded');

should.exist(yield this.getUiElement('form.url'));
should.not.exist(yield this.getUiElement('form.url script'));
Expand All @@ -61,9 +60,10 @@ test['Browser bar should not render script tags in disguise on breadcrumb view']
yield client.waitUntil(() => {
return client.getText('.url-breadcrumb').then((e) => {
console.log('e', e);

return e === '%3Cscript%3Ealert%28%29%3C ▸ script%3E';
});
}, 5000, 'expected breadcrumb to render as HTML encoded');
}, 2000, 'expected breadcrumb to render as HTML encoded');

should.not.exist(yield this.getUiElement('form.url script'));
};
Expand All @@ -80,7 +80,7 @@ test['Browser bar should not render script tags in disguise (2) on breadcrumb vi

return e === '%3Csvg%3E%3Cscript%3Ealert%28%29%3C ▸ script%3E%3C ▸ svg%3E';
});
}, 5000, 'expected breadcrumb to render as HTML encoded');
}, 2000, 'expected breadcrumb to render as HTML encoded');

should.exist(yield this.getUiElement('form.url'));
should.not.exist(yield this.getUiElement('form.url svg'));
Expand All @@ -97,7 +97,7 @@ test['Browser bar should not render arbitrary code as HTML'] = function* () { //
return client.getText('.url-breadcrumb', (e) => {
return e === '%3Ciframe onload="alert%28%29%"%3E';
});
}, 5000, 'expected breadcrumb to render as HTML encoded');
}, 2000, 'expected breadcrumb to render as HTML encoded');
};

test['Browser bar should not execute JS'] = function* () { // ETH-01-001
Expand All @@ -117,10 +117,9 @@ test['Should select Wallet and Browse tabs properly'] = function* () {
const client = this.client;

const walletTab = yield this.selectTab('wallet');
// walletTab.getAttribute('')
};

test['Check disallowed protocols'] = function* () {
test['Load fixture page'] = function* () {
const client = this.client;

yield this.loadFixture();
Expand Down