Created
November 15, 2020 07:01
-
-
Save dsebastien/bedbcc69bb5f839c7df8bd71ce2520ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('checks state while async action is in progress', async () => { | |
const buttonHarness = loader.getHarness(MyButtonHarness); | |
await manualChangeDetection(async () => { | |
await buttonHarness.click(); | |
fixture.detectChanges(); | |
// Check expectations while async click operation is in progress. | |
expect(isProgressSpinnerVisible()).toBe(true); | |
await fixture.whenStable(); | |
// Check expectations after async click operation complete. | |
expect(isProgressSpinnerVisible()).toBe(false); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment