Skip to content

Commit

Permalink
Update tests for MYFACES-4681
Browse files Browse the repository at this point in the history
  • Loading branch information
volosied committed Oct 1, 2024
1 parent c7b4ed8 commit ba49c60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ public void testCompilerXhtml() throws Exception {

Assertions.assertNotNull(((AbstractFacelet) f).getDoctype());
Assertions.assertEquals("html", ((AbstractFacelet) f).getDoctype().getRootElement());
Assertions.assertEquals("-//W3C//DTD XHTML 1.0 Transitional//EN", ((AbstractFacelet) f).getDoctype().getPublic());
Assertions.assertEquals("http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd", ((AbstractFacelet) f).getDoctype().getSystem());
// MYFACES-4681 - Simplified to <!DOCTYPE html>
Assertions.assertEquals(null, ((AbstractFacelet) f).getDoctype().getPublic());
Assertions.assertEquals(null, ((AbstractFacelet) f).getDoctype().getSystem());
}

@Test
Expand All @@ -92,7 +93,8 @@ public void testXhtml() throws Exception

Assertions.assertNotNull(root.getDoctype());
Assertions.assertEquals("html", root.getDoctype().getRootElement());
Assertions.assertEquals("-//W3C//DTD XHTML 1.0 Transitional//EN", root.getDoctype().getPublic());
Assertions.assertEquals("http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd", root.getDoctype().getSystem());
// MYFACES-4681 - Simplified to <!DOCTYPE html>
Assertions.assertEquals(null, root.getDoctype().getPublic());
Assertions.assertEquals(null, root.getDoctype().getSystem());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ public void testUpdateScript3Head() throws Exception
// the inclusion should trigger update head
Assertions.assertTrue(text.contains("update id=\"jakarta.faces.Resource\""));
Assertions.assertTrue(text.contains("alert(\"script3\");"));
Assertions.assertTrue(text.contains("link rel=\"stylesheet\" type=\"text/css\" href=\"/test/faces/jakarta.faces.resource/style3.css\""));
// MYFACES-4681 - HTML5 is default output mode, so the type attribute is unnecessary
Assertions.assertTrue(text.contains("link rel=\"stylesheet\" href=\"/test/faces/jakarta.faces.resource/style3.css\""));
//System.out.println(text);
endRequest();
}
Expand Down

0 comments on commit ba49c60

Please sign in to comment.