From 74a4480418883e5e19ecb9a22f9aaef00ccb4884 Mon Sep 17 00:00:00 2001 From: GleidsonDaniel Date: Mon, 9 May 2022 15:13:13 -0300 Subject: [PATCH] fix tests --- app/views/SidebarView/index.tsx | 2 +- appium/tests/helpers/gestures.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/SidebarView/index.tsx b/app/views/SidebarView/index.tsx index 1a5d34597..a0a715882 100644 --- a/app/views/SidebarView/index.tsx +++ b/app/views/SidebarView/index.tsx @@ -237,7 +237,7 @@ class Sidebar extends Component { theme={theme!} right={} onPress={() => this.sidebarNavigate('StatusView')} - testID='sidebar-custom-status' + test='sidebar-custom-status' /> ); }; diff --git a/appium/tests/helpers/gestures.ts b/appium/tests/helpers/gestures.ts index 9e177956a..d0a389aef 100644 --- a/appium/tests/helpers/gestures.ts +++ b/appium/tests/helpers/gestures.ts @@ -1,3 +1,4 @@ +// @ts-ignore import { RectReturn } from '@wdio/protocols/build/types'; /** @@ -37,6 +38,7 @@ const SWIPE_DIRECTION = { }; async function swipe(from: XY, to: XY) { + // @ts-ignore await driver.performActions([ { // a. Create the event @@ -61,6 +63,7 @@ async function swipe(from: XY, to: XY) { } ]); // Add a pause, just to make sure the swipe is done + // @ts-ignore await driver.pause(1000); } @@ -81,6 +84,7 @@ function getDeviceScreenCoordinates(screenSize: RectReturn, coordinates: XY): XY async function swipeOnPercentage(from: XY, to: XY) { // Get the screen size and store it so it can be re-used. // This will save a lot of webdriver calls if this methods is used multiple times. + // @ts-ignore SCREEN_SIZE = SCREEN_SIZE || (await driver.getWindowRect()); // Get the start position on the screen for the swipe const pressOptions = getDeviceScreenCoordinates(SCREEN_SIZE, from);