Browse Source

Run tests with --info.

pull/188/head
weisj 5 years ago
parent
commit
480eecdbd8
  1. 6
      .github/workflows/gradle.yml
  2. 8
      core/src/main/java/com/github/weisj/darklaf/ui/DarkPopupFactory.java
  3. 1
      core/src/test/java/test/TooltipTest.java

6
.github/workflows/gradle.yml

@ -46,7 +46,7 @@ jobs:
- name: Build - name: Build
run: ./gradlew build -PskipAutostyle --info -x test run: ./gradlew build -PskipAutostyle --info -x test
- name: Test - name: Test
run: ./gradlew :darklaf-core:test -PskipAutostyle run: ./gradlew test -PskipAutostyle --info
- name: Upload Results - name: Upload Results
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
@ -67,7 +67,7 @@ jobs:
- name: Build - name: Build
run: ./gradlew build -PskipAutostyle --info -x test run: ./gradlew build -PskipAutostyle --info -x test
- name: Test - name: Test
run: ./gradlew :darklaf-core:test -PskipAutostyle run: ./gradlew test -PskipAutostyle --info
- name: Upload Results - name: Upload Results
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
@ -88,7 +88,7 @@ jobs:
- name: Build - name: Build
run: ./gradlew build -PskipAutostyle --info -x test run: ./gradlew build -PskipAutostyle --info -x test
- name: Test - name: Test
run: ./gradlew :darklaf-core:test -PskipAutostyle run: ./gradlew test -PskipAutostyle --info
- name: Upload Results - name: Upload Results
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:

8
core/src/main/java/com/github/weisj/darklaf/ui/DarkPopupFactory.java

@ -25,7 +25,6 @@
package com.github.weisj.darklaf.ui; package com.github.weisj.darklaf.ui;
import java.awt.*; import java.awt.*;
import java.util.logging.Logger;
import javax.swing.*; import javax.swing.*;
@ -36,7 +35,6 @@ import com.github.weisj.darklaf.util.*;
public class DarkPopupFactory extends PopupFactory { public class DarkPopupFactory extends PopupFactory {
private static final Logger LOGGER = LogUtil.getLogger(DarkPopupFactory.class);
public static final String KEY_NO_DECORATION = "JPopupFactory.noDecorations"; public static final String KEY_NO_DECORATION = "JPopupFactory.noDecorations";
public static final String KEY_FOCUSABLE_POPUP = "JPopupFactory.focusablePopup"; public static final String KEY_FOCUSABLE_POPUP = "JPopupFactory.focusablePopup";
public static final String KEY_FORCE_HEAVYWEIGHT = "JPopupFactory.forceHeavyweight"; public static final String KEY_FORCE_HEAVYWEIGHT = "JPopupFactory.forceHeavyweight";
@ -51,7 +49,7 @@ public class DarkPopupFactory extends PopupFactory {
Pair<Popup, PopupType> result = getEffectivePopup(owner, contents, x, y); Pair<Popup, PopupType> result = getEffectivePopup(owner, contents, x, y);
Popup popup = result.getFirst(); Popup popup = result.getFirst();
PopupType type = result.getSecond(); PopupType type = result.getSecond();
LOGGER.info(String.format("Popup: effective type=%s content=%s popup=%s", type, contents, popup)); System.out.println(String.format("Popup: effective type=%s content=%s popup=%s", type, contents, popup));
setupPopup(type, contents, x, y); setupPopup(type, contents, x, y);
return popup; return popup;
} }
@ -60,11 +58,11 @@ public class DarkPopupFactory extends PopupFactory {
final int x, final int y) { final int x, final int y) {
Popup popup = super.getPopup(owner, contents, x, y); Popup popup = super.getPopup(owner, contents, x, y);
PopupType type = getPopupType(popup); PopupType type = getPopupType(popup);
LOGGER.info(String.format("Popup: type=%s content=%s", type, contents)); System.out.println(String.format("Popup: type=%s content=%s", type, contents));
boolean forceHeavy = type != PopupType.HEAVY_WEIGHT boolean forceHeavy = type != PopupType.HEAVY_WEIGHT
&& PropertyUtil.getBooleanProperty(contents, KEY_FORCE_HEAVYWEIGHT); && PropertyUtil.getBooleanProperty(contents, KEY_FORCE_HEAVYWEIGHT);
if (forceHeavy) { if (forceHeavy) {
// null owner forces a heavyweight popup. // Heavy weight owner forces a heavyweight popup.
Popup p = super.getPopup(getHeavyWeightParent(), contents, x, y); Popup p = super.getPopup(getHeavyWeightParent(), contents, x, y);
return new Pair<>(p, PopupType.HEAVY_WEIGHT); return new Pair<>(p, PopupType.HEAVY_WEIGHT);
} }

1
core/src/test/java/test/TooltipTest.java

@ -65,7 +65,6 @@ public class TooltipTest extends AbstractImageTest {
@Test @Test
@EnabledOnOs({OS.MAC, OS.WINDOWS}) @EnabledOnOs({OS.MAC, OS.WINDOWS})
public void testTooltipTransparency() throws InvocationTargetException, InterruptedException { public void testTooltipTransparency() throws InvocationTargetException, InterruptedException {
JToolTip toolTip = createTooltip(); JToolTip toolTip = createTooltip();
SwingUtilities.invokeAndWait(() -> { SwingUtilities.invokeAndWait(() -> {

Loading…
Cancel
Save