Пример #1
0
  @Test
  public void maximizeButtonShouldWorkOnListPanel() throws Exception {
    MaximizeTestScreenWrapper listPanelScreen2 =
        new MaximizeTestScreenWrapper(driver, MaximizeTestPerspective.LIST_PANEL_SCREEN_2_ID);
    Dimension reportedSizeBefore = listPanelScreen2.getReportedSize();

    listPanel.clickMaximizeButton();

    Dimension reportedSizeAfter = listPanelScreen2.getReportedSize();
    assertBigger(reportedSizeBefore, reportedSizeAfter);
    assertObscuredBy(listPanel, tabPanel);
    assertObscuredBy(listPanel, simplePanel);
  }
Пример #2
0
  @Test
  public void maximizeButtonShouldWorkOnTabbedPanel() throws Exception {
    MaximizeTestScreenWrapper tabPanelScreen4 =
        new MaximizeTestScreenWrapper(driver, MaximizeTestPerspective.TAB_PANEL_SCREEN_4_ID);
    Dimension reportedSizeBefore = tabPanelScreen4.getReportedSize();

    tabPanel.clickMaximizeButton();

    Dimension reportedSizeAfter = tabPanelScreen4.getReportedSize();
    assertBigger(reportedSizeBefore, reportedSizeAfter);
    assertObscuredBy(tabPanel, listPanel);
    assertObscuredBy(tabPanel, simplePanel);
  }
Пример #3
0
  @Test
  public void maximizeButtonShouldWorkOnSimplePanel() throws Exception {
    MaximizeTestScreenWrapper simplePanelScreen5 =
        new MaximizeTestScreenWrapper(driver, MaximizeTestPerspective.SIMPLE_PANEL_SCREEN_5_ID);
    Dimension reportedSizeBefore = simplePanelScreen5.getReportedSize();

    simplePanel.clickMaximizeButton();

    Thread.sleep(3000);
    Dimension reportedSizeAfter = simplePanelScreen5.getReportedSize();
    assertBigger(reportedSizeBefore, reportedSizeAfter);
    assertObscuredBy(simplePanel, tabPanel);
    assertObscuredBy(simplePanel, listPanel);
  }
Пример #4
0
  @Test
  public void maximizedListPanelShouldTrackWindowSize() throws Exception {
    MaximizeTestScreenWrapper listPanelScreen2 =
        new MaximizeTestScreenWrapper(driver, MaximizeTestPerspective.LIST_PANEL_SCREEN_2_ID);

    listPanel.clickMaximizeButton();

    Dimension originalMaximizedSize = listPanelScreen2.getReportedSize();
    driver.manage().window().setSize(new Dimension(WINDOW_WIDTH + 50, WINDOW_HEIGHT - 40));
    new WebDriverWait(driver, 5)
        .until(
            reportedSizeIs(
                listPanelScreen2,
                new Dimension(
                    originalMaximizedSize.width + 50, originalMaximizedSize.height - 40)));
  }