@Test(groups = {"CuratedContent001", "CuratedContent"}) public void curatedContent001_saveWithoutImage() { WikiBasePageObject base = new WikiBasePageObject(driver); base.loginAs(credentials.userNameStaff, credentials.passwordStaff, wikiURL); SpecialCuratedContentPageObject cc = base.openSpecialCuratedContent(wikiURL); // add new element without image cc.addNewElement(CATEGORY, LABEL); // verify error message and save button not clickable cc.verifyImageErrorInLastElement(); cc.verifySaveNotClickable(); }
@Test(groups = {"CuratedContent002", "CuratedContent"}) public void curatedContent002_saveWithImage() { WikiBasePageObject base = new WikiBasePageObject(driver); base.loginAs(credentials.userNameStaff, credentials.passwordStaff, wikiURL); SpecialCuratedContentPageObject cc = base.openSpecialCuratedContent(wikiURL); // add new element and add image to that element cc.addNewElement(CATEGORY, LABEL); PhotoAddComponentObject addPhotoModal = cc.clickImageOnLastElement(); addPhotoModal.clickAddThisPhoto(1); cc.verifyImageInLastElement(); cc.clickSave(); cc.verifySuccesfulSave(); // clean the added element cc.removeLastElement(); cc.clickSave(); cc.verifySuccesfulSave(); }