Details
-
Task
-
Resolution: Unresolved
-
Major
-
None
-
11.8-rc-1
-
Unknown
-
Description
The manual test is here: https://test.xwiki.org/xwiki/bin/view/Other%20Tests/Create%20Template%20Provider%20from%20the%20Class%20UI
The test verifies that a Template Provider can be created from a Class UI.
Matrix discussion:
Vincent Massol: found the question: https://matrix.to/#/!ikPtGZaGWtyblizzlR:matrix.xwiki.com/$16142520628626wlVBi:matrix.xwiki.com?via=matrix.org&via=matrix.xwiki.com&via=matrix.wina.be
Ilie Andriuta: thanks Vincent Massol
Vincent Massol: we have a test for the xclass app: https://github.com/xwiki/xwiki-platform/blob/a6bd6aa1e3c3aa96d480812fa9f635ca369384b8/xwiki-platform-core/xwiki-platform-xclass/xwiki-platform-xclass-test/xwiki-platform-xclass-test-docker/src/test/it/org/xwiki/xclass/test/ui/ClassSheetIT.java#L45
and it has a part about template creation// Create the template. classSheetPage = classSheetPage.clickCreateTemplateButton().waitUntilPageIsLoaded() .clickAddObjectToTemplateLink().waitUntilPageIsLoaded(); ViewPage templatePage = classSheetPage.clickTemplateLink(); assertEquals(className + " Template", templatePage.getDocumentTitle()); // The default edit button should take us to the In-line edit mode. templatePage.edit(); InlinePage editPage = new InlinePage(); editPage.setValue("color", "red"); editPage.setValue("age", "13"); editPage.clickSaveAndContinue(); editPage.clickBreadcrumbLink(classTitle); classSheetPage.waitUntilPageIsLoaded(); // Create a document based on the class template. assertEquals(spaceName, classSheetPage.getNewPagePicker().getParentInput().getAttribute("value")); editPage = classSheetPage.createNewDocument(spaceName, pageName); assertEquals(pageName, editPage.getDocumentTitle()); assertEquals("red", editPage.getValue("color")); assertEquals("13", editPage.getValue("age")); editPage.setValue("color", "blue"); editPage.setValue("age", "27"); ViewPage viewPage = editPage.clickSaveAndView(); assertEquals(pageName, viewPage.getDocumentTitle()); assertEquals("YOUR FAVORITE COLOR\nblue\nYOUR CURRENT AGE\n27", viewPage.getContent()); viewPage.clickBreadcrumbLink(classTitle); classSheetPage.waitUntilPageIsLoaded();maybe you could check that?
Ilie Andriuta: yes, looking now
Vincent Massol: it's about templates
not about template providers
(I think)
I don't know the feature about template provider (from the class sheet) personally
actually it vaguely rings a bell
do you know the jira issue that introduced it?
Ilie Andriuta: it was introduced in 11.8 RC1
searching for JIRA
https://jira.xwiki.org/browse/XWIKI-16725
found it
Vincent Massol: https://jira.xwiki.org/browse/XWIKI-16725
yep
seems that Alex (not on this chat, weird) might have forgotten to test it (I mean to write a test for it)
Ilie Andriuta: yes, doesn't seem that https://github.com/xwiki/xwiki-platform/blob/a6bd6aa1e3c3aa96d480812fa9f635ca369384b8/xwiki-platform-core/xwiki-platform-xclass/xwiki-platform-xclass-test/xwiki-platform-xclass-test-docker/src/test/it/org/xwiki/xclass/test/ui/ClassSheetIT.java#L45 contains the test for Provider
*Vincent Masso*l: the 3 commits don't have any test in them ....
not great
Ilie Andriuta: I'll let you create the issue and we'll link it toXWIKI-16725
it's really hard afterwards when committers don't take the time to write tests
Ilie Andriuta: ok, I'll create it
thanks
Attachments
Issue Links
- is related to
-
XWIKI-16725 Add action to create Template Provider from the Class UI
- Closed