mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed more tests for headless environment
This commit is contained in:
+1
-3
@@ -18,12 +18,10 @@ package com.intellij.history.integration.ui;
|
||||
|
||||
import com.intellij.history.integration.IntegrationTestCase;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public abstract class LocalHistoryUITestCase extends IntegrationTestCase {
|
||||
@Override
|
||||
protected void runTest() throws Throwable {
|
||||
if (GraphicsEnvironment.isHeadless()) {
|
||||
if (isInHeadlessEnvironment()) {
|
||||
System.out.println("Test '" + getClass().getName() + "." + getName() + "' is skipped because it requires working UI environment");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.annotation.ElementType;
|
||||
@@ -202,6 +203,10 @@ public abstract class PlatformTestCase extends UsefulTestCase implements DataPro
|
||||
runStartupActivities();
|
||||
}
|
||||
|
||||
protected static boolean isInHeadlessEnvironment() {
|
||||
return GraphicsEnvironment.isHeadless();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static Project createProject(File projectFile, String creationPlace) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user