diff --git a/test/deploy.test.js b/test/deploy.test.js index 73ecdd38..5dabe827 100644 --- a/test/deploy.test.js +++ b/test/deploy.test.js @@ -105,7 +105,7 @@ describe('Server errors', () => { test('Error in form', async () => { const { stderr } = await run('incorrect_form'); expect(stderr).toMatch( - 'Unknown properties: hello. Available properties are: api_call_notifications, async_callback_actions, authorization_policies, body, callback_actions, default_payload, email_notifications, fields, flash_alert, flash_notice, live_reindex, metadata, name, redirect_to, request_allowed, resource, resource_owner, response_headers, return_to, sms_notifications, spam_protection.' + 'Unknown properties in `form_configurations/hello.liquid`: hello. Available properties are: api_call_notifications, async_callback_actions, authorization_policies, body, callback_actions, default_payload, email_notifications, fields, flash_alert, flash_notice, live_reindex, metadata, name, redirect_to, request_allowed, resource, resource_owner, response_headers, return_to, sms_notifications, spam_protection.' ); }); diff --git a/test/fixtures/deploy/correct_with_assets/app/assets/bar.js b/test/fixtures/deploy/correct_with_assets/app/assets/bar.js new file mode 100644 index 00000000..a693db7f --- /dev/null +++ b/test/fixtures/deploy/correct_with_assets/app/assets/bar.js @@ -0,0 +1 @@ +// Test asset file diff --git a/test/fixtures/deploy/modules_update/app/pos-modules.json b/test/fixtures/deploy/modules_update/app/pos-modules.json index 970703eb..55aee05b 100644 --- a/test/fixtures/deploy/modules_update/app/pos-modules.json +++ b/test/fixtures/deploy/modules_update/app/pos-modules.json @@ -1,5 +1,5 @@ { "modules": { - "core": "1.5.5" + "core": "2.0.7" } } \ No newline at end of file diff --git a/test/fixtures/deploy/modules_update/app/pos-modules.lock.json b/test/fixtures/deploy/modules_update/app/pos-modules.lock.json index 970703eb..55aee05b 100644 --- a/test/fixtures/deploy/modules_update/app/pos-modules.lock.json +++ b/test/fixtures/deploy/modules_update/app/pos-modules.lock.json @@ -1,5 +1,5 @@ { "modules": { - "core": "1.5.5" + "core": "2.0.7" } } \ No newline at end of file diff --git a/test/sync.test.js b/test/sync.test.js index d90f5738..4edb9c63 100644 --- a/test/sync.test.js +++ b/test/sync.test.js @@ -3,6 +3,7 @@ const exec = require('./utils/exec'); const cliPath = require('./utils/cliPath'); const path = require('path'); +const fs = require('fs'); const stepTimeout = 3500; @@ -28,6 +29,15 @@ const kill = p => { jest.retryTimes(2); +// Store original content to restore after tests +const barJsPath = path.join(cwd('correct_with_assets'), 'app/assets/bar.js'); +const originalBarJsContent = fs.readFileSync(barJsPath, 'utf8'); + +afterAll(() => { + // Restore bar.js to original content after all tests + fs.writeFileSync(barJsPath, originalBarJsContent); +}); + describe('Happy path', () => { test('sync assets', async () => {