diff --git a/Makefile b/Makefile index ea04b954..bc31e989 100644 --- a/Makefile +++ b/Makefile @@ -88,4 +88,5 @@ test-craft-versions: prepare-container "./craft-versions.sh ${CRAFT_VERSION}" require-guzzle-v6: - docker-compose exec -T -u www-data cli-app sh -c "php composer.phar require guzzlehttp/guzzle:^6.0 --no-warnings -W" \ No newline at end of file + docker-compose exec -T -u www-data cli-app sh -c "php composer.phar require guzzlehttp/guzzle:^6.0 -W --no-scripts || true" + docker-compose exec -T -u www-data cli-app sh -c 'if ! php composer.phar show -i | grep "guzzlehttp/guzzle" | grep "6."; then echo "Guzzle version 6 is not present."; exit 1; fi' diff --git a/e2e/cypress/e2e/jobs/copy-source-text-flow/filters.cy.js b/e2e/cypress/e2e/jobs/copy-source-text-flow/filters.cy.js index 8cb144fc..4c653cf1 100644 --- a/e2e/cypress/e2e/jobs/copy-source-text-flow/filters.cy.js +++ b/e2e/cypress/e2e/jobs/copy-source-text-flow/filters.cy.js @@ -112,8 +112,7 @@ describe( cy.get('.data').find('tr td[data-attr="status"]').should('have.length', 1) }) - it( - 'can see job in the list with status filter', async () => { + it('can see job in the list with status filter',() => { const appUrl = Cypress.env('APP_URL'); cy.visit(`${appUrl}/admin/craft-lilt-plugin/jobs`) @@ -124,4 +123,18 @@ describe( invoke('attr','data-status'). should('equal', 'ready-for-review') }) + + it('can download job diagnostic data', () => { + cy.openJob(jobTitle); + + cy.get('#lilt-download-diagnostic-data').click(); + cy.wait(5000); + + cy.exec('ls cypress/downloads').then((result) => { + const files = result.stdout.split('\n'); + + const zipFiles = files.filter(file => file.endsWith('.zip')); + expect(zipFiles).to.have.length.greaterThan(0); + }); + }) }); diff --git a/src/templates/_components/job/_settings.twig b/src/templates/_components/job/_settings.twig index 4545670f..3fc75356 100644 --- a/src/templates/_components/job/_settings.twig +++ b/src/templates/_components/job/_settings.twig @@ -61,6 +61,6 @@ {% endif %}
- Download Diagnostic Data + Download Diagnostic Data
{% endblock %} diff --git a/src/templates/_components/utilities/configuration.twig b/src/templates/_components/utilities/configuration.twig index be041f72..775a308a 100644 --- a/src/templates/_components/utilities/configuration.twig +++ b/src/templates/_components/utilities/configuration.twig @@ -92,7 +92,7 @@
- Download Diagnostic Data + Download Diagnostic Data