]> source.dussan.org Git - vaadin-framework.git/blob
0ddf80e2e0f8f7d6da598140349fe589b4b93dca
[vaadin-framework.git] /
1 package com.vaadin.v7.tests.components.grid.basicfeatures.server;
2
3 import java.io.IOException;
4
5 import org.junit.Test;
6 import org.openqa.selenium.interactions.Actions;
7
8 import com.vaadin.v7.tests.components.grid.basicfeatures.GridBasicFeaturesTest;
9 import com.vaadin.v7.tests.components.grid.basicfeatures.GridSidebarFeatures;
10
11 public class GridSidebarThemeTest extends GridBasicFeaturesTest {
12
13     @Test
14     public void testValo() throws Exception {
15         runTestSequence("valo");
16     }
17
18     @Test
19     public void testValoDark() throws Exception {
20         runTestSequence("tests-valo-dark");
21     }
22
23     @Override
24     protected Class<?> getUIClass() {
25         return GridSidebarFeatures.class;
26     }
27
28     private void runTestSequence(String theme) throws IOException {
29         openTestURL("theme=" + theme);
30
31         compareScreen(theme + "-SidebarClosed");
32         getSidebarOpenButton().click();
33
34         compareScreen(theme + "-SidebarOpen");
35
36         new Actions(getDriver()).moveToElement(getColumnHidingToggle(2), 5, 5)
37                 .perform();
38
39         compareScreen(theme + "-OnMouseOverNotHiddenToggle");
40
41         getColumnHidingToggle(2).click();
42         getColumnHidingToggle(3).click();
43         getColumnHidingToggle(6).click();
44
45         new Actions(getDriver()).moveToElement(getSidebarOpenButton())
46                 .perform();
47         ;
48
49         compareScreen(theme + "-TogglesTriggered");
50
51         new Actions(getDriver()).moveToElement(getColumnHidingToggle(2))
52                 .perform();
53         ;
54
55         compareScreen(theme + "-OnMouseOverHiddenToggle");
56
57         getSidebarOpenButton().click();
58
59         compareScreen(theme + "-SidebarClosed2");
60     }
61 }