0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

🐛 Fixed dashboard appearing blank if members disabled before completing onboarding

closes https://linear.app/tryghost/issue/ONC-106

- moved onboarding display outside of the `isMembersEnabled` conditional block
This commit is contained in:
Kevin Ansfield 2024-06-20 10:16:54 +01:00
parent be79f385f2
commit 643b80ad4c
2 changed files with 37 additions and 28 deletions

View file

@ -85,13 +85,10 @@
{{#if this.isLoading }} {{#if this.isLoading }}
<GhLoadingSpinner /> <GhLoadingSpinner />
{{else}} {{else}}
{{#if this.areMembersEnabled}}
{{#if this.onboarding.isChecklistShown}} {{#if this.onboarding.isChecklistShown}}
<Dashboard::OnboardingChecklist /> <Dashboard::OnboardingChecklist />
{{/if}} {{/if}}
{{#if (and this.areMembersEnabled (not this.onboarding.isChecklistShown))}}
{{#unless this.onboarding.isChecklistShown}}
{{#if this.hasPaidTiers}} {{#if this.hasPaidTiers}}
<Dashboard::Charts::Overview /> <Dashboard::Charts::Overview />
{{/if}} {{/if}}
@ -116,7 +113,6 @@
<Dashboard::Parts::Zero /> <Dashboard::Parts::Zero />
{{/if}} {{/if}}
</div> </div>
{{/unless}}
{{/if}} {{/if}}
{{#unless this.onboarding.isChecklistShown}} {{#unless this.onboarding.isChecklistShown}}

View file

@ -50,6 +50,19 @@ describe('Acceptance: Onboarding', function () {
expect(find('[data-test-dashboard="header"]'), 'header').to.not.exist; expect(find('[data-test-dashboard="header"]'), 'header').to.not.exist;
expect(find('[data-test-dashboard="attribution"]'), 'attribution section').to.not.exist; expect(find('[data-test-dashboard="attribution"]'), 'attribution section').to.not.exist;
}); });
it('checklist is shown when members disabled', async function () {
this.server.db.settings.update({membersSignupAccess: 'none'});
await visit('/setup/done');
await visit('/dashboard');
// onboarding is't shown
expect(find('[data-test-dashboard="onboarding-checklist"]'), 'checklist').to.exist;
// other default dashboard elements are not visible
expect(find('[data-test-dashboard="header"]'), 'header').to.not.exist;
expect(find('[data-test-dashboard="attribution"]'), 'attribution section').to.not.exist;
});
}); });
describe('checklist (non-owner)', function () { describe('checklist (non-owner)', function () {