diff --git a/CHANGELOG.md b/CHANGELOG.md index 8110eda41..b224775b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - mwc-floating-label-directive - mwc-top-app-bar-fixed - mwc-top-app-bar-short +- Testing Infra: + - Tests now in TS + - Tests now all pass + - ## [0.6.0] - 2019-06-05 - Upgrade lerna to 3.x diff --git a/test/src/util/helpers.ts b/test/src/util/helpers.ts index 5b3be4a28..56aa3f748 100644 --- a/test/src/util/helpers.ts +++ b/test/src/util/helpers.ts @@ -89,13 +89,17 @@ interface FixtureOptions { } export const fixture = - (template: TemplateResult, options?: Partial) => { + async (template: TemplateResult, options?: Partial) => { const opts: FixtureOptions = {...defaultOpts, ...options}; const tf = opts.document.createElement('test-fixture') as TestFixture; tf.shouldAttachContents = opts.shouldAttachContents; tf.template = template; + opts.document.body.appendChild(tf); + if (opts.shouldAttachContents) { + await tf.updateComplete; + } return tf; };