Ejemplo n.º 1
0
  @Test(groups = {"Acceptance"})
  public void testCreateCampaign() {
    navigationBar = mainPage.gotoNavBar();
    campaignsHome = navigationBar.goToCampaignsHome();
    campaignForm = campaignsHome.clickNewBtn();
    campaignForm.setCampaignName(campaignName);
    campaignForm.checkActiveCheckbox();
    campaignForm.setTypeSelect(campaignType);
    campaignForm.setStatusSelect(campaignStatus);
    campaignForm.setStartDate(startDate);
    campaignForm.setEndDate(endDate);
    campaignForm.setExpectedRevenue(expectedRevenue);
    campaignForm.setBudgetedCost(budgetedCost);
    campaignForm.setActualCost(actualCost);
    campaignForm.setExpectedResponse(expectedResponse);
    campaignForm.setNumSent(numSent);
    searchLookup = campaignForm.clickLookupParentCampaign();
    searchLookup.searchText(parentCampaign);
    campaignForm = searchLookup.goToCampaignForm();

    campaignDetail = campaignForm.clickSaveBtn();

    LoggerManager.getInstance().addInfoLog(this.getClass().getName(), "Campaign was created");

    Assert.assertTrue(campaignDetail.validateCampaignNameFld(campaignName));
    Assert.assertTrue(campaignDetail.validateCampaignType(campaignType));
    Assert.assertTrue(campaignDetail.validateCampaignStatus(campaignStatus));
    Assert.assertTrue(campaignDetail.validateCampaignStartDate(startDate));
    Assert.assertTrue(campaignDetail.validateCampaignEndDate(endDate));
    Assert.assertTrue(campaignDetail.validateCampaignParent(parentCampaign));
  }
Ejemplo n.º 2
0
 @AfterMethod(groups = {"Acceptance"})
 public void tearDown() {
   campaignDetail.clickDeleteBtn(true);
   LoggerManager.getInstance().addInfoLog(this.getClass().getName(), "Campaign was deleted");
   mainPage = campaignDetail.gotoMainPage();
   navigationBar = mainPage.gotoNavBar();
   campaignsHome = navigationBar.goToCampaignsHome();
   campaignDetail = campaignsHome.selectRecentItem(parentCampaign);
   campaignDetail.clickDeleteBtn(true);
   LoggerManager.getInstance()
       .addInfoLog(this.getClass().getName(), "Campaign Parent was deleted");
 }
Ejemplo n.º 3
0
 @BeforeMethod(groups = {"Acceptance"})
 public void setUp() {
   homePage = new HomePage();
   mainPage = homePage.loginAsPrimaryUser();
   navigationBar = mainPage.gotoNavBar();
   campaignsHome = navigationBar.goToCampaignsHome();
   campaignForm = campaignsHome.clickNewBtn();
   campaignForm.setCampaignName(parentCampaign);
   campaignForm.checkActiveCheckbox();
   campaignDetail = campaignForm.clickSaveBtn();
   mainPage = campaignDetail.gotoMainPage();
 }