Created
October 25, 2015 15:01
-
-
Save yashaka/bf510c8f2b8f63ae8903 to your computer and use it in GitHub Desktop.
Tasj course lesson 5-0 - Tiny Review of E2E Implementation - notes_
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
*** | |
- "task 1" = active task | |
+ "task 2" = comleted task | |
All filter | |
- "a" | |
- "b" | |
+ "c" | |
assertTasks("a", "b", "c") | |
tasks.shouldHave(texts("a", "b", "c")); | |
Active filter | |
- "a" | |
- "b" | |
+ "c" << hidden | |
assertTasks("a", "b") | |
tasks.shouldHave(texts("a", "b")); // => ERROR | |
ListMissMatch: | |
actual: ["a", "b", ] | |
expected: ["a", "b"] | |
assertTasks("a", "b") | |
tasks.filter(visible).shouldHave(texts("a", "b")); | |
// => PASSED | |
All filter | |
- "a" | |
- "b" | |
+ "c" | |
assertTasks("a", "b", "c") | |
tasks.filter(visible).shouldHave(texts("a", "b", "c")); | |
1 assertVisibleTasks with filter(visible) | |
+ pros | |
+ easy straightforward implementation | |
- cons | |
- "n tasks"-number times slower at all filter context | |
- lack of full control | |
Alternative >> | |
2 asserts for tasks: assertTasks for all filter and assertVisibleTasks for others | |
assertTasks | |
tasks.shouldHave(texts("a", "b", "c")); | |
assertVisibleTasks | |
tasks.filter(visible).shouldHave(texts("a", "b", "c")); | |
- cons | |
- less straightforward way to implement step checks | |
+ pros | |
+ fast on all filter | |
+ more control during automation (using gray-box style techniques) | |
*** | |
addTasks("a", "b", c") | |
toggleTask("a") | |
filterActive() | |
editTask("b", "b edited") | |
deleteTask("b edited") | |
Since the only entity in our app is tasks, we can omit it to make it more readable and clear >> | |
add("a", "b", c") | |
toggle("a") | |
filterActive() | |
edit("b", "b edited") | |
delete("b edited") | |
*** | |
add("a", "b") | |
assertItemsLeft(2) | |
toggle("b") | |
assertItemsLeft(1) | |
edit("a", "a edited") | |
Summary: | |
-? after each action | |
- less readable | |
- too much of lower priority checks in smoke tests | |
+ nevertheless, better coverage | |
+- no | |
+ readable | |
+? after base actions (1-2 times) | |
+ pretty readable | |
+ at least somehow covered |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment