Skip to content

Commit 05ad838

Browse files
committed
Emphasize 'Clear completed' buttouun
1 parent 83482c3 commit 05ad838

2 files changed

Lines changed: 20 additions & 10 deletions

File tree

index.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@
44
<meta charset="utf-8">
55
<title>VanillaJS • TodoMVC</title>
66
<link rel="stylesheet" href="node_modules/todomvc-app-css/index.css">
7+
<style>
8+
.clear-completed {
9+
background: #ff4757;
10+
color: #fff;
11+
padding: 8px 12px;
12+
border-radius: 6px;
13+
border: none;
14+
box-shadow: 0 2px 0 rgba(0,0,0,0.12);
15+
cursor: pointer;
16+
font-weight: 700;
17+
}
18+
.clear-completed:hover {
19+
background: #ff6b81;
20+
}
21+
</style>
722
</head>
823
<body>
924
<section class="todoapp">
@@ -29,7 +44,7 @@ <h1>todos</h1>
2944
<a href="#/completed">Completed</a>
3045
</li>
3146
</ul>
32-
<button class="clear-completed" style="font-weight:bold">Clear completed</button>
47+
<button class="clear-completed">🧹 Clear Completed</button>
3348
</footer>
3449
</section>
3550
<footer class="info">

tests/todo.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,15 @@
2222
# go to the example app
2323
browser.get('http://localhost:8000')
2424
browser.implicitly_wait(10)
25-
26-
# snapshot empty state
27-
percy_snapshot(browser, 'Empty Todo State')
28-
29-
# snapshot with a new todo
25+
# perform actions: add a todo and mark it completed
3026
new_todo_input = browser.find_element(By.CLASS_NAME, 'new-todo')
3127
new_todo_input.send_keys('Try Percy')
3228
new_todo_input.send_keys(Keys.ENTER)
33-
percy_snapshot(browser, 'With a Todo')
34-
35-
# snapshot with a completed todo
3629
todo_toggle = browser.find_element(By.CLASS_NAME, 'toggle')
3730
todo_toggle.click()
38-
percy_snapshot(browser, 'Completed Todo')
31+
32+
# single Percy snapshot for the final state
33+
percy_snapshot(browser, 'Final Todo State')
3934

4035
# clean up
4136
browser.quit()

0 commit comments

Comments
 (0)