Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

chore(toh-5): improve e2e test coverage and readability (use async/await) #2092

Merged
merged 2 commits into from
Aug 17, 2016

Conversation

chalin
Copy link
Contributor

@chalin chalin commented Aug 11, 2016

Improved test coverage. Also updated tests to make use of async/await (so tests are more readable).

This is part of work to get a full suite of e2e tutorial tests to run for Dart (#1619).

Improved test coverage. Also updated tests to make use of async/await
(so tests are more readable).
@chalin
Copy link
Contributor Author

chalin commented Aug 11, 2016

@wardbell @Foxandxss @filipesilva : ready for review.

cc @kwalrath

expect(hero.name).toEqual(targetHero.name);
});

it(`updates hero name (${newHeroName}) in details view`, updateHeroNameInDetailView);
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this the same test as line 98?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we test the updating of the hero name twice: once when accessed via the Dashboard, and once when accessed via the Heroes list. This is how it was in the previous e2e tests.

Copy link
Member

Choose a reason for hiding this comment

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

But I can't see how they can do anything different. Tests runs from a clean state and they seem to be run from the exact same page.

Shouldn't it be dropped? Or there is something I cannot see?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test groups for the Dashboard and the Heroes list are independent. I think that it is reasonable to include this single test (editing the hero name), in both test groups.

@Foxandxss
Copy link
Member

Leaving the comment aside, I don't dislike it, the new Hero class makes it read better.

@kwalrath kwalrath merged commit c931b56 into angular:master Aug 17, 2016
@kwalrath kwalrath deleted the chalin-toh-5-e2e-0811 branch August 17, 2016 16:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants