jobs:
    test_front_catalogs_ee:
        machine:
            image: 'ubuntu-2004:2022.04.1'
            docker_layer_caching: true
        parameters:
            notify:
                type: boolean
                default: false
        steps:
            -   attach_workspace:
                    at: ~/
            -   restore_frontend_dependency_cache
            -   fix_files_permissions
            -   load_docker_image_node
            -   run:
                    name: Cleanup & re-install CE node_modules
                    command: |
                        rm -rf vendor/akeneo/pim-community-dev/node_modules
                        cd ~/project/vendor/akeneo/pim-community-dev && make node_modules
            -   run:
                    name: Integration front
                    command: PIM_CONTEXT=catalogs make catalogs-integration-front
            -   when:
                    condition: << parameters.notify >>
                    steps:
                        -   slack-app/notify:
                                channel: 'monitoring-octopus'
                                event: fail
                                template: basic_fail_1
