Skip to content

Commit

Permalink
Setup XServer for linux workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
weisJ committed Dec 27, 2020
1 parent 67e7d14 commit f099bfe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,7 @@ jobs:
with:
java-version: 8
- name: Build & Test
uses: eskatos/gradle-command-action@v1
with:
arguments: build test -PskipAutostyle --info --no-daemon
wrapper-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
run: xvfb-run -a -server-num=1 --server-args="-screen 0 2000x3000x16" ./gradlew build test -PskipAutostyle --info --no-daemon
- name: Upload Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v1
Expand Down
5 changes: 4 additions & 1 deletion core/src/test/java/test/TooltipTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

import javax.swing.*;

import com.github.weisj.darklaf.util.LogUtil;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
Expand All @@ -39,6 +38,7 @@
import com.github.weisj.darklaf.ui.DarkPopupFactory;
import com.github.weisj.darklaf.ui.tooltip.ToolTipConstants;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.LogUtil;
import com.github.weisj.darklaf.util.SystemInfo;

class TooltipTest extends AbstractImageTest {
Expand Down Expand Up @@ -91,6 +91,7 @@ void testTooltipTransparency() throws Exception {
for (c = toolTip.getParent(); c != null; c = c.getParent()) {
Color bg = c.getBackground();
LOGGER.info("bg = " + bg + ": " + c);
Assertions.assertFalse(c.isOpaque(), "Component is opaque: " + c);
Assertions.assertNotNull(bg, "Background is null for " + c);
Assertions.assertEquals(0, bg.getAlpha(), "Background " + bg + " is opaque " + c);
if (c instanceof Window) break;
Expand All @@ -105,6 +106,8 @@ void testTooltipTransparency() throws Exception {
Assertions.assertNotNull(img, "Tooltip Image is null");
int alpha = getAlpha(img.getRGB(img.getMinX(), img.getMinY() + img.getHeight() - 1));
Assertions.assertEquals(0, alpha, "Tooltip is opaque");

LOGGER.info("Done!");
});
}

Expand Down

0 comments on commit f099bfe

Please sign in to comment.