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

test(grid-list): add unit tests for grid-list #555

Merged
merged 1 commit into from
May 28, 2016
Merged

Conversation

kara
Copy link
Contributor

@kara kara commented May 27, 2016

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label May 27, 2016

it('should throw error if cols is not defined', () => {
var template = `<md-grid-list></md-grid-list>`;
return builder.overrideTemplate(TestGridList, template)
Copy link
Member

Choose a reason for hiding this comment

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

Rather than doing return on each build, you can simply make each test async and they should auto finish because zones.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

fixture.detectChanges();
let tile = fixture.debugElement.query(By.directive(MdGridTile));

// 149.5 * 2 = 299px + 1px gutter = 300px
Copy link
Member

Choose a reason for hiding this comment

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

Great comments

{text: 'One', cols: 3, rows: 1, color: 'lightblue'},
{text: 'Two', cols: 1, rows: 2, color: 'lightgreen'},
{text: 'Three', cols: 1, rows: 1, color: 'lightpink'},
{text: 'Four', cols: 2, rows: 1, color: '#DDBDF1'},
Copy link
Member

Choose a reason for hiding this comment

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

Why are there colors?

Copy link
Member

Choose a reason for hiding this comment

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

Also these colors are boring. You should try some better ones like sienna, mediumaquamarine, or lemonchiffon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ha, it's a relic from the demo page. I'll remove!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lemonchiffon?

Copy link
Member

Choose a reason for hiding this comment

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

@jelbourn
Copy link
Member

LGTM

@kara kara force-pushed the gridtest branch 5 times, most recently from 0748ef8 to 258513c Compare May 28, 2016 00:29
@kara
Copy link
Contributor Author

kara commented May 28, 2016

All tests are now passing (added a tick() to the 4 failures to fix Mobile Safari). Merging it in!

@kara kara merged commit bab7f01 into angular:master May 28, 2016
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants