Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate partial-test following issue #561 guidelines #584

Closed
wants to merge 0 commits into from
Closed

Migrate partial-test following issue #561 guidelines #584

wants to merge 0 commits into from

Conversation

lbdm44
Copy link

@lbdm44 lbdm44 commented Jul 15, 2017

Migration of partial-test.ts according to #561.

QUnit.test('static partial with named arguments', () => {
env.registerBasicComponent('foo-bar', BasicComponent, `<p>{{@foo}}-{{partial 'test'}}</p>`);
this.assertStableRerender();
this.assertHTML('Respeck my name. When my name come up put some respeck on it.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an update and reset step for this.

this.rerender({ item: 'age' });
this.assertHTML('Respeck my age. When my age come up put some respeck on it.');
this.assertStableNodes();

this.rerender({ item: 'name' });
this.assertStableNodes();
this.assertHTML('Respeck my name. When my name come up put some respeck on it.');


rerender(null, { assertStable: true });
this.rerender(props);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is basically doing the same thing as L39. Can you add an update and reset step like I mentioned above.

@chadhietala
Copy link
Member

@lbdm44 As part of porting the tests we would like to get more coverage in the cases. In all of the units that are dynamic can you add the update and reset steps like I mentioned above? Also when we are re-rendering we want to use the assertStableNodes method instead of the assertStableRerender. Here is a good example https://github.com/glimmerjs/glimmer-vm/blob/master/packages/@glimmer/runtime/test/initial-render-test.ts#L237-L253

@lbdm44 lbdm44 closed this Aug 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants