diff --git a/fe1-web/src/features/digital-cash/screens/DigitalCashWallet.tsx b/fe1-web/src/features/digital-cash/screens/DigitalCashWallet.tsx index e8fea5769c..7517e09fd5 100644 --- a/fe1-web/src/features/digital-cash/screens/DigitalCashWallet.tsx +++ b/fe1-web/src/features/digital-cash/screens/DigitalCashWallet.tsx @@ -52,6 +52,7 @@ const DigitalCashWallet = () => { containerStyle={List.getListItemStyles(true, rollCallTokens.length === 0)} style={List.getListItemStyles(true, rollCallTokens.length === 0)} bottomDivider + testID="digital-cash-coin-issuance" onPress={() => { navigation.navigate(STRINGS.navigation_digital_cash_send_receive, { isCoinbase: true, @@ -82,6 +83,7 @@ const DigitalCashWallet = () => { containerStyle={listStyle} style={listStyle} bottomDivider + testID={`digital-cash-roll-call-token-${idx}`} onPress={() => { navigation.navigate(STRINGS.navigation_digital_cash_send_receive, { rollCallId: rollCallToken.rollCallId.valueOf(), diff --git a/fe1-web/src/features/digital-cash/screens/SendReceive/SendReceive.tsx b/fe1-web/src/features/digital-cash/screens/SendReceive/SendReceive.tsx index 0a469d6cc1..d0900ac71e 100644 --- a/fe1-web/src/features/digital-cash/screens/SendReceive/SendReceive.tsx +++ b/fe1-web/src/features/digital-cash/screens/SendReceive/SendReceive.tsx @@ -261,6 +261,7 @@ const SendReceive = () => { onFocus={() => setBeneficiaryFocused(true)} placeholder={STRINGS.digital_cash_wallet_beneficiary_placeholder} isMonospaced + testID="digital-cash-send-beneficiary" /> )} @@ -270,10 +271,14 @@ const SendReceive = () => { value={amount} onChange={setAmount} placeholder={STRINGS.digital_cash_wallet_amount_placeholder} + testID="digital-cash-send-amount" /> {error !== '' && {error}} - + {STRINGS.digital_cash_wallet_send_transaction} diff --git a/fe1-web/src/features/digital-cash/screens/SendReceive/__tests__/__snapshots__/SendReceive.test.tsx.snap b/fe1-web/src/features/digital-cash/screens/SendReceive/__tests__/__snapshots__/SendReceive.test.tsx.snap index 0733362e2a..2a41bc9627 100644 --- a/fe1-web/src/features/digital-cash/screens/SendReceive/__tests__/__snapshots__/SendReceive.test.tsx.snap +++ b/fe1-web/src/features/digital-cash/screens/SendReceive/__tests__/__snapshots__/SendReceive.test.tsx.snap @@ -473,6 +473,7 @@ exports[`SendReceive renders correctly 1`] = ` }, ] } + testID="digital-cash-send-beneficiary" value="" /> @@ -574,6 +575,7 @@ exports[`SendReceive renders correctly 1`] = ` }, ] } + testID="digital-cash-send-amount" value="" /> @@ -594,6 +596,7 @@ exports[`SendReceive renders correctly 1`] = ` "opacity": 1, } } + testID="digital-cash-send-button" > @@ -1224,6 +1228,7 @@ exports[`SendReceive renders correctly with passed scanned pop token 1`] = ` }, ] } + testID="digital-cash-send-amount" value="" /> @@ -1244,6 +1249,7 @@ exports[`SendReceive renders correctly with passed scanned pop token 1`] = ` "opacity": 1, } } + testID="digital-cash-send-button" > script("setTimeout(() => document.evaluate('//div[text()=\\'" + text + "\\']', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.click(), 1000)") - + * def selectOption = (selector, option) => select(selector, option).script("_.dispatchEvent(new Event('change', {bubbles: true}))") # Wallet screen * def wallet_seed_wallet_text = "[data-testid='seed_wallet_text']" * def wallet_new_wallet_button = "[data-testid='exploring_selector']" @@ -33,6 +33,8 @@ Feature: web page object * def event_rollcall_pop_token = "div[data-testid='roll_call_pop_token']" * def event_rollcall_first_attendee = "div[data-testid='attendee_0']" * def event_first_current_event = "[data-testid='current_event_selector_0']" + * def event_open_rollcall_button = "{}Open Roll-Call" + * def event_close_rollcall_button = "{}Close Roll-Call" # Drawer menu * def drawer_menu_button = "[data-testid='drawer_menu_button']" @@ -62,6 +64,14 @@ Feature: web page object * def social_chirp_love_count = "[data-testid='heart-count']" * def social_chirp_delete = "[data-testid='delete_chirp']" + # Digital Cash screen + * def digital_cash_coin_issuance_button = "[data-testid='digital-cash-coin-issuance']" + * def digital_cash_first_roll_call_button = "[data-testid='digital-cash-roll-call-token-0']" + * def digital_cash_amount_input = "input[data-testid='digital-cash-send-amount']" + * def digital_cash_beneficiary_input = "input[data-testid='digital-cash-send-beneficiary']" + * def digital_cash_beneficiary_select = "select" + * def digital_cash_send_button = "{}Send Transaction" + @name=open_app Scenario: Given driver webDriverOptions @@ -120,8 +130,30 @@ Feature: web page object And organizer.closeRollCall(lao, rollCall, [popToken, organizer.publicKey]) And delay(1000) + @name=organizer_with_pop_token + Scenario: + Given call read(PLATFORM_FEATURE) { name: '#(CREATE_LAO)', params: { organization_name: 'Join roll call' } } + And def rollCallName = 'My Roll-Call' + When waitFor(event_create_button).click() + And call read(PLATFORM_FEATURE) { name: '#(CLICK_CREATE_ROLLCALL)' } + And waitFor(event_rollcall_name_input).input(rollCallName) + And waitFor(event_rollcall_location_input).input('Between 1 and 0s') + And waitFor(event_rollcall_confirm_button).click() + Then waitForText(event_first_current_event, rollCallName) + When waitFor(event_first_current_event).click() + And waitFor(event_open_rollcall_button).click() + And delay(500) + And def popToken = text(event_rollcall_first_attendee) + And waitFor(event_close_rollcall_button).click() + @name=switch_to_social_page Scenario: Given waitFor(drawer_menu_button).click() And waitFor(drawer_menu_social).click() And delay(500) + + @name=switch_to_digital_cash_page + Scenario: + Given waitFor(drawer_menu_button).click() + And waitFor(drawer_menu_digital_cash).click() + And delay(500) diff --git a/tests/karate/src/test/java/karate-config.js b/tests/karate/src/test/java/karate-config.js index b1dfb7a20b..27c3ace4fa 100644 --- a/tests/karate/src/test/java/karate-config.js +++ b/tests/karate/src/test/java/karate-config.js @@ -95,6 +95,7 @@ function fn() { config.webDriverOptions = { webDriverSession: { capabilities, + // desiredCapabilities is there for compatibility with karate desiredCapabilities: {} } }; @@ -114,6 +115,7 @@ function fn() { 'appium:avd': karate.properties['avd'], } }, + // desiredCapabilities is there for compatibility with karate desiredCapabilities: { } }