Skip to content

Commit a61a2b7

Browse files
committed
use find function from shallow render
1 parent 87e72c6 commit a61a2b7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/app/onboarding/components/glam/create-archive-for-me-screen/create-archive-for-me-screen.component.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ describe('CreateArchiveForMeScreenComponent', () => {
3939
});
4040

4141
it('should emit goBackOutput when the Back button is clicked', async () => {
42-
const { fixture, outputs } = await shallow.render();
43-
const backButton = fixture.debugElement.query(By.css('.back'));
42+
const { fixture, outputs, find } = await shallow.render();
43+
const backButton = find('.back');
4444

4545
backButton.triggerEventHandler('buttonClick', null);
4646

4747
expect(outputs.goBackOutput.emit).toHaveBeenCalledWith('start');
4848
});
4949

5050
it('should emit continueOutput with correct payload when the Yes, create archive button is clicked', async () => {
51-
const { outputs, fixture } = await shallow.render();
52-
const continueButton = fixture.debugElement.query(By.css('.continue'));
51+
const { outputs, fixture, find } = await shallow.render();
52+
const continueButton = find('.continue');
5353

5454
continueButton.triggerEventHandler('buttonClick', null);
5555

0 commit comments

Comments
 (0)