Skip to content

Commit

Permalink
feat(ui): add link to changes page in major-update task
Browse files Browse the repository at this point in the history
  • Loading branch information
acburdine committed Mar 16, 2021
1 parent 4a37e39 commit e5d5459
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions lib/tasks/major-update/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ module.exports = async function ui(ctx) {
}

ctx.ui.log(`You can also check theme compatibility at ${chalk.cyan('https://gscan.ghost.org')}\n`);
ctx.ui.log(`Please review the full list of breaking changes at ${chalk.cyan('https://ghost.org/docs/changes/')}\n`);
} else {
let message = '';

Expand Down Expand Up @@ -92,6 +93,7 @@ module.exports = async function ui(ctx) {
}

ctx.ui.log(`You can also check theme compatibility at ${chalk.cyan('https://gscan.ghost.org')}\n`);
ctx.ui.log(`Please review the full list of breaking changes at ${chalk.cyan('https://ghost.org/docs/changes/')}\n`);
}
}

Expand Down
10 changes: 5 additions & 5 deletions test/unit/tasks/major-update/ui-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('Unit: Tasks > Major Update > UI', function () {
});

await ui(ctx);
expect(ctx.ui.log.callCount).to.eql(4);
expect(ctx.ui.log.callCount).to.eql(5);
expect(ctx.ui.confirm.calledOnce).to.be.true;
expect(ctx.ui.confirm.args[0][1], 'confirm prompt default should be true').to.be.true;
});
Expand All @@ -74,7 +74,7 @@ describe('Unit: Tasks > Major Update > UI', function () {
});

await ui(ctx);
expect(ctx.ui.log.callCount).to.eql(6);
expect(ctx.ui.log.callCount).to.eql(7);
expect(ctx.ui.confirm.calledTwice).to.be.true;
expect(ctx.ui.confirm.args[1][1], 'confirm prompt default should be false').to.be.false;

Expand Down Expand Up @@ -111,7 +111,7 @@ describe('Unit: Tasks > Major Update > UI', function () {
});

await ui(ctx);
expect(ctx.ui.log.callCount).to.eql(7);
expect(ctx.ui.log.callCount).to.eql(8);
expect(ctx.ui.confirm.calledTwice).to.be.true;
expect(ctx.ui.confirm.args[1][1], 'confirm prompt default should be false').to.be.false;

Expand Down Expand Up @@ -154,7 +154,7 @@ describe('Unit: Tasks > Major Update > UI', function () {
expect(err.message).to.match(/Update aborted/);
expect(err.logMessageOnly).to.be.true;

expect(ctx.ui.log.callCount).to.eql(8);
expect(ctx.ui.log.callCount).to.eql(9);
expect(ctx.ui.confirm.calledTwice).to.be.true;

const output = stripAnsi(ctx.ui.log.args.join(' '));
Expand Down Expand Up @@ -203,7 +203,7 @@ describe('Unit: Tasks > Major Update > UI', function () {
expect(err.message).to.match(/Migration failed. Your theme has fatal errors/);
expect(err.logMessageOnly).to.exist;

expect(ctx.ui.log.callCount).to.eql(9);
expect(ctx.ui.log.callCount).to.eql(10);
expect(ctx.ui.confirm.calledOnce).to.be.true;

const output = stripAnsi(ctx.ui.log.args.join(' '));
Expand Down

0 comments on commit e5d5459

Please sign in to comment.