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

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

@ -25,7 +25,6 @@
package com.github.weisj.darklaf.ui;
import java.awt.*;
import java.util.logging.Logger;
import javax.swing.*;
@ -36,7 +35,6 @@ import com.github.weisj.darklaf.util.*;
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_FOCUSABLE_POPUP = "JPopupFactory.focusablePopup";
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);
Popup popup = result.getFirst();
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);
return popup;
}
@ -60,11 +58,11 @@ public class DarkPopupFactory extends PopupFactory {
final int x, final int y) {
Popup popup = super.getPopup(owner, contents, x, y);
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
&& PropertyUtil.getBooleanProperty(contents, KEY_FORCE_HEAVYWEIGHT);
if (forceHeavy) {
// null owner forces a heavyweight popup.
// Heavy weight owner forces a heavyweight popup.
Popup p = super.getPopup(getHeavyWeightParent(), contents, x, y);
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
@EnabledOnOs({OS.MAC, OS.WINDOWS})
public void testTooltipTransparency() throws InvocationTargetException, InterruptedException {
JToolTip toolTip = createTooltip();
SwingUtilities.invokeAndWait(() -> {

Loading…
Cancel
Save