mirror of
https://dev.azure.com/Foster-X/CMP329%20CW2/_git/CMP329%20CW2
synced 2025-07-27 06:03:32 +00:00
Made "Post Access" more clear
This commit is contained in:
parent
b759a7c78d
commit
a9c52dda8d
3 changed files with 26 additions and 2 deletions
12
src/csv/reports/test-report-20250405-175156.csv
Normal file
12
src/csv/reports/test-report-20250405-175156.csv
Normal file
|
@ -0,0 +1,12 @@
|
|||
Role,Username,Step,Result
|
||||
author,testuser,Login,PASS (Logged in succesfully)
|
||||
author,testuser,Post Access,PASS
|
||||
author,testuser,Post Creation,PASS
|
||||
author,testuser,Post Visible,PASS
|
||||
author,testuser,Post Deleted,PASS
|
||||
subscriber,subscriber,Login,PASS (Logged in succesfully)
|
||||
subscriber,subscriber,Post Access,PASS
|
||||
subscriber,subscriber,Post Creation,SKIPPED (Not permitted)
|
||||
subscriber,subscriber,Post Visible,SKIPPED
|
||||
subscriber,subscriber,Post Deleted,SKIPPED
|
||||
unauthorised,fakename,Login,PASS (Login failed, as expected)
|
Can't render this file because it has a wrong number of fields in line 12.
|
12
src/csv/reports/test-report-20250405-175311.csv
Normal file
12
src/csv/reports/test-report-20250405-175311.csv
Normal file
|
@ -0,0 +1,12 @@
|
|||
Role,Username,Step,Result
|
||||
author,testuser,Login,PASS (Logged in succesfully)
|
||||
author,testuser,Post Access,PASS
|
||||
author,testuser,Post Creation,PASS
|
||||
author,testuser,Post Visible,PASS
|
||||
author,testuser,Post Deleted,PASS
|
||||
subscriber,subscriber,Login,PASS (Logged in succesfully)
|
||||
subscriber,subscriber,Post Access,PASS
|
||||
subscriber,subscriber,Post Creation,SKIPPED (Not permitted)
|
||||
subscriber,subscriber,Post Visible,SKIPPED
|
||||
subscriber,subscriber,Post Deleted,SKIPPED
|
||||
unauthorised,fakename,Login,PASS (Login failed, as expected)
|
Can't render this file because it has a wrong number of fields in line 12.
|
|
@ -12,7 +12,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||
|
||||
public class TestPoster {
|
||||
|
||||
private static final boolean maximiseWindow = false;
|
||||
private static final boolean maximiseWindow = true;
|
||||
|
||||
private static final String domain = DomainGrabber.getDomain();
|
||||
private static final String LOGIN_PAGE = "https://" + domain + "/wp-login.php";
|
||||
|
@ -86,7 +86,7 @@ public class TestPoster {
|
|||
}
|
||||
|
||||
if (canPost) {
|
||||
CsvBuilder.appendTestResult(role, usernameText, "Post Access", postAccessible ? "PASS" : "FAIL");
|
||||
CsvBuilder.appendTestResult(role, usernameText, "New Post Access", postAccessible ? "PASS" : "FAIL");
|
||||
assertTrue(postAccessible, "User should be able to access post creation but can't");
|
||||
|
||||
// Step 3: Create post
|
||||
|
|
Loading…
Add table
Reference in a new issue