Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit 971ca7f

Browse files
committed
Move scala tests to own file and skip scala tests on jupyter_4.2
(c) Copyright IBM Corp. 2016
1 parent ca5d610 commit 971ca7f

File tree

5 files changed

+72
-66
lines changed

5 files changed

+72
-66
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ all: init
400400
PYTHON=python2 $(MAKE) install
401401
@BASEURL=$(BASEURL) BROWSER_LIST="$(BROWSER_LIST)" $(MAKE) system-test
402402
@BASEURL=$(BASEURL) BROWSER_LIST="$(BROWSER_LIST)" PYTHON=python2 $(MAKE) system-test
403-
@BASEURL=$(BASEURL) BROWSER_LIST="$(BROWSER_LIST)" JUPYTER=_4.2 SPECS="${shell find system-test/ -name '*specs.js' -maxdepth 1 | grep -v 'urth-r'}" $(MAKE) system-test
403+
@BASEURL=$(BASEURL) BROWSER_LIST="$(BROWSER_LIST)" JUPYTER=_4.2 SPECS="${shell find system-test/ -name '*specs.js' -maxdepth 1 | grep -v 'urth-r' | grep -v 'urth-scala'}" $(MAKE) system-test
404404
$(MAKE) dist/docs
405405

406406
release: EXTRA_OPTIONS=-e PYPI_USER=$(PYPI_USER) -e PYPI_PASSWORD=$(PYPI_PASSWORD)

etc/notebooks/tests/Walkthrough-Scala.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@
4444
"outputs": [],
4545
"source": [
4646
"// modify to IP and Port of this notebook server\n",
47-
"%addjar http://localhost:8888/nbextensions/urth_widgets/urth-widgets.jar"
47+
"%addjar http://localhost:8888/nbextensions/declarativewidgets/urth-widgets.jar"
4848
]
4949
},
5050
{
5151
"cell_type": "code",
5252
"execution_count": null,
5353
"metadata": {
54-
"collapsed": true
54+
"collapsed": false
5555
},
5656
"outputs": [],
5757
"source": [
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// Copyright (c) Jupyter Development Team.
2+
// Distributed under the terms of the Modified BSD License.
3+
4+
var wd = require('wd');
5+
var Boilerplate = require('./utils/boilerplate');
6+
var boilerplate = new Boilerplate();
7+
8+
process.env.PYTHON != "python2" && describe('Widgets Scala System Test', function() {
9+
boilerplate.setup(this.title, '/notebooks/tests/Walkthrough-Scala.ipynb', 10);
10+
11+
var timeout = 30000;
12+
13+
it('should print the correct variable that is used for urth-core-function', function(done) {
14+
15+
boilerplate.browser
16+
.elementsByCssSelector('div.code_cell').nth(5)
17+
.elementByXPath('//button[text()="invoke"]').click()
18+
.waitForElementById('test1', wd.asserters.textInclude('world'), timeout)
19+
.nodeify(done);
20+
});
21+
22+
it('should bind variable to channel a', function(done) {
23+
boilerplate.browser
24+
.elementsByCssSelector('div.code_cell').nth(6)
25+
.elementByCssSelector('>', 'input')
26+
.type('A')
27+
.waitForElementById('test2', wd.asserters.textInclude('A'), timeout)
28+
.nodeify(done);
29+
});
30+
31+
it('should bind variable to channel b', function(done) {
32+
boilerplate.browser
33+
.elementsByCssSelector('div.code_cell').nth(7)
34+
.elementByCssSelector('>', 'input')
35+
.type('B')
36+
.waitForElementById('test3', wd.asserters.textInclude('B'), timeout)
37+
.nodeify(done);
38+
});
39+
40+
it('should bind variables to channels independently', function(done) {
41+
boilerplate.browser
42+
.elementsByCssSelector('div.code_cell').nth(6)
43+
.elementByCssSelector('>', 'input')
44+
.type('2')
45+
.elementByCssSelector('#test2')
46+
.text().should.eventually.include('A2')
47+
.waitForElementById('test2', wd.asserters.textInclude('A2'), timeout)
48+
.waitForElementById('test3', wd.asserters.textInclude('B'), timeout)
49+
.nodeify(done);
50+
});
51+
52+
it('should watch for changes in a watched variable', function(done) {
53+
boilerplate.browser
54+
.elementByXPath('//button[text()="initChannelWatch"]').click()
55+
.elementsByCssSelector('div.code_cell').nth(8)
56+
.elementByCssSelector('>', 'input')
57+
.type('watched message')
58+
.waitForElementById('test4', wd.asserters.textInclude('watched message'), timeout)
59+
.nodeify(done);
60+
});
61+
62+
it('should update output when DataFrame is modified and set to auto', function(done) {
63+
boilerplate.browser
64+
.elementsByCssSelector('div.code_cell').nth(14)
65+
.waitForElementByClassName('test5', wd.asserters.textInclude('Richard Roe'), timeout)
66+
.nodeify(done);
67+
});
68+
});

system-test/urth-system-test-specs.js

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -79,66 +79,4 @@ describe('Widgets Python System Test', function() {
7979
.waitForElementsByCssSelector(ipySlider, wd.asserters.isDisplayed, 10000)
8080
.nodeify(done);
8181
});
82-
});
83-
84-
process.env.PYTHON != "python2" && describe('Widgets Scala System Test', function() {
85-
boilerplate.setup(this.title, '/notebooks/tests/Walkthrough-Scala.ipynb', 10);
86-
87-
var timeout = 30000;
88-
89-
it('should print the correct variable that is used for urth-core-function', function(done) {
90-
91-
boilerplate.browser
92-
.elementsByCssSelector('div.code_cell').nth(5)
93-
.elementByXPath('//button[text()="invoke"]').click()
94-
.waitForElementById('test1', wd.asserters.textInclude('world'), timeout)
95-
.nodeify(done);
96-
});
97-
98-
it('should bind variable to channel a', function(done) {
99-
boilerplate.browser
100-
.elementsByCssSelector('div.code_cell').nth(6)
101-
.elementByCssSelector('>', 'input')
102-
.type('A')
103-
.waitForElementById('test2', wd.asserters.textInclude('A'), timeout)
104-
.nodeify(done);
105-
});
106-
107-
it('should bind variable to channel b', function(done) {
108-
boilerplate.browser
109-
.elementsByCssSelector('div.code_cell').nth(7)
110-
.elementByCssSelector('>', 'input')
111-
.type('B')
112-
.waitForElementById('test3', wd.asserters.textInclude('B'), timeout)
113-
.nodeify(done);
114-
});
115-
116-
it('should bind variables to channels independently', function(done) {
117-
boilerplate.browser
118-
.elementsByCssSelector('div.code_cell').nth(6)
119-
.elementByCssSelector('>', 'input')
120-
.type('2')
121-
.elementByCssSelector('#test2')
122-
.text().should.eventually.include('A2')
123-
.waitForElementById('test2', wd.asserters.textInclude('A2'), timeout)
124-
.waitForElementById('test3', wd.asserters.textInclude('B'), timeout)
125-
.nodeify(done);
126-
});
127-
128-
it('should watch for changes in a watched variable', function(done) {
129-
boilerplate.browser
130-
.elementByXPath('//button[text()="initChannelWatch"]').click()
131-
.elementsByCssSelector('div.code_cell').nth(8)
132-
.elementByCssSelector('>', 'input')
133-
.type('watched message')
134-
.waitForElementById('test4', wd.asserters.textInclude('watched message'), timeout)
135-
.nodeify(done);
136-
});
137-
138-
it('should update output when DataFrame is modified and set to auto', function(done) {
139-
boilerplate.browser
140-
.elementsByCssSelector('div.code_cell').nth(14)
141-
.waitForElementByClassName('test5', wd.asserters.textInclude('Richard Roe'), timeout)
142-
.nodeify(done);
143-
});
14482
});

system-test/utils/boilerplate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Boilerplate.prototype.setup = function(testName, startingURL, outputCount){
110110
.waitForElementByLinkText("Run Cells", wd.asserters.isDisplayed, 10000)
111111
.elementByLinkText("Run Cells")
112112
.click()
113-
.sleep(5000);
113+
.sleep(3000);
114114
resolve(newElement);
115115
});
116116
}

0 commit comments

Comments
 (0)