mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
Fixed browser tests broken by onboarding changes (#19998)
ref 78311591d0
- updated tests to not click a button on the setup/done screen that is no longer shown
- fixed setup flow showing an alert bar due to not handling the `TransitionAborted` error that is thrown by the setup/done->dashboard redirect
This commit is contained in:
parent
78311591d0
commit
5c05ebe6cb
@ -61,6 +61,11 @@ export default class SetupController extends Controller.extend(ValidationEngine)
|
||||
|
||||
return true;
|
||||
} catch (error) {
|
||||
// handle setup/done route redirecting to dashboard
|
||||
if (error.message === 'TransitionAborted') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (error && error.payload && error.payload.errors) {
|
||||
if (isVersionMismatchError(error)) {
|
||||
return this.notifications.showAPIError(error);
|
||||
@ -141,6 +146,11 @@ export default class SetupController extends Controller.extend(ValidationEngine)
|
||||
let [apiError] = error.payload.errors;
|
||||
this.set('flowErrors', [apiError.message, apiError.context].join(' '));
|
||||
} else {
|
||||
// ignore setup/done route redirecting to dashboard
|
||||
if (error.message === 'TransitionAborted') {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Connection errors don't return proper status message, only req.body
|
||||
this.notifications.showAlert('There was a problem on the server.', {type: 'error', key: 'setup.authenticate.failed'});
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ const setupGhost = async (page) => {
|
||||
await page.getByPlaceholder('At least 10 characters').fill(ownerUser.password);
|
||||
|
||||
await page.getByPlaceholder('At least 10 characters').press('Enter');
|
||||
await page.locator('.gh-done-pink').click();
|
||||
|
||||
await page.locator('.gh-nav').waitFor(options);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user