jakartaee / faces

Jakarta Faces
Other
109 stars 55 forks source link

TCK Challenge: NamespacedView tests are dependent on non-spec h:head id attribute #1754

Closed brideck closed 1 year ago

brideck commented 1 year ago

Challenged Tests: ee.jakarta.tck.faces.test.javaee8.namespacedView.Spec790WithNamespacedViewIT#testSpec790WithNamespacedView ee.jakarta.tck.faces.test.javaee8.namespacedView.Spec790WithNamespacedViewIT#testSpec790WithNamespacedViewAjaxNavigation

TCK Version: Jakarta Faces 4.0.x

Tested Implementation: Open Liberty -- containing MyFaces 4.0

Description: Both challenged tests require determining the id prefix used in conjunction with the NamingContainer, but the test implementation is currently deriving it from the head's id:

String namingContainerPrefix = page.getHead().getId().split("(?<=:)", 2)[0];

Unfortunately, this is not an attribute required by the specification -- the Faces 4.0 VDL for h:head makes no mention of it. Mojarra has implemented this attribute for a long time, but MyFaces does not use it so these tests fail for us.

Interestingly, this attribute does appear for the first time in the JSF 2.2 VDL for h:head, but vanishes in version 2.3 and onward. It is unclear if that was an intentional exclusion or if it has somehow managed to fall out of the spec accidentally. Regardless, it is not documented in the current version and hasn't been in more than 5 years, so should not be utilized in the TCK. An alternative method to derive the prefix should be used instead.

BalusC commented 1 year ago

HTML5 allows id on head and body.

but vanishes in version 2.3 and onward

Ay. Bad.

TCK should indeed be altered for the time being.

pnicolucci commented 1 year ago

@arjantijms any objection to accepting this one?

arjantijms commented 1 year ago

any objection to accepting this one?

Just accepted it, and we should indeed update the TCK next.

brideck commented 1 year ago

@arjantijms @BalusC The page.getHead() call on line 78 of the test class was missed in the attached PR.

pnicolucci commented 1 year ago

reopened @arjantijms @BalusC see Brian's comment above.

arjantijms commented 1 year ago

reopened @arjantijms @BalusC see Brian's comment above.

Fixed now in https://github.com/jakartaee/faces/pull/1766