git ssb

1+

Daan Patchwork / manyverse



Commit e1b0adbed7f42dbddeafa2bac1847871bec83dab

dx: update e2e tests with edit profile pic

Andre Staltz committed on 10/6/2018, 3:24:45 PM
Parent: dd03f580f7bbbd025b64314e3fa4eef8a71e7bf7

Files changed

e2e/index.jschanged
e2e/profile.jschanged
e2e/index.jsView
@@ -27,8 +27,9 @@
2727 const localCapabilities = {
2828 browserName: 'Android - local server',
2929 platformName: 'Android',
3030 deviceName: 'Android device',
31+ autoGrantPermissions: true,
3132 app: path.resolve(__dirname, str),
3233 };
3334
3435 let driver;
e2e/profile.jsView
@@ -88,8 +88,25 @@
8888 t.pass('I tap it');
8989 await editDescription.sendKeys('teacher');
9090 t.pass('I type "teacher" into it');
9191
92+ // Edit avatar
93+ const editAvatar = await driver.elementByAndroidUIAutomator(
94+ 'new UiSelector().descriptionContains("Profile Picture")',
95+ );
96+ t.ok(editAvatar, 'I see the Profile Picture');
97+ await editAvatar.tap();
98+ t.pass('I tap it');
99+ await driver.sleep(1000);
100+ t.ok(
101+ await driver.elementByAndroidUIAutomator(
102+ 'new UiSelector().text("Recent")',
103+ ),
104+ 'I see the Android Picture Gallery',
105+ );
106+ await driver.back();
107+ t.pass('I press the (hardware) back button');
108+
92109 // Press save
93110 const saveProfileButton = await driver.elementByAndroidUIAutomator(
94111 'new UiSelector().descriptionContains("Save Profile Button")',
95112 );

Built with git-ssb-web