Skip to content
Snippets Groups Projects
Commit 25660a53 authored by George Adrian Stoica's avatar George Adrian Stoica
Browse files

Adds gitpod condition for drag item test

The test for dragging todo list items does not work properly in gitpod.
This change will skip the test when running in gitpod
and run it otherwise.

fixes issue #23
parent a3c8f5bd
No related branches found
No related tags found
1 merge request!1Adds gitpod condition for drag item test
...@@ -17,7 +17,10 @@ import static org.junit.jupiter.api.Assertions.assertTrue; ...@@ -17,7 +17,10 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail; import static org.junit.jupiter.api.Assertions.fail;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.testfx.framework.junit5.ApplicationTest; import org.testfx.framework.junit5.ApplicationTest;
import org.testfx.util.WaitForAsyncUtils; import org.testfx.util.WaitForAsyncUtils;
import todolist.core.AbstractTodoList; import todolist.core.AbstractTodoList;
...@@ -116,7 +119,10 @@ public class TodoListControllerTest extends ApplicationTest { ...@@ -116,7 +119,10 @@ public class TodoListControllerTest extends ApplicationTest {
checkTodoListViewItems(item3, item1, newItem2); checkTodoListViewItems(item3, item1, newItem2);
} }
// @Test - virker ikke i gitpod /** Test - virker ikke i gitpod */
@Test
@DisplayName("Test dragging a ToDo list item")
@DisabledIfEnvironmentVariable(named = "GITPOD_WORKSPACE_ID", matches = ".*")
public void testDragTodoItem() { public void testDragTodoItem() {
Predicate<TodoItemListCell> draggableCell = cell -> cell.lookup(".label") != null; Predicate<TodoItemListCell> draggableCell = cell -> cell.lookup(".label") != null;
// drag the first item in the list view, which is the second item in the model // drag the first item in the list view, which is the second item in the model
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment