@Test(enabled = false) public void saveEmptySupplierArticle() { LogisticsAndSettingsPage logisticsAndSettingsPage = new LogisticsAndSettingsPage(driver); ArticleWeightsAndMeasuresOverviewPage articleWeightsAndMeasuresOverview = logisticsAndSettingsPage.openArticleWeightsAndMeasuresOverview(); ArticleDetailsPage articleDetailsPage = articleWeightsAndMeasuresOverview.startToCreateArticleViaCreateButton(); articleDetailsPage.saveSupplierArticle(); // TakeScreenShots.takeScreenShotWithHighlightElement(driver.findElement(By.xpath("id('statusTable')/tbody/tr")), // driver); Assert.assertTrue( articleDetailsPage.getStatusMsg().contains("is not valid"), "No message or it is incorrect"); }
@Test(enabled = true) public void createNewSupplierArticle() { String supplierArticleNumber = "Article N" + DateUtils.getFullDateRestrictedYear(); SupplierArticle supplierArticle = StaticFactorySupplierArticle.createFullFilledDefaultSupplierArticle(supplierArticleNumber); LogisticsAndSettingsPage logisticsAndSettingsPage = new LogisticsAndSettingsPage(driver); ArticleWeightsAndMeasuresOverviewPage articleWeightsAndMeasuresOverview = logisticsAndSettingsPage.openArticleWeightsAndMeasuresOverview(); ArticleDetailsPage articleDetailsPage = articleWeightsAndMeasuresOverview.startToCreateArticleViaCreateButton(); articleDetailsPage.enterDataFromObject(supplierArticle); articleDetailsPage.saveSupplierArticle(); articleDetailsPage.backFromSupplierArticle(); Assert.assertTrue( articleWeightsAndMeasuresOverview.isSupplierArticleByNumber(supplierArticleNumber), "Article is not found"); }