Last active
February 17, 2020 21:28
-
-
Save mhamel06/bd595db1d46603048b8362b8a01d52e5 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('should not call viewTransaction on first pending transaction: with harness', async()=>{ | |
fixture.detectChanges(); | |
spyOn(component, 'viewTransaction'); | |
/* | |
* Find the first transactionItem that is marked as pending | |
* */ | |
const transactionItemHarness = await loader.getHarness(TransactionItemHarness.with({ | |
transactionPending: true | |
})); | |
/* | |
* No need to verify that the query returned at least one item like above. | |
* If clickViewTransactionButton() is called but no items are found the test | |
* will fail. | |
* */ | |
await transactionItemHarness.clickViewTransactionButton(); | |
expect(component.viewTransaction).not.toHaveBeenCalled(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment