Created
October 11, 2019 21:04
-
-
Save drwpow/71dda01283b0bc60b48f6f17e997661b to your computer and use it in GitHub Desktop.
Spec test code
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
import { newSpecPage } from '@stencil/core/testing'; | |
import { ManifoldResourceStatus } from './manifold-resource-status'; | |
import { ManifoldResourceStatusView } from '../manifold-resource-status-view/manifold-resource-status-view'; | |
describe('<manifold-resource-status>', () => { | |
describe('v0 props', () => { | |
it('[loading]: renders spinner icon', async () => { | |
const page = await newSpecPage({ | |
html: '<manifold-resource-status></manifold-resource-status>', | |
components: [ManifoldResourceStatus, ManifoldResourceStatusView], | |
}); | |
page.root.loading = true; | |
await page.waitForChanges(); | |
const view = page.root.querySelector('manifold-resource-status-view'); | |
const spinner = view.shadowRoot.querySelector('manifold-icon'); | |
expect(spinner).not.toBeNull(); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment