Test Plan for Image Styles
Last modified by Ilie Andriuta on 2024/06/26 18:24
Steps to reproduce
NOTE: This Test Plan was validated with Manuel Leduc to see which tests are automated.
We need to test:
- Creation of an Image Style from Administer Wiki > Look & Feel > Image Styles and usage in order to test if parameters are respected [AUTOMATED]
- Create a new Image Style (including respecting the Name Strategy set at Wiki Level, e.g. 'Preformatted names (no accents, no space, no special characters)')
- Create an Image Style with the same Identifier and Type (e.g. Style1), with:
- a set Default Width and Height (e.g 500)
- by selecting (ticking the checkbox) of some parameters like Adjustable Size, Default Border
- set a Default Alignment (e.g. Center) - Edit/create a wiki page with CKEditor, insert an image (by clicking 'Image' button on toolbar), select the previously created Image Style and confirm that the applied parameters on the image are respected (correspond to the ones set on the Image Style Administration)
- From Administer Wiki > Look & Feel > Image Styles, create a new Image Style, (e.g. Style2), but with different Identifier and Type this time (e.g. Identifier: Pretty2, Type: thumbnail) and:
- choose some distinctive settings, like a specific Width/ Height (e.g 500)
- specify a default Alignment (e.g. Center) - Edit/create a wiki page with CKEditor, insert an image (by clicking 'Image' button on toolbar), select the previously created Image Style and confirm that the applied parameters on the image are respected (correspond to the ones set on the Image Style Administration)
- Editing/ updating an Image Style from Administer Wiki > Look & Feel > Image Styles [AUTOMATED]
- Go to Administer Wiki > Look & Feel > Image Styles
- From 'Image Styles' table on the bottom, click 'Edit'(in the Actions column) for an entry already tested (we have confirmation that the already set parameters are applied on the inserted image)
- Modify some parameters (e.g. set a smaller/bigger Width/ Height, uncheck Adjustable Size, Default Border, set a different Alignment, e.g. End)
- Save the page
- Edit/create a wiki page with CKEditor, insert an image (by clicking 'Image' button on toolbar), select the previously updated Image Style and confirm that the applied new parameters on the image are respected (correspond to the ones modified on the Image Style Administration).
- Creating at least 2 Image Styles with the same Type [NOT YET AUTOMATED]
- Go to Administer Wiki > Look & Feel > Image Styles
- Create a new Image Style (e.g. 'Style1', with Identifier: Pretty1, Type: thumbnail)
- Create again a new Image Style (e.g. 'Style2', with Identifier: Pretty2, Type: thumbnail)
- Edit a page with CKEditor, click on 'Image' from toolbar
- Select an image from Gallery tab
- Click 'Select' button
- Confirm that the list of Image Styles displayed in the drop-down contains both the created styles 'Pretty1' and 'Pretty2' and the default style .
- Setting a default Image Style [AUTOMATED]
- Go to Administer Wiki > Look & Feel > Image Styles
- On the 'Default Style' drop-down, choose an existing Style, then click 'Update the default image style' button
- Edit/create a wiki page with CKEditor, insert an image (by clicking 'Image' button on toolbar), confirm that the previously chosen Image Style is selected by default in the Image dialog
- Insert the image and confirm the corresponding Style parameters are applied on the inserted image
- Force a default Image Style [AUTOMATED]
- Go to Administer Wiki > Look & Feel > Image Styles
- On the 'Default Style' drop-down, choose an existing Style (preferably with 'Adjustable Size' set to 'No')
- Tick the 'Force default style' checkbox
- Click 'Update the default image style' button
- Edit/create a wiki page with CKEditor, insert an image (by clicking 'Image' button on toolbar)
- Confirm that the previously chosen Image Style is selected by default in the Image dialog
- Confirm that the style is not present in the Image dialog drop-down
- Insert the image and confirm the corresponding Style parameters set in the Image Style Administration are applied on the inserted image
- Mouse Hover over the inserted image after the Style was applied and check if the image can be resized with the mouse by dragging (only if the chosen Style has 'Adjustable Size' set to 'No')
Automated tests are here:
- for the usage: https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-test/xwiki-platform-ckeditor-test-docker/src/test/it/org/xwiki/ckeditor/test/ui/ImageIT.java
- for Administration part: https://github.com/xwiki/xwiki-platform/blob/8a7283f5dfe0a84388e1ec8e7324fe153327fcb9/xwiki-platform-core/xwiki-platform-image/xwiki-platform-image-style/xwiki-platform-image-style-test/xwiki-platform-image-style-test-docker/src/test/it/org/xwiki/image/style/test/ui/ImageStyleIT.java
Expected results
The Image Style feature is working properly.
Results
| per page of Previous Page Next Page Page | |||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
| Previous Page Next Page Page | |||||||||||||||||||||||||||||||||