use of com.github.mvysny.kaributesting.v8.LocatorJ._find in project ANNIS by korpling.
the class EmbeddedVisTest method invalidRemoteSaltUrlScheme.
@Test
void invalidRemoteSaltUrlScheme() throws Exception {
EmbeddedVisUI ui = (EmbeddedVisUI) UI.getCurrent();
MockRequest request = MockVaadinKt.getMock(VaadinRequest.getCurrent());
request.setParameter("embedded_salt", "file://example.com/does-not-exist.salt");
ui.attachToPath("/embeddedvis/raw_text", VaadinRequest.getCurrent());
awaitCondition(60, () -> !_find(Label.class, spec -> spec.withPredicate(l -> l.getContentMode() == ContentMode.HTML && l.getValue().startsWith("<h1>"))).isEmpty());
Label labelMessage = _get(Label.class);
assertEquals("<h1>Could not generate the visualization.</h1><div>Expected URL scheme 'http' or 'https' but was 'file'</div>", labelMessage.getValue());
}
Aggregations