Skip to content

Commit

Permalink
add e2e test for getting image from byte array (#7435)
Browse files Browse the repository at this point in the history
  • Loading branch information
EfimovVladimir authored and scottdraves committed May 28, 2018
1 parent 38acd64 commit d5169cd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/ipynb/groovy/MimeTest.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,22 @@
"Image(\"../../../doc/resources/img/widgetArch.png\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import java.nio.file.Files;\n",
"import java.nio.file.Paths;\n",
"import java.nio.file.Path;\n",
"\n",
"Path path = Paths.get(\"../../../doc/resources/img/widgetArch.png\");\n",
"byte[] bytes = Files.readAllBytes(path);\n",
"\n",
"Image(bytes)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
8 changes: 8 additions & 0 deletions test/js/groovy/mimeTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,5 +202,13 @@ describe('(Groovy) Testing of MIME types', function () {

expect(codeCell.$('div.output_subarea > img').isEnabled()).toBeTruthy();
});

it('Cell displays an image element from byte array', function () {
cellIndex += 1;

var codeCell = beakerxPO.runCodeCellByIndex(cellIndex);

expect(codeCell.$('div.output_subarea > img').isEnabled()).toBeTruthy();
});
});
});

0 comments on commit d5169cd

Please sign in to comment.