예제 #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 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)));
  }