mirror of
https://dev.azure.com/Foster-X/CMP329%20CW2/_git/CMP329%20CW2
synced 2025-07-27 05:53:32 +00:00
deletes post
This commit is contained in:
parent
ed7d898e99
commit
3b7570b9ab
1 changed files with 5 additions and 2 deletions
|
@ -78,8 +78,11 @@ public class TestPoster {
|
||||||
String postedTitle = driver.getTitle();
|
String postedTitle = driver.getTitle();
|
||||||
assertFalse(postedTitle.startsWith("Page not found"));
|
assertFalse(postedTitle.startsWith("Page not found"));
|
||||||
|
|
||||||
|
//delete post
|
||||||
//assertTrue(driver.getCurrentUrl().equals());
|
driver.get(editURL);
|
||||||
|
WebElement deleteButton = driver.findElement(By.id(DELETE_BUTTON_ID));
|
||||||
|
deleteButton.click();
|
||||||
|
|
||||||
} else { //if there's no permission to post
|
} else { //if there's no permission to post
|
||||||
assertTrue(postAccessible == false);
|
assertTrue(postAccessible == false);
|
||||||
assertFalse(driver.getCurrentUrl().equals(NEW_POST_URL));
|
assertFalse(driver.getCurrentUrl().equals(NEW_POST_URL));
|
||||||
|
|
Loading…
Add table
Reference in a new issue