ACS 9871 - add additional transformation rule tests (#4927)

* ACS-9871: Add transformation rule tests and supporting methods

* ACS-9871: Add transformation rule tests and supporting methods (Addressed PR Comments)

* ACS-9871: Fix async expect pattern in transformation tests

* ACS-9871: Add readonly modifiers and clean up code formatting

* ACS-9871: Simplify expect statements and reorder assertions

* ACS-9871: Refactor transformation tests with helper function

- Add testTransformation helper function to reduce code duplication
- Refactor PDF, BMP, and JPG transformation tests to use helper
- Improve test maintainability and readability
- Add comprehensive JSDoc documentation

* ACS-9871: Replace any types with proper Page Object types

- Replace 'any' with PersonalFilesPage, NodesPage, and LoginPage
- Add proper imports for page object types
- Improve type safety in testTransformation helper function

* ACS-9871: Add image transformation tests for GIF, TIFF, and PNG - Add new test cases for GIF, TIFF, and PNG transformations - Add MimeType enums for GIFImage, TIFFImage, and PNGImage - Add TIFF_FILE and BMP_FILE to test-files registry - Add physical test files (file-tif.tif, file-bmp.bmp) - Test multiple image format conversions (JPG, PNG, BMP, GIF, TIFF)

* Fix parallel test execution by removing logout/login cycle in transformation tests

* Refactor transformation tests to reduce code duplication for SonarQube

* Refactor transformation tests following Single Responsibility Principle and extract TestFileConfig interface to shared models

* Replace any type with Page type in triggerTransformation function
This commit is contained in:
Rakesh Ghosal
2025-12-17 15:03:11 +05:30
committed by GitHub
parent 3f25c12b6f
commit 44b8ec53d8
7 changed files with 197 additions and 40 deletions
@@ -24,3 +24,4 @@
export * from './user-model';
export * from './custom-config';
export * from './test-file.model';
@@ -0,0 +1,28 @@
/*!
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Alfresco Example Content Application
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
export interface TestFileConfig {
path: string;
name: string;
}
@@ -51,7 +51,12 @@ export enum ActionType {
}
export enum MimeType {
AdobePDFDocument = 'Adobe PDF Document [application/pdf]'
AdobePDFDocument = 'Adobe PDF Document [application/pdf]',
BitmapImage = 'Bitmap Image [image/bmp]',
JPEGImage = 'JPEG Image [image/jpeg]',
GIFImage = 'GIF Image [image/gif]',
TIFFImage = 'TIFF Image [image/tiff]',
PNGImage = 'PNG Image [image/png]'
}
export class ActionsDropdownComponent extends BaseComponent {
Binary file not shown.

After

Width:  |  Height:  |  Size: 78 B

@@ -78,6 +78,14 @@ export const TEST_FILES = {
path: resolve(__dirname, 'file-gif.gif'),
name: 'file-gif'
},
TIFF_FILE: {
path: resolve(__dirname, 'file-tif.tif'),
name: 'file-tif'
},
BMP_FILE: {
path: resolve(__dirname, 'file-bmp.bmp'),
name: 'file-bmp'
},
PPTX_FILE: {
path: resolve(__dirname, 'file-pptx.pptx'),
name: 'file-pptx'