Ejemplo n.º 1
0
  @AfterClass
  public void tearDown() {

    startPage.logout();

    logger.info("Logged out, now closing browser... ");

    GeneralPage.stop();
  }
Ejemplo n.º 2
0
  private void createProductForMissingBooks() throws UnsupportedDriverException {
    //////////////////////////////////////////////////////////////////////////////////////
    // now we are logged in, let's open a new product
    // click createNewProduct
    NewProductPage newProductPage = startPage.navigateToNewProduct();

    // enter name and description
    newProductPage.compileFormular(product);

    // submit
    newProductPage.submit();
  }
Ejemplo n.º 3
0
  private void createStory(BuchDO buch) throws UnsupportedDriverException, InterruptedException {

    Story story = new Story();
    story.backlog = product;
    story.title = "Title: " + buch.getTitel();
    story.estimation = "10";
    story.description = "Isbn: " + buch.getIsbn() + "/ Preis: " + buch.getPreis();

    logger.info("Creating Story: " + story.title);

    NewStoryPage newStoryPage = startPage.navigateToNewStory();
    newStoryPage.compileFormular(story);
    newStoryPage.submit();
  }
Ejemplo n.º 4
0
  @Test
  public void createStoryForEachBooks() throws UnsupportedDriverException, InterruptedException {

    List<BuchDO> buecherList = readBooks();
    assertTrue(numOfBooks == buecherList.size());

    createProductForMissingBooks();

    for (BuchDO buch : buecherList) {
      createStory(buch);
    }

    // and check existence in the product
    logger.info("Checking product: " + product.title);
    ProductPage productPage = startPage.navigateToProduct(product.title, 0);
    for (BuchDO buch : buecherList) {
      productPage.storyIsShown(buch.getTitel());
    }
  }