Skip to content

Commit

Permalink
Added missing test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNetcare committed Mar 1, 2024
1 parent 4cf8f51 commit e7e4f23
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/fitnesse/responders/editing/PropertiesResponderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ public void testResponse() throws Exception {
for (String attribute : new String[]{"Search", "Edit", "Properties", "Versions", "Refactor", "WhereUsed", "RecentChanges"})
assertCheckboxChecked(attribute, content);

for (String attribute : new String[]{"Prune", WikiPageProperty.SECURE_READ, WikiPageProperty.SECURE_WRITE, WikiPageProperty.SECURE_TEST})
for (String attribute : new String[] { "Prune",
WikiPageProperty.SECURE_READ, WikiPageProperty.SECURE_WRITE,
WikiPageProperty.SECURE_TEST, WikiPageProperty.DISABLE_TESTHISTORY })
assertCheckboxNotChecked(content, attribute);
}

Expand Down Expand Up @@ -119,6 +121,7 @@ public void testJsonResponse() throws Exception {
assertFalse(jsonObject.getBoolean(WikiImportProperty.SECURE_READ));
assertFalse(jsonObject.getBoolean(WikiImportProperty.SECURE_WRITE));
assertFalse(jsonObject.getBoolean(WikiImportProperty.SECURE_TEST));
assertFalse(jsonObject.getBoolean(WikiImportProperty.DISABLE_TESTHISTORY));
}

@Test
Expand Down Expand Up @@ -151,6 +154,7 @@ public void testJsonResponseWithHelpTextAndTags() throws Exception {
assertFalse(jsonObject.getBoolean(WikiPageProperty.SECURE_READ));
assertFalse(jsonObject.getBoolean(WikiPageProperty.SECURE_WRITE));
assertFalse(jsonObject.getBoolean(WikiPageProperty.SECURE_TEST));
assertFalse(jsonObject.getBoolean(WikiPageProperty.DISABLE_TESTHISTORY));
}


Expand Down Expand Up @@ -388,6 +392,15 @@ public void testMakeSecurityPropertiesHtml() throws Exception {
assertSubString("<input type=\"checkbox\" id=\"secure-write\" name=\"secure-write\"/>", html);
assertSubString("<input type=\"checkbox\" id=\"secure-test\" name=\"secure-test\"/>", html);
}

@Test
public void testMakeTestHistoryPropertiesHtml() throws Exception {
SimpleResponse response = (SimpleResponse) new PropertiesResponder().makeResponse(context, request);
String html = response.getContent();
assertSubString("Disable:", html);
assertSubString("<input type=\"checkbox\" id=\"" + WikiPageProperty.DISABLE_TESTHISTORY + "\" name=\""
+ WikiPageProperty.DISABLE_TESTHISTORY + "\"/>", html);
}

@Test
public void testEmptySuitesForm() throws Exception {
Expand Down

0 comments on commit e7e4f23

Please sign in to comment.