git ssb

1+

Daan Patchwork / manyverse



Commit e2dc688a7cc6afc88d9b7593cd3d3ab7a7e1787f

dx: update e2e tests for likes/reactions

Andre Staltz committed on 4/3/2020, 7:09:45 PM
Parent: ea1dfd54ee007f3f2de1fa3d332656d9cb810efd

Files changed

e2e/feed.jschanged
e2e/feed.jsView
@@ -191,42 +191,45 @@
191191 await likeButton.click();
192192 t.pass('I tap the like button');
193193
194194 await driver.sleep(1000);
195- const likeCount = await driver.waitForElementByAndroidUIAutomator(
195+ const reactions = await driver.waitForElementByAndroidUIAutomator(
196196 'new UiSelector().textContains("Please like this message")' +
197197 '.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("๐Ÿ‘"))' +
200200 ')',
201201 6000,
202202 );
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');
205204
206205 t.end();
207206 });
208207
209208 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',
211210 async function(t) {
212- const likeCount = await driver.waitForElementByAndroidUIAutomator(
211+ const reactions = await driver.waitForElementByAndroidUIAutomator(
213212 'new UiSelector().textContains("Please like this message")' +
214213 '.fromParent(' +
215- 'new UiSelector().descriptionContains("Like Count Button")' +
214+ 'new UiSelector().descriptionContains("Reactions Button")' +
216215 ')',
217216 6000,
218217 );
219- t.pass('I see the like count');
218+ t.pass('I see the reactions');
220219
221- await likeCount.click();
220+ await reactions.click();
222221 t.pass('I tap it');
223222
224- const likeList = await driver.waitForElementsByAndroidUIAutomator(
223+ const reactionsList = await driver.waitForElementsByAndroidUIAutomator(
225224 'new UiSelector().descriptionContains("Link To Account")',
226225 6000,
227226 );
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+ );
229232
230233 await driver.back();
231234 t.pass('I press the (hardware) back button');
232235

Built with git-ssb-web