-
Type:
Technical Testing
-
Status: Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Fragment Administration
-
Labels:None
-
Sprint:S01E02 - Giants Enigma, S01E03 - Floating Bottle, S01E04 - Turtles Swamp
Bugs found:
- PASS
- To Do
- FAIL
- Impeditive:
Ticket Title QA Status ? ? LPS-106081Web content displayed with specific itemType returns html with content LPS-106084Can't select document with specific mimeType in custom fragment
- Not impeditive:
Ticket Title QA Status ? ?
Case 1:
Can only select web content articles( Can display specific content type using itemType)
- Create a basic web content with a title, summary, and content
- Add a blog and a document
- Create a fragment with this configuration:
{ "fieldSets": [ { "fields": [ { "name": "itemSelector1", "type": "itemSelector", "label": "Web Content", "typeOptions": { "itemType" : "com.liferay.journal.model.JournalArticle" } } ] } ] }
- And this HTML:
<div class="fragment_wc"> [#if configuration.itemSelector1.content??] ${itemSelector1Object.getTitle()} ${itemSelector1Object.getDescription()} ${itemSelector1Object.getContent()} [/#if] </div>
- Add a new masters page and add your created fragment to the page
- Click on the fragment configuration
- Assert you can only select a web content
- Select your created web content
- Assert the web content is displayed correctly(depending on your html configuration)
Case 2:
Can only select Documents and Media of type img or jpg(Can display specific content type using itemMimeType)
- Add a document type to the documents and media admin with a text field
- Add two new documents using that document type, each with an image file(one of type img/jpg and another of any other type)
- Create a fragment with this configuration:
{ "fieldSets": [ { "fields": [ { "name": "itemSelector1", "type": "itemSelector", "label": "Image", "typeOptions": { "itemType" : "com.liferay.portal.kernel.repository.model.FileEntry", "itemSubtype": DLFileEntryType-fileEntryTypeID"(whatever it is for structure), "mimeTypes": ["img/jpg"] } } ] } ] }
- And this HTML:
<div class="fragment_img"> ${configuration.itemSelector1} </div>
- Add a new masters page and add your created fragment to the page
- Click on the fragment configuration
- Assert you can only select/upload the img/jpg type image from your specific document type
- Select your uploaded(type img/jpg) image
- Assert it is displayed correctly(depending on your html configuration)
Case 3:
Can only select blog entries( Can display specific content type using itemType)
- Create a blog with the required fields
- Add a basic web content and a document
- Create a fragment with this configuration:
{ "fieldSets": [ { "fields": [ { "name": "itemSelector1", "type": "itemSelector", "label": "Blog", "typeOptions": { "itemType" : "com.liferay.blogs.model.BlogsEntry" } } ] } ] }
- And this HTML:
<div class="fragment_blog"> [#if configuration.itemSelector1.content??] ${itemSelector1Object.getTitle()} ${itemSelector1Object.getContent()} [/#if] </div>
- Add a new masters page and add your created fragment to the page
- Click on the fragment configuration
- Assert you can only select a blog
- Select your created blog
- Assert the blog is displayed correctly(depending on your html configuration)
- relates
-
LPS-100587 Docs: Display individual content through fragment
-
- Closed
-