mirror of
https://dev.azure.com/Foster-X/CMP329%20CW2/_git/CMP329%20CW2
synced 2025-07-27 05:03:31 +00:00
Updated test to pass - It was previously failing due to subscriber logins being brought straight to https://test.fusil.uk/wp-admin/profile.php. Now it is fixed by only ensuring that the URL begins with the link to wp-admin
This is a good example of why having more varied tests is handy!
This commit is contained in:
parent
df611ef206
commit
d855f06446
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ import org.openqa.selenium.WebElement;
|
||||||
import org.openqa.selenium.By;
|
import org.openqa.selenium.By;
|
||||||
import org.junit.jupiter.params.ParameterizedTest;
|
import org.junit.jupiter.params.ParameterizedTest;
|
||||||
import org.junit.jupiter.params.provider.CsvSource;
|
import org.junit.jupiter.params.provider.CsvSource;
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
public class TestLogin {
|
public class TestLogin {
|
||||||
private static final String LOGIN_PAGE = "https://test.fusil.uk/wp-login.php";
|
private static final String LOGIN_PAGE = "https://test.fusil.uk/wp-login.php";
|
||||||
|
@ -33,7 +33,7 @@ public class TestLogin {
|
||||||
password.sendKeys(passwordText);
|
password.sendKeys(passwordText);
|
||||||
login.click();
|
login.click();
|
||||||
|
|
||||||
assertEquals(EXPECTED_URL, driver.getCurrentUrl());
|
assertTrue(driver.getCurrentUrl().startsWith(EXPECTED_URL));
|
||||||
driver.quit();
|
driver.quit();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue