Skip to content

Conversation

@estebangallego
Copy link
Contributor

@estebangallego estebangallego commented May 17, 2023

Issue & Reproduction Steps

To perform the Template Automation test, we need to ensure that all process-templates are correctly imported into PM4. Additionally, we must confirm that these templates work properly when creating a Process.

Solution

  • Created a unit test that will fetch and count all the processes within process-templates and compare them with the ones on the Default Templates database.
  • This test will also check all templates to make sure they can be added as Processes.

How to Test

To successfully configure the automated default template synchronization, follow these steps:

  • Open your .env file for your project.
  • Add the following new variables and their respective values:
    • The DEFAULT_TEMPLATE_BRANCH will be the reference of the UnitTest
DEFAULT_TEMPLATE_REPO=process-templates
DEFAULT_TEMPLATE_BRANCH=task/FOUR-8392
DEFAULT_TEMPLATE_CATEGORIES=all
  • install the new templates with the artisan command OR Wipe and create a new PM installation
    -- Install: php artisan processmaker:sync-default-templates
    -- Wipe: php artisan db:wipe --force && php artisan migrate:fresh --seed --force
  • Make sure all the packages are installed.
  • Run PHPUnit `tests/Feature/Templates/Api/ProcessTemplateTest.php
  • When the new installation is created, check if the new processes are in the templates tab.
  • Create a Process from the new templates.

Related Tickets & Packages

ci:processmaker:task/FOUR-8392

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

@estebangallego estebangallego changed the title Task/four 8392 FOUR-8392 Template Automation test May 19, 2023
@estebangallego estebangallego marked this pull request as draft May 23, 2023 00:53
@estebangallego estebangallego marked this pull request as ready for review May 23, 2023 16:32
@sanjacornelius sanjacornelius merged commit c8394a2 into template-sync May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants