mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
Fixed browser tests yielding a false passing result in CI (#21401)
no issue
- Browser tests in CI were yielding a passing result even if one or more
tests failed (including retries).
- The `yarn dev` command that triggers the browser tests in CI was
catching any errors and exiting with code 0, resulting in a ✅ in CI.
- This commit changes `yarn dev` to exit with code 1 if the browser
tests fail, so that CI will correctly fail if any of the browser tests
fail.
This commit is contained in:
parent
af0f26c75f
commit
b44ad06015
4
.github/scripts/dev.js
vendored
4
.github/scripts/dev.js
vendored
@ -239,7 +239,8 @@ async function handleStripe() {
|
||||
|
||||
const {result} = concurrently(commands, {
|
||||
prefix: 'name',
|
||||
killOthers: ['failure', 'success']
|
||||
killOthers: ['failure', 'success'],
|
||||
successCondition: 'first'
|
||||
});
|
||||
|
||||
try {
|
||||
@ -250,5 +251,6 @@ async function handleStripe() {
|
||||
console.error(chalk.red(`If you've recently done a \`yarn main\`, dependencies might be out of sync. Try running \`${chalk.green('yarn fix')}\` to fix this.`));
|
||||
console.error(chalk.red(`If not, something else went wrong. Please report this to the Ghost team.`));
|
||||
console.error();
|
||||
process.exit(1);
|
||||
}
|
||||
})();
|
||||
|
@ -59,6 +59,10 @@ const features = [{
|
||||
title: 'Comment Improvements',
|
||||
description: 'Enables new comment features',
|
||||
flag: 'commentImprovements'
|
||||
}, {
|
||||
title: 'Staff 2FA',
|
||||
description: 'Enables email verification for staff logins',
|
||||
flag: 'staff2fa'
|
||||
}, {
|
||||
title: 'Custom Fonts',
|
||||
description: 'Enables new custom font settings',
|
||||
|
@ -121,7 +121,15 @@ export default class SigninVerifyController extends Controller {
|
||||
const resendTokenPath = `${this.ghostPaths.apiRoot}/session/verify`;
|
||||
|
||||
try {
|
||||
yield this.ajax.post(resendTokenPath);
|
||||
try {
|
||||
yield this.ajax.post(resendTokenPath);
|
||||
} catch (error) {
|
||||
// HACK: For some reason, the server returns 200: OK and sends the email but the client still throws an error
|
||||
// So we need to catch the error and throw it if it's not 'OK'
|
||||
if (error !== 'OK') {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
this.startResendTokenCountdown();
|
||||
return TASK_SUCCESS;
|
||||
} catch (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user