mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Fixed tests
no issue - Updated tests for account plan and profile pages
This commit is contained in:
parent
1e2fe6be48
commit
95ec778920
2 changed files with 5 additions and 7 deletions
|
@ -29,13 +29,11 @@ describe('Account Plan Page', () => {
|
|||
});
|
||||
|
||||
test('can choose plan and continue', async () => {
|
||||
const {mockOnActionFn, monthlyCheckboxEl, continueBtn} = setup();
|
||||
expect(monthlyCheckboxEl.checked).toEqual(false);
|
||||
fireEvent.click(monthlyCheckboxEl);
|
||||
const {mockOnActionFn, monthlyCheckboxEl, yearlyCheckboxEl, continueBtn} = setup();
|
||||
expect(monthlyCheckboxEl.checked).toEqual(true);
|
||||
await waitFor(() => {
|
||||
expect(continueBtn).toBeEnabled();
|
||||
});
|
||||
fireEvent.click(yearlyCheckboxEl);
|
||||
expect(yearlyCheckboxEl.checked).toEqual(true);
|
||||
expect(continueBtn).toBeEnabled();
|
||||
|
||||
fireEvent.click(continueBtn);
|
||||
expect(mockOnActionFn).toHaveBeenCalledWith('checkoutPlan', {plan: 'Monthly'});
|
||||
|
|
|
@ -33,6 +33,6 @@ describe('Account Profile Page', () => {
|
|||
|
||||
fireEvent.click(saveBtn);
|
||||
const {email, name} = context.member;
|
||||
expect(mockOnActionFn).toHaveBeenCalledWith('updateMember', {email, name});
|
||||
expect(mockOnActionFn).toHaveBeenCalledWith('updateProfile', {email, name});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue