@@ -0,0 +1,2427 @@
+package org.corpus_tools.annis.gui.admin;%0A%0Aimport static com.github.mvysny.kaributesting.v8.LocatorJ._click;%0Aimport static com.github.mvysny.kaributesting.v8.LocatorJ._get;%0Aimport static org.junit.jupiter.api.Assertions.assertEquals;%0A%0Aimport com.github.mvysny.kaributesting.v8.MockVaadin;%0Aimport com.vaadin.spring.internal.UIScopeImpl;%0Aimport com.vaadin.ui.Button;%0Aimport com.vaadin.ui.TabSheet;%0Aimport java.io.IOException;%0Aimport net.jcip.annotations.NotThreadSafe;%0Aimport org.corpus_tools.annis.gui.AnnisUI;%0Aimport org.corpus_tools.annis.gui.SingletonBeanStoreRetrievalStrategy;%0Aimport org.corpus_tools.annis.gui.admin.reflinks.MigrationPanel;%0Aimport org.corpus_tools.annis.gui.admin.reflinks.ReferenceLinkEditor;%0Aimport org.junit.jupiter.api.AfterEach;%0Aimport org.junit.jupiter.api.BeforeEach;%0Aimport org.junit.jupiter.api.Test;%0Aimport org.springframework.beans.factory.BeanFactory;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.boot.test.context.SpringBootTest;%0Aimport org.springframework.test.context.ActiveProfiles;%0Aimport org.springframework.test.context.web.WebAppConfiguration;%0A%0A@SpringBootTest%0A@ActiveProfiles(%7B%22desktop%22, %22test%22, %22headless%22%7D)%0A@WebAppConfiguration%0A@NotThreadSafe%0Aclass AdminViewTest %7B%0A%0A%0A  @Autowired%0A  private BeanFactory beanFactory;%0A%0A  private AnnisUI ui;%0A%0A%0A%0A  @BeforeEach%0A  void setup() throws IOException %7B%0A    UIScopeImpl.setBeanStoreRetrievalStrategy(new SingletonBeanStoreRetrievalStrategy());%0A    this.ui = beanFactory.getBean(AnnisUI.class);%0A%0A    MockVaadin.setup(() -%3E ui);%0A%0A    _click(_get(Button.class, spec -%3E spec.withCaption(%22Administration%22)));%0A%0A  %7D%0A%0A  @AfterEach%0A  public void tearDown() throws IOException %7B%0A    MockVaadin.tearDown();%0A  %7D%0A%0A%0A  @Test%0A  void testFragmentChanges() throws Exception %7B%0A    // Select all of the available tabs and check that the fragment is updated%0A    TabSheet tab = _get(TabSheet.class);%0A%0A    tab.setSelectedTab(_get(ImportPanel.class));%0A    assertEquals(%22!admin/import%22, ui.getPage().getUriFragment());%0A%0A    tab.setSelectedTab(_get(CorpusAdminPanel.class));%0A    assertEquals(%22!admin/corpora%22, ui.getPage().getUriFragment());%0A%0A    tab.setSelectedTab(_get(ReferenceLinkEditor.class));%0A    assertEquals(%22!admin/reference-link-editor%22, ui.getPage().getUriFragment());%0A%0A    tab.setSelectedTab(_get(MigrationPanel.class));%0A    assertEquals(%22!admin/reference-link-migration%22, ui.getPage().getUriFragment());%0A  %7D%0A%0A%0A%7D%0A

Add a test that the admin view fragment changes