Commit e2dc688a7cc6afc88d9b7593cd3d3ab7a7e1787f
dx: update e2e tests for likes/reactions
Andre Staltz committed on 4/3/2020, 7:09:45 PMParent: ea1dfd54ee007f3f2de1fa3d332656d9cb810efd
Files changed
e2e/feed.js | changed |
e2e/feed.js | ||
---|---|---|
@@ -191,42 +191,45 @@ | ||
191 | 191 | await likeButton.click(); |
192 | 192 | t.pass('I tap the like button'); |
193 | 193 | |
194 | 194 | await driver.sleep(1000); |
195 | - const likeCount = await driver.waitForElementByAndroidUIAutomator( | |
195 | + const reactions = await driver.waitForElementByAndroidUIAutomator( | |
196 | 196 | 'new UiSelector().textContains("Please like this message")' + |
197 | 197 | '.fromParent(' + |
198 | - 'new UiSelector().descriptionContains("Like Count Button")' + | |
199 | - '.childSelector(new UiSelector().textContains("like"))' + | |
198 | + 'new UiSelector().descriptionContains("Reactions Button")' + | |
199 | + '.childSelector(new UiSelector().textContains("๐"))' + | |
200 | 200 | ')', |
201 | 201 | 6000, |
202 | 202 | ); |
203 | - const count = await likeCount.text(); | |
204 | - t.equals(count, '1 like', 'I see "1 like" as the counter'); | |
203 | + t.ok(reactions, 'I see the reactions displaying a thumbs up'); | |
205 | 204 | |
206 | 205 | t.end(); |
207 | 206 | }); |
208 | 207 | |
209 | 208 | t.test( |
210 | - 'I can see that someone has liked a message in the Accounts screen', | |
209 | + 'I can see that someone has reacted to a message in the Reactions screen', | |
211 | 210 | async function(t) { |
212 | - const likeCount = await driver.waitForElementByAndroidUIAutomator( | |
211 | + const reactions = await driver.waitForElementByAndroidUIAutomator( | |
213 | 212 | 'new UiSelector().textContains("Please like this message")' + |
214 | 213 | '.fromParent(' + |
215 | - 'new UiSelector().descriptionContains("Like Count Button")' + | |
214 | + 'new UiSelector().descriptionContains("Reactions Button")' + | |
216 | 215 | ')', |
217 | 216 | 6000, |
218 | 217 | ); |
219 | - t.pass('I see the like count'); | |
218 | + t.pass('I see the reactions'); | |
220 | 219 | |
221 | - await likeCount.click(); | |
220 | + await reactions.click(); | |
222 | 221 | t.pass('I tap it'); |
223 | 222 | |
224 | - const likeList = await driver.waitForElementsByAndroidUIAutomator( | |
223 | + const reactionsList = await driver.waitForElementsByAndroidUIAutomator( | |
225 | 224 | 'new UiSelector().descriptionContains("Link To Account")', |
226 | 225 | 6000, |
227 | 226 | ); |
228 | - t.equals(likeList.length, 1, 'I see 1 person having liked the message'); | |
227 | + t.equals( | |
228 | + reactionsList.length, | |
229 | + 1, | |
230 | + 'I see 1 person reacted to the message', | |
231 | + ); | |
229 | 232 | |
230 | 233 | await driver.back(); |
231 | 234 | t.pass('I press the (hardware) back button'); |
232 | 235 |
Built with git-ssb-web