🐛 Fixed saving of custom integrations

closes https://github.com/TryGhost/Ghost/pull/14183
refs 3ee0c3ff53

- unskipped test for integration saving
- fixed missed rename from `save` to `saveTask`
- fixed `saveTask` throwing from a "handled" validation error
This commit is contained in:
Kevin Ansfield 2022-02-21 17:25:12 +00:00
parent 17de5a91ff
commit 1df79dda2b
3 changed files with 12 additions and 3 deletions

View File

@ -186,7 +186,16 @@ export default class IntegrationController extends Controller {
}
@task(function* () {
try {
return yield this.integration.save();
} catch (e) {
if (e === undefined) {
// validation error
return false;
}
throw e;
}
})
saveTask;

View File

@ -9,7 +9,7 @@
{{this.integration.name}}
</h2>
<section class="view-actions">
<GhTaskButton @task={{this.save}} @class="gh-btn gh-btn-primary gh-btn-icon" data-test-button="save" />
<GhTaskButton @task={{this.saveTask}} @class="gh-btn gh-btn-primary gh-btn-icon" data-test-button="save" />
</section>
</GhCanvasHeader>

View File

@ -278,7 +278,7 @@ describe('Acceptance: Settings - Integrations - Custom', function () {
).to.equal('/settings/integrations/1');
});
it.skip('can manage an integration', async function () {
it('can manage an integration', async function () {
this.server.create('integration');
await visit('/settings/integrations/1');