Skip to content

Commit dde2db2

Browse files
committed
Add resetApp() to all performTouchAction tests for test isolation and stability
1 parent 314b374 commit dde2db2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/helper/Appium_test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ describe('Appium', function () {
365365

366366
describe('#performTouchAction', () => {
367367
it('should react on swipeUp action @second', async () => {
368+
await app.resetApp()
368369
await app.tap("//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']")
369370
await app.waitForText('Gesture Type', 10, "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']")
370371
await app.swipeUp("//android.widget.LinearLayout[@resource-id = 'io.selendroid.testapp:id/LinearLayout1']", 1200, 1000)
@@ -390,6 +391,7 @@ describe('Appium', function () {
390391
})
391392

392393
it('should react on swipeLeft action', async () => {
394+
await app.resetApp()
393395
await app.tap("//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']")
394396
await app.waitForText('Gesture Type', 10, "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']")
395397
await app.swipeLeft("//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']")
@@ -401,6 +403,7 @@ describe('Appium', function () {
401403
})
402404

403405
it('should react on swipeRight action', async () => {
406+
await app.resetApp()
404407
await app.tap("//android.widget.Button[@resource-id = 'io.selendroid.testapp:id/touchTest']")
405408
await app.waitForText('Gesture Type', 10, "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']")
406409
await app.swipeRight("//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/gesture_type_text_view']")

0 commit comments

Comments
 (0)