{"id":19888906,"url":"https://github.com/paypal/paypal-sdk-e2e-tests","last_synced_at":"2025-05-02T17:32:47.958Z","repository":{"id":37790126,"uuid":"379304990","full_name":"paypal/paypal-sdk-e2e-tests","owner":"paypal","description":"Automation tests for the JS SDK","archived":false,"fork":false,"pushed_at":"2023-11-23T19:34:31.000Z","size":398,"stargazers_count":5,"open_issues_count":4,"forks_count":14,"subscribers_count":18,"default_branch":"main","last_synced_at":"2024-04-13T19:27:23.724Z","etag":null,"topics":["testing","webdriverio-typescript"],"latest_commit_sha":null,"homepage":"https://paypal.github.io/paypal-sdk-e2e-tests/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paypal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-22T14:48:34.000Z","updated_at":"2024-05-07T17:36:19.020Z","dependencies_parsed_at":"2024-05-07T17:49:53.176Z","dependency_job_id":null,"html_url":"https://github.com/paypal/paypal-sdk-e2e-tests","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fpaypal-sdk-e2e-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fpaypal-sdk-e2e-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fpaypal-sdk-e2e-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fpaypal-sdk-e2e-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paypal","download_url":"https://codeload.github.com/paypal/paypal-sdk-e2e-tests/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224324455,"owners_count":17292521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["testing","webdriverio-typescript"],"created_at":"2024-11-12T18:08:36.367Z","updated_at":"2024-11-12T18:08:36.955Z","avatar_url":"https://github.com/paypal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# paypal-sdk-e2e-tests\n\n\u003e Automation tests for the PayPal JS SDK\n\n[![BrowserStack Tests](https://github.com/paypal/paypal-sdk-e2e-tests/actions/workflows/main.yml/badge.svg)](https://github.com/paypal/paypal-sdk-e2e-tests/actions/workflows/main.yml)\n\nThis library uses WebDriver.io and BrowserStack to run end-to-end tests against websites using the JS SDK.\n\n## Quick Start\n\n1. `npm install`\n2. `npm test`\n\n## Features\n\nThere are two different ways to run the test suite:\n\n1. `npm test` - local runner that uses Chrome\n2. `npm run test-browserstack` - uses BrowserStack and requires a username and access key\n\n### Setting Up the `.env` File\n\nBrowserStack requires a username and access key to run tests. Find your credentials using [BrowserStack.com](https://www.browserstack.com/).\n\nIn addition to BrowserStack credentials, you will need PayPal login credentials for the buttons tests to work in your script environment. For example, you will need `BUYER_EMAIL=\u003cstage email\u003e` and `BUYER_PASSWORD=\u003cstage password\u003e` for use with a stage script.\n\nWhen you have your credentials ready, run the following command:\n\n```bash\nnpm run save-credentials\n```\n\nThis will save your credentials to a local .env file, which is ignored by git. This .env file gets loaded by the app and will use the credentials in it to connect to BrowserStack. This is designed for local development. CI tools like GitHub Actions should directly set the BROWSERSTACK_USERNAME, BROWSERSTACK_ACCESS_KEY, BUYER_EMAIL, and BUYER_PASSWORD environment variables.\n\n### Running a single test\n\nBy default, these commands run all the tests in the test suite. To run a single test, pass the test name as an argument like so:\n\n```bash\nnpm test -- --spec paylater-button-click.test.ts\n```\n\n### Running against a custom URL\n\nThe tests run against the following default urls:\n\n-   buttons: https://paypal.github.io/paypal-sdk-e2e-tests/components/buttons/buttons.html\n-   messages: https://paypal.github.io/paypal-sdk-e2e-tests/components/messages/messages.html\n\nThese urls can be overriden using the `BUTTONS_URL` and `MESSAGES_URL` environment variables to test the JS SDK on different websites. For example, the button tests can be run against the react-paypal-js storybook demo:\n\n```bash\nBUTTONS_URL=\"https://paypal.github.io/react-paypal-js/iframe.html?id=example-paypalbuttons--default\u0026args=\u0026viewMode=story\" npm test -- --spec button\n```\n\n### BrowserStack local testing from the command line\n\nBrowserStack local testing can be enabled from the command line by adding `LOCAL_TESTING=true` to `npm run test-browserstack` or `npm run test-browserstack-german`:\n\n```bash\nLOCAL_TESTING=true npm run test-browserstack\n```\n\nThis is useful for running tests using `localhost` and/or a test page that uses a custom JS SDK test environment:\n\n```bash\nBUTTONS_URL=\"https://paypal.github.io/paypal-sdk-e2e-tests/components/buttons/buttons.html?client-id=\u003cclient-id\u003e\u0026sdkBaseURL=\u003cjs-sdk-test-env-url\u003e\" LOCAL_TESTING=true npm run test-browserstack\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaypal%2Fpaypal-sdk-e2e-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaypal%2Fpaypal-sdk-e2e-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaypal%2Fpaypal-sdk-e2e-tests/lists"}