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 26, 2020
1 parent 67e7d14 commit b41af71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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
3 changes: 3 additions & 0 deletions core/src/test/java/test/TooltipTest.java
Original file line number Diff line number Diff line change
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 b41af71

Please sign in to comment.