package com.sudicode.tunejar.menu;

import com.sudicode.tunejar.player.Gui;
import org.junit.Test;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;

public class ThemeMenuTest {

    private Gui gui = Gui.getInstance();

    @Test
    public void testDarkTheme() throws Exception {
        gui.getRobot().clickOn("#themeSelector").sleep(250).clickOn("Dark Theme");
        assertThat(gui.getPlayer().getScene().getStylesheets().get(0), endsWith("Dark%20Theme.css"));
        assertThat(gui.getPlayer().getOptions().getTheme(), is(equalTo(("Dark Theme"))));
    }

    @Test
    public void testModena() throws Exception {
        gui.getRobot().clickOn("#themeSelector").sleep(250).clickOn("Modena");
        assertThat(gui.getPlayer().getScene().getStylesheets().get(0), endsWith("Modena.css"));
        assertThat(gui.getPlayer().getOptions().getTheme(), is(equalTo("Modena")));
    }

}

@@ -92,16 +92,186 @@
 t.Test;%0A
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport static com.jayway.awaitility.Awaitility.await;%0Aimport static com.jayway.awaitility.Duration.FIVE_SECONDS;
 %0Aimport 
@@ -386,16 +386,104 @@
 Test %7B%0A%0A
+    private static final Logger logger = LoggerFactory.getLogger(ThemeMenuTest.class);%0A%0A
     priv
@@ -621,34 +621,88 @@
 meSelector%22)
-.sleep(250
+;%0A        await().atMost(FIVE_SECONDS).until(() -%3E gui.getRobot(
 ).clickOn(%22D
@@ -712,16 +712,17 @@
  Theme%22)
+)
 ;%0A      
@@ -719,35 +719,111 @@
 ));%0A        
-assertThat(
+logger.info(%22Clicked on Dark Theme%22);%0A        await().atMost(FIVE_SECONDS).until(() -%3E 
 gui.getPlaye
@@ -1100,18 +1100,72 @@
 or%22)
-.sleep(250
+;%0A        await().atMost(FIVE_SECONDS).until(() -%3E gui.getRobot(
 ).cl
@@ -1179,16 +1179,17 @@
 Modena%22)
+)
 ;%0A      
@@ -1186,35 +1186,107 @@
 ));%0A        
-assertThat(
+logger.info(%22Clicked on Modena%22);%0A        await().atMost(FIVE_SECONDS).until(() -%3E 
 gui.getPlaye

Update ThemeMenuTest