Browse Source

Test: Clean up custom init tasks after tests have run

modulesv2
weisj 3 years ago
parent
commit
4179e28302
No known key found for this signature in database
GPG Key ID: 31124CB75461DA2A
  1. 6
      core/src/test/java/com/github/weisj/darklaf/core/test/CustomTitleBarTest.java

6
core/src/test/java/com/github/weisj/darklaf/core/test/CustomTitleBarTest.java

@ -40,6 +40,7 @@ import javax.swing.JRootPane;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
@ -75,6 +76,11 @@ class CustomTitleBarTest extends AbstractImageTest implements NonThreadSafeTest
}));
}
@AfterAll
static void tearDown() {
TestUtils.runOnSwingThreadNotThrowing(() -> LafManager.getUserInitTasks().clear());
}
@BeforeEach
void beforeEach() {
LafManager.setDecorationsEnabled(true);

Loading…
Cancel
Save