Skip to content

Commit

Permalink
add fixes for e2e tests (#7704)
Browse files Browse the repository at this point in the history
  • Loading branch information
EfimovVladimir authored and LeeTZ committed Jul 18, 2018
1 parent ccaca10 commit e4804ef
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 17 deletions.
15 changes: 14 additions & 1 deletion doc/groovy/Mime.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
"metadata": {},
"outputs": [],
"source": [
"Image(\"https://doggydollars.com/wp-content/uploads/2016/02/DoggyDollars-Retriever-300x300.jpg\")"
"Image(\"http://beakerx.com/static/img/twosigma.png\")"
]
},
{
Expand Down Expand Up @@ -231,6 +231,19 @@
"name": "Groovy",
"nbconverter_exporter": "",
"version": "2.4.3"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": false,
"sideBar": false,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": false,
"toc_window_display": false
}
},
"nbformat": 4,
Expand Down
15 changes: 14 additions & 1 deletion test/ipynb/groovy/MimeTest.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
"metadata": {},
"outputs": [],
"source": [
"Image(\"https://doggydollars.com/wp-content/uploads/2016/02/DoggyDollars-Retriever-300x300.jpg\")"
"Image(\"http://beakerx.com/static/img/twosigma.png\")"
]
},
{
Expand Down Expand Up @@ -210,6 +210,19 @@
"name": "Groovy",
"nbconverter_exporter": "",
"version": "2.4.3"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": false,
"sideBar": false,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": false,
"toc_window_display": false
}
},
"nbformat": 4,
Expand Down
25 changes: 18 additions & 7 deletions test/ipynb/scala/PlotScalaTest.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
"val logBase = 10\n",
"\n",
"val xs = for (i <- 0 to points) yield i / 15.0\n",
"val expys = for (x <- xs) yield Math.exp(x)\n",
"val expys = for (x <- xs) yield math.exp(x)\n",
"\n",
"val cplot = new CombinedPlot()\n",
"val logYPlot = new Plot {\n",
Expand Down Expand Up @@ -249,7 +249,7 @@
"val points = 100\n",
"val logBase = 10\n",
"val xs = for (i <- 0 to points) yield i / 15.0\n",
"val expys = for (x <- xs) yield Math.exp(x)\n",
"val expys = for (x <- xs) yield math.exp(x)\n",
"\n",
"val plot = new Plot { \n",
" title = \"Log x, Log y\"\n",
Expand Down Expand Up @@ -399,7 +399,7 @@
"val ys = List(0, 2, 4, 6, 15, 10)\n",
"val ys2 = List(-40, 50, 6, 4, 2, 0)\n",
"val ys3 = List(3, 6, 3, 6, 70, 6)\n",
"plot.add(new YAxis(\"Spread\"))\n",
"plot.add(new YAxis())\n",
"plot.add(new Line { y = ys })\n",
"plot.add(new Line { y = ys2; displayName = \"Spread\" })\n",
"\n",
Expand All @@ -411,9 +411,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": []
}
Expand All @@ -430,7 +428,20 @@
"mimetype": "",
"name": "Scala",
"nbconverter_exporter": "",
"version": "2.11.11"
"version": "2.11.12"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": false,
"sideBar": false,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": false,
"toc_window_display": false
}
},
"nbformat": 4,
Expand Down
25 changes: 23 additions & 2 deletions test/ipynb/scala/SparkScalaTest.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@
"metadata": {},
"outputs": [],
"source": [
"import scala.math.random\n",
"val NUM_SAMPLES = 10000000\n",
"\n",
"val count = spark.sparkContext.parallelize(1 to NUM_SAMPLES).map{i =>\n",
" val x = Math.random()\n",
" val y = Math.random()\n",
" val x = random\n",
" val y = random\n",
" if (x*x + y*y < 1) 1 else 0\n",
"}.reduce(_ + _)\n",
"\n",
Expand All @@ -50,6 +51,13 @@
"source": [
"spark.stop()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -65,6 +73,19 @@
"name": "Scala",
"nbconverter_exporter": "",
"version": "2.11.12"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": false,
"sideBar": false,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": false,
"toc_window_display": false
}
},
"nbformat": 4,
Expand Down
16 changes: 12 additions & 4 deletions test/ipynb/scala/SparkUI_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@
"metadata": {},
"outputs": [],
"source": [
"import scala.math.random\n",
"val NUM_SAMPLES = 10000000\n",
"\n",
"val count2 = spark.sparkContext.parallelize(1 to NUM_SAMPLES).map{i =>\n",
" val x = Math.random()\n",
" val y = Math.random()\n",
" val x = random\n",
" val y = random\n",
" if (x*x + y*y < 1) 1 else 0\n",
"}.reduce(_ + _)\n",
"\n",
Expand Down Expand Up @@ -66,7 +67,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### AutoConnect: use --connect or -c"
"### AutoConnect: use --start or -s"
]
},
{
Expand All @@ -75,8 +76,15 @@
"metadata": {},
"outputs": [],
"source": [
"%%spark --connect"
"%%spark --start"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
4 changes: 2 additions & 2 deletions test/js/groovy/tableMenuTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ describe('Testing of table Actions ', function () {
cellIndex += 2;
beakerxPO.runCodeCellByIndex(cellIndex);
var subMenu = getSubMenu(cellIndex, 1).$$('li');
expect(subMenu.length).toEqual(9);
subMenu[4].click();
expect(subMenu.length).toEqual(13);
subMenu[8].click();

var codeCell = beakerxPO.getCodeCellByIndex(cellIndex);
var canvas = codeCell.$('canvas');
Expand Down

0 comments on commit e4804ef

Please sign in to comment.