Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internet reader e2e tests #178

Merged
merged 2 commits into from
Apr 6, 2022
Merged

Conversation

arekkubaczkowski
Copy link
Contributor

@arekkubaczkowski arekkubaczkowski commented Mar 18, 2022

closes #58

Internet reader e2e tests scenarios:

  • Collect, process, capture
  • SetupIntent
  • RRC
  • Refund
  • setReaderDisplay (iOS only)
  • interac

@arekkubaczkowski arekkubaczkowski changed the title internet reader e2e tests WIP: internet reader e2e tests Mar 18, 2022
@jdivock-stripe
Copy link
Contributor

Just confirmed we'll need to have a CA account in order to collect CAD payments and run interact operations. We'll have to add a secret for a CA stripe account, spin everything down and then spin up the CA backend to run interac ops

@arekkubaczkowski arekkubaczkowski changed the title WIP: internet reader e2e tests internet reader e2e tests Mar 22, 2022
@arekkubaczkowski arekkubaczkowski changed the title internet reader e2e tests WIP: internet reader e2e tests Mar 22, 2022
jdivock-stripe
jdivock-stripe previously approved these changes Mar 30, 2022
@arekkubaczkowski
Copy link
Contributor Author

@jdivock-stripe I've managed to set up all e2e tests but due to not working refunding transactions on Android I need to skip them on this platform.

@arekkubaczkowski arekkubaczkowski changed the title WIP: internet reader e2e tests internet reader e2e tests Apr 5, 2022
jdivock-stripe
jdivock-stripe previously approved these changes Apr 5, 2022
Copy link
Contributor

@jdivock-stripe jdivock-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!

@jdivock-stripe jdivock-stripe force-pushed the feat/internet-readers-e2e-tests branch 7 times, most recently from ef5fb99 to 1c2c88a Compare April 6, 2022 16:24
const secret_key = process.env.STRIPE_PRIVATE_KEY;
const secret_ca_key = process.env.STRIPE_CA_PRIVATE_KEY;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a huge fan of this, we're providing this backend as an example reference implementation for our users

@jdivock-stripe jdivock-stripe force-pushed the feat/internet-readers-e2e-tests branch 3 times, most recently from b8dd4f8 to 28c305b Compare April 6, 2022 16:39
internet reader e2e fixes

fix typo

fix e2e tests

tests fixes and improvements

setReadDisplay/clearReaderDisplay e2e test

run setReaderDisplay e2e only on iOS

fix setReaderDisplay test

fix setReaderDisplay scenario

fix test

fix e2e test

improve reader display screen layout

prettier/eslint js files (#172)

* updates

* updates linting settings, adds prettier target

* npm reg

removed tvos target (#179)

templates (#181)

yarn diff check (#180)

* add manual yarn.lock diff check

* force fail

* how about this

* and this

* restore lockfile

Create expo plugin (#113)

* chore: create expo plugin

* chore: add plugin params

* chore: add expo docs

* fix package.json path

upgrade tsc and clean up example app routing param types (#185)

* upgrade tsc

* clean up routing param types

fix: TextInput color on Android (#84)

npm release script (#87)

* chore: add publish script

* chore: update docs

test connection token on init (#177)

* chore: test connection token on init

* chore: render app conditionally

Handle other Android connection methods (#111)

* chore: handle other connection methods

* chore: add proper e2e tests

* fix: e2e tests

* fix: e2e test

* fix indentations

* fix methods params

* fix merge issues

Revert "Handle other Android connection methods (#111)" (#186)

This reverts commit 18db810.

fix dependabot minimist issue (#189)

usb connection type (#188)

upgrade minimist in example app as well (#190)

duplicated event listeners (#182)

* fix: duplicated event listeners

* temporary listener fix

* fix typings

* cleanup

* fix updateing callbacks refs

fix labels

handle multiple secret keys, in-person refund tests

updated android sdk to 2.7.1 (#200)

Android validation and transformation helpers (#192)

* making use of new transformation functions

* validation helpers

* removed some mappers

Handle other Android connection methods #111 (#187)

* chore: handle other connection methods

* chore: add proper e2e tests

* fix: e2e tests

* fix: e2e test

* fix methods params

* rebase fixes

* rebase fix

Co-authored-by: David Henry <dhenry@stripe.com>

StripeTerminalReactNativeModule reduced scope (#202)

* separated callbacks and listeners from RN module

* cancelOperation added

* ReactNativeConstants imports

* extracting reader.serialNumber

[wip] update readme with expo guidance and re-order content (#206)

* update readme with expo guidance and re-order content

* more

* shufflin things

* toc

more doc fixes (#207)

* more fixes

* refactor

* add note about links not being available

adding codeowners (#208)

[WIP] Android unit tests (#204)

* separated callbacks and listeners from RN module

* TokenProvider unit tests

* run unit tests in circleci

* unit test yarn command

* BluetoothReaderListener unit tests

* store test results

* DiscoveryListener unit tests

* updated test output path

* test results path updated

* UsbListenerTest

* TerminalListener and HandoffReaderListener unit tests

* one more try with the test output path

Bump plist from 3.0.4 to 3.0.5 (#216)

Bumps [plist](https://github.com/TooTallNate/node-plist) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/TooTallNate/node-plist/releases)
- [Changelog](https://github.com/TooTallNate/plist.js/blob/master/History.md)
- [Commits](https://github.com/TooTallNate/node-plist/commits)

---
updated-dependencies:
- dependency-name: plist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump ansi-regex from 4.1.0 to 4.1.1 (#215)

Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](chalk/ansi-regex@v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump ansi-regex from 4.1.0 to 4.1.1 in /example (#213)

Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](chalk/ansi-regex@v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump plist from 3.0.4 to 3.0.5 in /example (#214)

Bumps [plist](https://github.com/TooTallNate/node-plist) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/TooTallNate/node-plist/releases)
- [Changelog](https://github.com/TooTallNate/plist.js/blob/master/History.md)
- [Commits](https://github.com/TooTallNate/node-plist/commits)

---
updated-dependencies:
- dependency-name: plist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Reader update errors received by RN SDK (#217)

* reader update errors received by RN SDK

* lint

* ios SDK sends update errors to RN SDK

Prevent from calling methods before SDK initializing SDK (#203)

* prevent from calling methods before SDK initializing SDK

* improve error message

* isInitialized as a util function

Memoize StripeTerminalProvider values (#221)

* fixing hooks deps

* fix android all target

* pushing looping location check

* memoize context

* discover

* rrc

* setupIntents

android permissions util (#218)

* android permissions util

* improve location permission message

add android expo steps to readme (#210)

* add android steps

* shuffle

* update both files

* toc

test tokenProvider on init (#211)

* test tokenProvider on init

* catchable tokenProvider error

Revert "Prevent from calling methods before SDK initializing SDK (#203)" (#225)

This reverts commit 38972ad.

added metadata property to enable Android SDK RN identification (#227)

rename e2e file

patch package

revert API_URL

handle CA server

fix commands

script rename

fix server:ci command

use canada API url from env

fix server endpoint

fix createPaymentIntent via server

Add android expo support and permissions checker (#224)

* update perms helper

* it works

* docs

* refactor permissions utils

logLevel only on StripeTerminalProvider component level (#223)

* logLevel only on StripeTerminalProvider component level

* fix typo

createPaymentIntent uses INTERAC_PRESENT for CAD currency (#232)

* createPaymentIntent uses INTERAC_PRESENT for CAD currency

* createPaymentIntent receives paymentMethodTypes from the POS application

* enum mapping fix

add setSimulatedCard method

clean up

use bluetooth reader for collecting CA payments

fix e2e tests

use keyboard aware scroll view

fix linter

set unique testID

fix tests

fix in-person refund e2e

scroll to bottom before tap

fix log name

fetch latest interac charge

refund - set test card number

fix refund e2e

fix e2e

fix android ui

fix e2e test, record failing tests

prevent call methods being not initialized (#228)

* prevent from calling methods before SDK initializing SDK

* improve error message

* isInitialized as a util function

* improvements

* remove direct functions export

implement onDidReportAvailableUpdate in example app (#236)

enable interac for e2e android scenario

skip refunding tests on android

fix e2e test

add comments
@jdivock-stripe jdivock-stripe force-pushed the feat/internet-readers-e2e-tests branch from 28c305b to b6e3a18 Compare April 6, 2022 17:36
@jdivock-stripe jdivock-stripe force-pushed the feat/internet-readers-e2e-tests branch from 9b4408c to bd1b994 Compare April 6, 2022 18:34
@jdivock-stripe jdivock-stripe merged commit 57bd0b2 into main Apr 6, 2022
arekkubaczkowski added a commit to arekkubaczkowski/stripe-terminal-react-native that referenced this pull request Jun 29, 2022
* internet reader e2e tests

internet reader e2e fixes

fix typo

fix e2e tests

tests fixes and improvements

setReadDisplay/clearReaderDisplay e2e test

run setReaderDisplay e2e only on iOS

fix setReaderDisplay test

fix setReaderDisplay scenario

fix test

fix e2e test

improve reader display screen layout

prettier/eslint js files (stripe#172)

* updates

* updates linting settings, adds prettier target

* npm reg

removed tvos target (stripe#179)

templates (stripe#181)

yarn diff check (stripe#180)

* add manual yarn.lock diff check

* force fail

* how about this

* and this

* restore lockfile

Create expo plugin (stripe#113)

* chore: create expo plugin

* chore: add plugin params

* chore: add expo docs

* fix package.json path

upgrade tsc and clean up example app routing param types (stripe#185)

* upgrade tsc

* clean up routing param types

fix: TextInput color on Android (stripe#84)

npm release script (stripe#87)

* chore: add publish script

* chore: update docs

test connection token on init (stripe#177)

* chore: test connection token on init

* chore: render app conditionally

Handle other Android connection methods (stripe#111)

* chore: handle other connection methods

* chore: add proper e2e tests

* fix: e2e tests

* fix: e2e test

* fix indentations

* fix methods params

* fix merge issues

Revert "Handle other Android connection methods (stripe#111)" (stripe#186)

This reverts commit 18db810.

fix dependabot minimist issue (stripe#189)

usb connection type (stripe#188)

upgrade minimist in example app as well (stripe#190)

duplicated event listeners (stripe#182)

* fix: duplicated event listeners

* temporary listener fix

* fix typings

* cleanup

* fix updateing callbacks refs

fix labels

handle multiple secret keys, in-person refund tests

updated android sdk to 2.7.1 (stripe#200)

Android validation and transformation helpers (stripe#192)

* making use of new transformation functions

* validation helpers

* removed some mappers

Handle other Android connection methods stripe#111 (stripe#187)

* chore: handle other connection methods

* chore: add proper e2e tests

* fix: e2e tests

* fix: e2e test

* fix methods params

* rebase fixes

* rebase fix

Co-authored-by: David Henry <dhenry@stripe.com>

StripeTerminalReactNativeModule reduced scope (stripe#202)

* separated callbacks and listeners from RN module

* cancelOperation added

* ReactNativeConstants imports

* extracting reader.serialNumber

[wip] update readme with expo guidance and re-order content (stripe#206)

* update readme with expo guidance and re-order content

* more

* shufflin things

* toc

more doc fixes (stripe#207)

* more fixes

* refactor

* add note about links not being available

adding codeowners (stripe#208)

[WIP] Android unit tests (stripe#204)

* separated callbacks and listeners from RN module

* TokenProvider unit tests

* run unit tests in circleci

* unit test yarn command

* BluetoothReaderListener unit tests

* store test results

* DiscoveryListener unit tests

* updated test output path

* test results path updated

* UsbListenerTest

* TerminalListener and HandoffReaderListener unit tests

* one more try with the test output path

Bump plist from 3.0.4 to 3.0.5 (stripe#216)

Bumps [plist](https://github.com/TooTallNate/node-plist) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/TooTallNate/node-plist/releases)
- [Changelog](https://github.com/TooTallNate/plist.js/blob/master/History.md)
- [Commits](https://github.com/TooTallNate/node-plist/commits)

---
updated-dependencies:
- dependency-name: plist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump ansi-regex from 4.1.0 to 4.1.1 (stripe#215)

Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](chalk/ansi-regex@v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump ansi-regex from 4.1.0 to 4.1.1 in /example (stripe#213)

Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](chalk/ansi-regex@v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump plist from 3.0.4 to 3.0.5 in /example (stripe#214)

Bumps [plist](https://github.com/TooTallNate/node-plist) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/TooTallNate/node-plist/releases)
- [Changelog](https://github.com/TooTallNate/plist.js/blob/master/History.md)
- [Commits](https://github.com/TooTallNate/node-plist/commits)

---
updated-dependencies:
- dependency-name: plist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Reader update errors received by RN SDK (stripe#217)

* reader update errors received by RN SDK

* lint

* ios SDK sends update errors to RN SDK

Prevent from calling methods before SDK initializing SDK (stripe#203)

* prevent from calling methods before SDK initializing SDK

* improve error message

* isInitialized as a util function

Memoize StripeTerminalProvider values (stripe#221)

* fixing hooks deps

* fix android all target

* pushing looping location check

* memoize context

* discover

* rrc

* setupIntents

android permissions util (stripe#218)

* android permissions util

* improve location permission message

add android expo steps to readme (stripe#210)

* add android steps

* shuffle

* update both files

* toc

test tokenProvider on init (stripe#211)

* test tokenProvider on init

* catchable tokenProvider error

Revert "Prevent from calling methods before SDK initializing SDK (stripe#203)" (stripe#225)

This reverts commit 38972ad.

added metadata property to enable Android SDK RN identification (stripe#227)

rename e2e file

patch package

revert API_URL

handle CA server

fix commands

script rename

fix server:ci command

use canada API url from env

fix server endpoint

fix createPaymentIntent via server

Add android expo support and permissions checker (stripe#224)

* update perms helper

* it works

* docs

* refactor permissions utils

logLevel only on StripeTerminalProvider component level (stripe#223)

* logLevel only on StripeTerminalProvider component level

* fix typo

createPaymentIntent uses INTERAC_PRESENT for CAD currency (stripe#232)

* createPaymentIntent uses INTERAC_PRESENT for CAD currency

* createPaymentIntent receives paymentMethodTypes from the POS application

* enum mapping fix

add setSimulatedCard method

clean up

use bluetooth reader for collecting CA payments

fix e2e tests

use keyboard aware scroll view

fix linter

set unique testID

fix tests

fix in-person refund e2e

scroll to bottom before tap

fix log name

fetch latest interac charge

refund - set test card number

fix refund e2e

fix e2e

fix android ui

fix e2e test, record failing tests

prevent call methods being not initialized (stripe#228)

* prevent from calling methods before SDK initializing SDK

* improve error message

* isInitialized as a util function

* improvements

* remove direct functions export

implement onDidReportAvailableUpdate in example app (stripe#236)

enable interac for e2e android scenario

skip refunding tests on android

fix e2e test

add comments

* hide simulated and connect fields

Co-authored-by: Jason Divock <jdivock@stripe.com>
@nazli-stripe nazli-stripe deleted the feat/internet-readers-e2e-tests branch September 6, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

e2e tests for Internet reader actions
3 participants