From ec22b17516cbab6769e36169455d307ce02d4534 Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Sun, 25 Aug 2024 06:59:11 +0700 Subject: [PATCH] Create login.e2e.js --- app/tests/unit_test/login.e2e.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 app/tests/unit_test/login.e2e.js diff --git a/app/tests/unit_test/login.e2e.js b/app/tests/unit_test/login.e2e.js new file mode 100644 index 0000000..b3877e3 --- /dev/null +++ b/app/tests/unit_test/login.e2e.js @@ -0,0 +1,14 @@ +import { device, expect } from 'detox'; + +describe('Login', () => { + beforeEach(async () => { + await device.reloadReactNative(); + }); + + it('logs in successfully', async () => { + await element(by.id('username')).typeText('username'); + await element(by.id('password')).typeText('password'); + await element(by.id('loginButton')).tap(); + await expect(element(by.id('walletScreen'))).toBeVisible(); + }); +});