Skip to content

Commit

Permalink
Merge pull request #121 from lilt/4.x-development
Browse files Browse the repository at this point in the history
Release 4.2.1
  • Loading branch information
hadomskyi authored Sep 5, 2023
2 parents fe00734 + 7fdd624 commit 50b2631
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 4.2.1 - 2023-09-05
### Fixed
- Download diagnostic data functionality

## 4.2.0 - 2023-08-09
### Added
- Introduced new job and translation status "needs attention"
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.5.5 -W"
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'
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lilt/craft-lilt-plugin",
"description": "The Lilt plugin makes it easy for you to send content to Lilt for translation right from within Craft CMS.",
"type": "craft-plugin",
"version": "4.2.0",
"version": "4.2.1",
"keywords": [
"craft",
"cms",
Expand Down
17 changes: 15 additions & 2 deletions e2e/cypress/e2e/jobs/copy-source-text-flow/filters.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`)

Expand All @@ -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);
});
})
});
2 changes: 1 addition & 1 deletion src/controllers/GetReportDataController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

class GetReportDataController extends AbstractJobController
{
protected $allowAnonymous = false;
protected int|bool|array $allowAnonymous = false;

private $savePath;

Expand Down
2 changes: 1 addition & 1 deletion src/templates/_components/job/_settings.twig
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@
{% endif %}

<div class="field" style="padding: 14px 24px">
<a style="color: grey; text-align: center;width: 100%;" href="{{ url('craft-lilt-plugin/report/data/' ~ element.id) }}">Download Diagnostic Data</a>
<a id="lilt-download-diagnostic-data" target="_blank" style="color: grey; text-align: center;width: 100%;" href="{{ url('craft-lilt-plugin/report/data/' ~ element.id) }}">Download Diagnostic Data</a>
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion src/templates/_components/utilities/configuration.twig
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<div class="utility-status"></div>
</div>

<a style="color: grey" href="{{ url('admin/craft-lilt-plugin/report/data') }}">Download Diagnostic Data</a>
<a id="lilt-download-diagnostic-data" target="_blank" style="color: grey" href="{{ url('admin/craft-lilt-plugin/report/data') }}">Download Diagnostic Data</a>

</form>
</div>

0 comments on commit 50b2631

Please sign in to comment.