assertThumbnailRoute();
resolveAndUnresolveDetectedObject();
}
private void importImageAndPublishAsUser1() throws ApiException, IOException {
LumifyApi lumifyApi = login(USERNAME_TEST_USER_1);
addUserAuth(lumifyApi, USERNAME_TEST_USER_1, "auth1");
InputStream imageResourceStream = UploadImageFileIntegrationTest.class.getResourceAsStream("/io/lumify/it/sampleImage.jpg");
ClientApiArtifactImportResponse artifact = lumifyApi.getVertexApi().importFiles(
new VertexApiExt.FileForImport("auth1", "sampleImage.jpg", imageResourceStream));
assertEquals(1, artifact.getVertexIds().size());
artifactVertexId = artifact.getVertexIds().get(0);
assertNotNull(artifactVertexId);
lumifyTestCluster.processGraphPropertyQueue();
ClientApiElement vertex = lumifyApi.getVertexApi().getByVertexId(artifactVertexId);
boolean foundTesseractText = false;
for (ClientApiProperty prop : vertex.getProperties()) {
LOGGER.info(prop.toString());
if (LumifyProperties.TEXT.getPropertyName().equals(prop.getName()) || MediaLumifyProperties.VIDEO_TRANSCRIPT.getPropertyName().equals(prop.getName())) {
String highlightedText = lumifyApi.getVertexApi().getHighlightedText(artifactVertexId, prop.getKey());
LOGGER.info("highlightedText: %s: %s", prop.getKey(), highlightedText);
if (prop.getKey().startsWith(TesseractGraphPropertyWorker.TEXT_PROPERTY_KEY)) {
assertTrue("invalid tesseract text", highlightedText.contains("WORLD SERIES GAME 7"));
foundTesseractText = true;
}
}
}
assertTrue("could not find TesseractText", foundTesseractText);
assertPublishAll(lumifyApi, 41);
lumifyApi.logout();
}