{"id":18753225,"url":"https://github.com/kpn/py-detox-bridge","last_synced_at":"2025-04-13T00:31:36.291Z","repository":{"id":49047824,"uuid":"96204424","full_name":"kpn/py-detox-bridge","owner":"kpn","description":"A bridge to enable python code to use the detox grey-box testing API","archived":false,"fork":false,"pushed_at":"2023-08-04T14:13:01.000Z","size":2602,"stargazers_count":4,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T17:05:08.783Z","etag":null,"topics":["detox","e2e-tests","test","testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kpn.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-04T10:06:57.000Z","updated_at":"2023-07-28T12:36:45.000Z","dependencies_parsed_at":"2022-09-06T22:14:05.953Z","dependency_job_id":null,"html_url":"https://github.com/kpn/py-detox-bridge","commit_stats":null,"previous_names":["kpn-digital/py-detox-bridge"],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpn%2Fpy-detox-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpn%2Fpy-detox-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpn%2Fpy-detox-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpn%2Fpy-detox-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kpn","download_url":"https://codeload.github.com/kpn/py-detox-bridge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650590,"owners_count":21139670,"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":["detox","e2e-tests","test","testing"],"created_at":"2024-11-07T17:24:54.020Z","updated_at":"2025-04-13T00:31:33.495Z","avatar_url":"https://github.com/kpn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Detox Python Bridge\n===========================\n\n.. image:: https://github.com/kpn-digital/py-detox-bridge/workflows/Build%20\u0026%20test%20py-detox-bridge-workflow/badge.svg\n    :target:  https://github.com/kpn-digital/py-detox-bridge/actions\n\n.. image:: https://img.shields.io/codecov/c/github/kpn-digital/py-detox-bridge/master.svg\n    :target: http://codecov.io/github/kpn-digital/py-detox-bridge?branch=master\n\n.. image:: https://img.shields.io/pypi/v/detox-bridge.svg\n    :target: https://pypi.python.org/pypi/detox-bridge\n\n.. image:: https://readthedocs.org/projects/detox-bridge/badge/?version=latest\n    :target: http://detox-bridge.readthedocs.org/en/latest/?badge=latest\n\nA bridge to enable python code to use the detox grey-box testing API ( https://github.com/wix/detox )\n\n\nRequirements\n============\n\nNVM\n---\n\nThe package requires nvm to be installed. Either the NVM environment variable needs to contain the full path of the nvm.sh script, or\nthe NVM_DIR environment variable needs to point at the root directory of nvm containing the nvm.sh script.\n\nNODE\n----\n\nThe code emitted by this bridge requires node 7.6.0 or higher.\n\n\nPython\n------\n\n3.7 is required to use the package.\n\nDetox\n-----\n\nFollow the getting started guide from detox ( https://github.com/wix/detox/blob/master/docs/Introduction.GettingStarted.md )\n\n\nUsage\n=====\n\n.. code:: python\n\n   from detox_bridge import jsawait, by, detox, device, element, expect, node_with_detox\n\n   app_path = \"detox/examples/demo-react-native\"\n\n   # Start Node server in app_path root folder that contains node_modules\n\n   with node_with_detox(app_path=app_path, default_timeout=10) as appserver:\n\n       # Detox Config (we could also load this from package.json)\n\n       ios_sim_release = {\n           \"binaryPath\": \"ios/build/Build/Products/Release-iphonesimulator/example.app\",\n           \"type\": \"ios.simulator\",\n           \"name\": \"iPhone 7 Plus\"\n       }\n\n       configurations_obj = {\"configurations\": {\"ios.sim.release\": ios_sim_release}}\n\n       # Longer timeout since the app may be installed\n\n       appserver(jsawait(detox.init(configurations_obj)), timeout=360)\n\n       # Reload react native\n\n       appserver(jsawait(device.reloadReactNative()))\n\n       # Expectation\n\n       appserver(jsawait(expect(element(by.id('welcome'))).toBeVisible()))\n\n       # Cleanup\n\n       appserver(jsawait(detox.cleanup()))\n\nDevelopment\n===========\n\n\nRequirements\n------------\n\nPython 3.7 are required to run the suite suite.\n\nCheckout\n--------\n\nAfter checkout run::\n\n   make app_local_requirements\n\n\nRunning tests\n-------------\n\nTo run the test suite::\n\n    make test\n\n\nOnce the venv is there you can also run some tests via tox::\n\n    venv/bin/tox -e py35 -- -k \u003cregex\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpn%2Fpy-detox-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkpn%2Fpy-detox-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpn%2Fpy-detox-bridge/lists"}