Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
device.enableSynchronization();
device.disableSynchronization();
device.resetContentAndSettings();
device.getPlatform();
// Matchers
// --------
by.id("flowType");
by.text("flowType is great!");
by.label("welcome");
// $ExpectError
by.label(123);
by.type("RCTImageView");
by.traits(["button"]);
// $ExpectError
by.traits("button");
// Actions on element
// ------------------
element(by.id("testElement")).tap();
element(by.id("testElement")).longPress();
// $ExpectError
element(by.id("testElement")).multiTap(true);
element(by.id("testElement")).multiTap(3);
// $ExpectError
element(by.id("testElement")).tapAtPoint();
element(by.id("testElement")).tapAtPoint({ x: 5, y: 10 });
// $ExpectError
element(by.id("testElement")).typeText(false);
device.setURLBlacklist(["https://flow.org", "https://flow.org"]);
device.enableSynchronization();
device.disableSynchronization();
device.resetContentAndSettings();
device.getPlatform();
// Matchers
// --------
by.id("flowType");
by.text("flowType is great!");
by.label("welcome");
// $ExpectError
by.label(123);
by.type("RCTImageView");
by.traits(["button"]);
// $ExpectError
by.traits("button");
// Actions on element
// ------------------
element(by.id("testElement")).tap();
element(by.id("testElement")).longPress();
// $ExpectError
element(by.id("testElement")).multiTap(true);
element(by.id("testElement")).multiTap(3);
// $ExpectError
element(by.id("testElement")).tapAtPoint();
element(by.id("testElement")).tapAtPoint({ x: 5, y: 10 });
it('should search and find a message', async() => {
await element(by.id('room-actions-search')).tap();
await waitFor(element(by.id('search-messages-view'))).toExist().withTimeout(2000);
await expect(element(by.id('search-message-view-input'))).toBeVisible();
await element(by.id('search-message-view-input')).replaceText(`/${ data.random }message/`);
await waitFor(element(by.text(`${ data.random }message`).withAncestor(by.id('search-messages-view'))).atIndex(0)).toBeVisible().withTimeout(60000);
await expect(element(by.text(`${ data.random }message`).withAncestor(by.id('search-messages-view'))).atIndex(0)).toBeVisible();
await element(by.traits(['button'])).atIndex(0).tap();
await backToActions();
});