@Test public void testRefresh() { doNothing().when(view).setTimeout(any(), anyInt()); when(buttonsVisibilitySupplier.isButtonsVisible()).thenReturn(true); view.refresh(); verify(downloadButtonClassList, never()).add(HiddenHelper.HIDDEN_CSS_CLASS); verify(printButtonClassList, never()).add(HiddenHelper.HIDDEN_CSS_CLASS); verify(buttonsVisibilitySupplier).isButtonsVisible(); verify(view).refreshDocumentationHTML(); verify(view).refreshDocumentationHTMLAfter200ms(); }
@Override public DocumentationView<Diagram> refresh() { refreshDocumentationHTML(); refreshDocumentationHTMLAfter200ms(); if (!buttonsVisibilitySupplier.isButtonsVisible()) { hide(printButton); hide(downloadHtmlFile); } return this; }
DMNDocumentationView extends DefaultDiagramDocumentationView { @Override public DocumentationView<Diagram> refresh() { refreshDocumentationHTML(); refreshDocumentationHTMLAfter200ms(); if (!buttonsVisibilitySupplier.isButtonsVisible()) { hide(printButton); hide(downloadHtmlFile); } return this; } }
DMNDocumentationView extends DefaultDiagramDocumentationView { @Override public DocumentationView<Diagram> refresh() { refreshDocumentationHTML(); refreshDocumentationHTMLAfter200ms(); if (!buttonsVisibilitySupplier.isButtonsVisible()) { hide(printButton); hide(downloadHtmlFile); } return this; } @Inject  DMNDocumentationView(final HTMLDivElement documentationPanel,
                                final HTMLDivElement documentationContent,
                                final HTMLButtonElement printButton,
                                final HTMLButtonElement downloadHtmlFile,
                                final PrintHelper printHelper,
                                final DMNDocumentationService documentationService,
                                final HTMLDownloadHelper downloadHelper,
                                final DMNDocumentationViewButtonsVisibilitySupplier buttonsVisibilitySupplier); }
DMNDocumentationView extends DefaultDiagramDocumentationView { @Override public DocumentationView<Diagram> refresh() { refreshDocumentationHTML(); refreshDocumentationHTMLAfter200ms(); if (!buttonsVisibilitySupplier.isButtonsVisible()) { hide(printButton); hide(downloadHtmlFile); } return this; } @Inject  DMNDocumentationView(final HTMLDivElement documentationPanel,
                                final HTMLDivElement documentationContent,
                                final HTMLButtonElement printButton,
                                final HTMLButtonElement downloadHtmlFile,
                                final PrintHelper printHelper,
                                final DMNDocumentationService documentationService,
                                final HTMLDownloadHelper downloadHelper,
                                final DMNDocumentationViewButtonsVisibilitySupplier buttonsVisibilitySupplier); @Override DocumentationView<Diagram> refresh(); @Override boolean isEnabled(); @EventHandler("print-button") void onPrintButtonClick(final ClickEvent e); @EventHandler("download-html-file") void onDownloadHtmlFile(final ClickEvent e); }
DMNDocumentationView extends DefaultDiagramDocumentationView { @Override public DocumentationView<Diagram> refresh() { refreshDocumentationHTML(); refreshDocumentationHTMLAfter200ms(); if (!buttonsVisibilitySupplier.isButtonsVisible()) { hide(printButton); hide(downloadHtmlFile); } return this; } @Inject  DMNDocumentationView(final HTMLDivElement documentationPanel,
                                final HTMLDivElement documentationContent,
                                final HTMLButtonElement printButton,
                                final HTMLButtonElement downloadHtmlFile,
                                final PrintHelper printHelper,
                                final DMNDocumentationService documentationService,
                                final HTMLDownloadHelper downloadHelper,
                                final DMNDocumentationViewButtonsVisibilitySupplier buttonsVisibilitySupplier); @Override DocumentationView<Diagram> refresh(); @Override boolean isEnabled(); @EventHandler("print-button") void onPrintButtonClick(final ClickEvent e); @EventHandler("download-html-file") void onDownloadHtmlFile(final ClickEvent e);  }