Skip to content

Commit

Permalink
Merge pull request #117 from lilt/3.x-development
Browse files Browse the repository at this point in the history
Release 3.7.0
  • Loading branch information
hadomskyi authored Dec 15, 2023
2 parents 33244eb + 621d2a1 commit 29755ce
Show file tree
Hide file tree
Showing 83 changed files with 3,723 additions and 848 deletions.
1 change: 1 addition & 0 deletions .github/workflows/craft-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
jobs:
tests:
strategy:
fail-fast: false
matrix:
craft_version: [
"3.7.0",
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
jobs:
tests:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
scenario: [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
run: make up
- name: Composer install
run: make composer-install
- name: Require Guzzle v6.5.5
- name: Require Guzzle v6
run: make require-guzzle-v6
- name: Tests
run: make test
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ composer.lock
/tests/_craft/storage
/tests/_support/_generated

docker-compose.override.yml
docker-compose.override.yml

e2e/cypress/screenshots
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ 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/).

## 3.7.0 - 2023-12-15
### Added
- Support for the [Typed Link Field plugin](https://plugins.craftcms.com/typedlinkfield)
- Queue manager
- Queue each translation file transfer separately
- Ignore dropdowns setting

### Fixed
- Download translations triggered only after all of them are done
- Lock release issue after queue message processing
- Rise condition of queue messages
- Empty user id on draft creation

## 3.6.0 - 2023-05-24
### 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": "3.6.0",
"version": "3.7.0",
"keywords": [
"craft",
"cms",
Expand Down
3 changes: 2 additions & 1 deletion e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ up: clone down
docker-compose exec -T app sh -c 'echo DB_PASSWORD=craft-lilt >> .env'
docker-compose exec -T app sh -c 'echo DB_SCHEMA=public >> .env'
docker-compose exec -T app sh -c 'echo DB_TABLE_PREFIX= >> .env'
docker-compose exec -T app sh -c 'echo CRAFT_LILT_PLUGIN_QUEUE_DELAY_IN_SECONDS=5 >> .env'
docker-compose exec -T app sh -c 'echo CRAFT_LILT_PLUGIN_QUEUE_DELAY_IN_SECONDS=1 >> .env'
docker-compose exec -T app sh -c 'echo CRAFT_LILT_PLUGIN_QUEUE_MANAGER_WAIT_TIME_IN_SECONDS=86400 >> .env'
docker-compose exec -T app sh -c 'php craft db/restore happylager.sql'
docker-compose exec -T app sh -c 'php craft plugin/install craft-lilt-plugin'
docker-compose exec -T app sh -c 'php craft plugin/install neo'
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineConfig } from "cypress";
export default defineConfig({
viewportWidth: 1920,
viewportHeight: 1080,
defaultCommandTimeout: 60 * 1000,
defaultCommandTimeout: 360 * 1000,
// video: false,
e2e: {
setupNodeEvents(on, config) {
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);
});
})
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const {generateJobData} = require('../../../support/job/generator.js');

describe(
'[Instant] Success path for job with multiple target languages and disabled split send',
() => {
const entryLabel = 'The Future of Augmented Reality';
const entryId = 24;

it('with copy slug disabled & enable after publish disabled', () => {
const {jobTitle, slug} = generateJobData();

cy.instantFlow({
slug,
entryLabel,
jobTitle,
entryId,
copySlug: false,
enableAfterPublish: false,
languages: ['de', 'es', 'uk'],
batchPublishing: true,
splitSend: false
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const {generateJobData} = require('../../../support/job/generator.js');

describe(
'[Instant] Success path for job with single target language',
() => {
const entryLabel = 'The Future of Augmented Reality';
const entryId = 24;

it('with copy slug enabled & enable after publish enabled', () => {
const {jobTitle, slug} = generateJobData();

cy.log(`Job title: ${jobTitle}`)
cy.log(`Slug: ${slug}`)

cy.instantFlow({
slug,
entryLabel,
jobTitle,
entryId,
copySlug: true,
enableAfterPublish: true,
languages: ["de"]
})
});
});
22 changes: 22 additions & 0 deletions e2e/cypress/e2e/jobs/instant/success-path-single-copy-slug.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const {generateJobData} = require('../../../support/job/generator.js');

describe(
'[Instant] Success path for job with single target language',
() => {
const entryLabel = 'The Future of Augmented Reality';
const entryId = 24;

it('with copy slug enabled & enable after publish disabled', () => {
const {jobTitle, slug} = generateJobData();

cy.instantFlow({
slug,
entryLabel,
jobTitle,
entryId,
copySlug: true,
enableAfterPublish: false,
languages: ["de"]
})
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const {generateJobData} = require('../../../support/job/generator.js');

describe(
'[Instant] Success path for job with single target language',
() => {
const entryLabel = 'The Future of Augmented Reality';
const entryId = 24;

it('with copy slug disabled & enable after publish disabled', () => {
const {jobTitle, slug} = generateJobData();

cy.instantFlow({
slug,
entryLabel,
jobTitle,
entryId,
copySlug: false,
enableAfterPublish: false,
languages: ["de"],
splitSend: false,
})
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const {generateJobData} = require('../../../support/job/generator.js');

describe(
'[Instant] Success path for job with single target language',
() => {
const entryLabel = 'The Future of Augmented Reality';
const entryId = 24;

it('with copy slug disabled & enable after publish enabled', () => {
const {jobTitle, slug} = generateJobData();

cy.instantFlow({
slug,
entryLabel,
jobTitle,
entryId,
copySlug: false,
enableAfterPublish: true,
languages: ["de"]
})
});
});
47 changes: 1 addition & 46 deletions e2e/cypress/e2e/jobs/instant/success-path-single.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,49 +19,4 @@ describe(
languages: ["de"],
})
});

it('with copy slug disabled & enable after publish enabled', () => {
const {jobTitle, slug} = generateJobData();

cy.instantFlow({
slug,
entryLabel,
jobTitle,
entryId,
copySlug: false,
enableAfterPublish: true,
languages: ["de"]
})
});

it('with copy slug enabled & enable after publish disabled', () => {
const {jobTitle, slug} = generateJobData();

cy.instantFlow({
slug,
entryLabel,
jobTitle,
entryId,
copySlug: true,
enableAfterPublish: false,
languages: ["de"]
})
});

it('with copy slug enabled & enable after publish enabled', () => {
const {jobTitle, slug} = generateJobData();

cy.log(`Job title: ${jobTitle}`)
cy.log(`Slug: ${slug}`)

cy.instantFlow({
slug,
entryLabel,
jobTitle,
entryId,
copySlug: true,
enableAfterPublish: true,
languages: ["de"]
})
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const {generateJobData} = require('../../../support/job/generator.js');

describe(
'[Verified] Success path for job with multiple target languages with bulk publishing and disabled split send',
() => {
const entryLabel = 'The Future of Augmented Reality';
const entryId = 24;

it('with copy slug disabled & enable after publish disabled', () => {
const {jobTitle, slug} = generateJobData();

cy.verifiedFlow({
slug,
entryLabel,
jobTitle,
entryId,
copySlug: false,
enableAfterPublish: false,
languages: ['de', 'es', 'uk'],
batchPublishing: true,
splitSend: false
});
});

});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const {generateJobData} = require('../../../support/job/generator.js');

describe(
'[Verified] Success path for job with single target language',
() => {
const entryLabel = 'The Future of Augmented Reality';
const entryId = 24;

it('with copy slug enabled & enable after publish enabled', () => {
const {jobTitle, slug} = generateJobData();

cy.log(`Job title: ${jobTitle}`)
cy.log(`Slug: ${slug}`)

cy.verifiedFlow({
slug,
entryLabel,
jobTitle,
entryId,
copySlug: true,
enableAfterPublish: true,
languages: ["de"]
})
});
});
22 changes: 22 additions & 0 deletions e2e/cypress/e2e/jobs/verified/success-path-single-copy-slug.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const {generateJobData} = require('../../../support/job/generator.js');

describe(
'[Verified] Success path for job with single target language',
() => {
const entryLabel = 'The Future of Augmented Reality';
const entryId = 24;

it('with copy slug enabled & enable after publish disabled', () => {
const {jobTitle, slug} = generateJobData();

cy.verifiedFlow({
slug,
entryLabel,
jobTitle,
entryId,
copySlug: true,
enableAfterPublish: false,
languages: ["de"]
})
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const {generateJobData} = require('../../../support/job/generator.js');

describe(
'[Verified] Success path for job with single target language',
() => {
const entryLabel = 'The Future of Augmented Reality';
const entryId = 24;

it('with copy slug disabled & enable after publish disabled', () => {
const {jobTitle, slug} = generateJobData();

cy.verifiedFlow({
slug,
entryLabel,
jobTitle,
entryId,
copySlug: false,
enableAfterPublish: false,
languages: ["de"],
splitSend: false
})
});
});
Loading

0 comments on commit 29755ce

Please sign in to comment.