{"id":20293000,"url":"https://github.com/gemini-testing/testplane-safari-commands","last_synced_at":"2025-04-11T11:32:03.010Z","repository":{"id":43481336,"uuid":"268063590","full_name":"gemini-testing/testplane-safari-commands","owner":"gemini-testing","description":"Testplane plugin to add/wrap browser commands for iOS Safari","archived":false,"fork":false,"pushed_at":"2024-05-23T12:54:35.000Z","size":310,"stargazers_count":2,"open_issues_count":2,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-20T10:38:47.761Z","etag":null,"topics":["testplane-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gemini-testing.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-30T11:11:47.000Z","updated_at":"2025-03-02T14:28:28.000Z","dependencies_parsed_at":"2024-11-19T01:34:12.920Z","dependency_job_id":null,"html_url":"https://github.com/gemini-testing/testplane-safari-commands","commit_stats":{"total_commits":42,"total_committers":4,"mean_commits":10.5,"dds":"0.23809523809523814","last_synced_commit":"c02ff2c92e4198d604ca22161704f7b64486bfb9"},"previous_names":["gemini-testing/testplane-safari-commands","gemini-testing/hermione-safari-commands"],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Ftestplane-safari-commands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Ftestplane-safari-commands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Ftestplane-safari-commands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Ftestplane-safari-commands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gemini-testing","download_url":"https://codeload.github.com/gemini-testing/testplane-safari-commands/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248383917,"owners_count":21094631,"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":["testplane-plugin"],"created_at":"2024-11-14T15:20:38.764Z","updated_at":"2025-04-11T11:32:02.991Z","avatar_url":"https://github.com/gemini-testing.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @testplane/safari-commands\n\n[![NPM version](https://img.shields.io/npm/v/@testplane/safari-commands.svg?style=flat)](https://www.npmjs.org/package/@testplane/safari-commands)\n[![Build Status](https://travis-ci.org/gemini-testing/testplane-safari-commands.svg?branch=master)](https://travis-ci.org/gemini-testing/testplane-safari-commands)\n\nPlugin for [Testplane](https://github.com/gemini-testing/testplane) which is intended to add/wrap browser commands in order to work properly with the iOS safari browser.\n\nYou can read more about Testplane plugins [here](https://github.com/gemini-testing/testplane#plugins).\n\n## Installation\n\n```bash\nnpm install @testplane/safari-commands\n```\n\n## Usage\n\nPlugin has following configuration:\n\n* **enabled** (optional) `Boolean` – enable/disable the plugin, by default plugin is enabled;\n* **browsers** (required) `Object` - the list of browsers to use for wrap commands;\n  * **commands** (required) `Array` - commands which will be wrapped.\n  * **nativeElementsSize** (optional) `Object` - the map of native elements sizes for the browser. Sizes in pixels without counting the pixel ratio. Can be used in order to speed up taking screenshots;\n    * **topToolbar** (required) `Object` - the size of the top toolbar;\n      * **width** (required) `Number` - the width of the top toolbar;\n      * **height** (required) `Number` - the height of the top toolbar;\n    * **bottomToolbar** (required) `Object` - the size of the bottom toolbar;\n      * **width** (required) `Number` - the width of the bottom toolbar;\n      * **height** (required) `Number` - the height of the bottom toolbar;\n    * **webview** (required) `Object` - the size of the webview;\n      * **width** (required) `Number` - the width of the webview;\n      * **height** (required) `Number` - the height of the webview;\n\n\nAlso there is ability to override plugin parameters by CLI options or environment variables\n(see [configparser](https://github.com/gemini-testing/configparser)).\nUse `testplane_safari_commands_` prefix for the environment variables and `--testplane-safari-commands-` for the cli options.\n\nAdd plugin to your `testplane` config file:\n\n```js\nmodule.exports = {\n    // ...\n    system: {\n        plugins: {\n            '@testplane/safari-commands': {\n                enabled: true,\n                browsers: {\n                    safari13: {\n                        commands: [\n                            'url',\n                            'click',\n                            'screenshot',\n                            'orientation',\n                            'swipe',\n                            'touch',\n                            'dragAndDrop'\n                        ],\n                        nativeElementsSize: {\n                            topToolbar: {\n                                height: 47,\n                                width: 390\n                            },\n                            bottomToolbar: {\n                                height: 113,\n                                width: 390\n                            },\n                            webview: {\n                                height: 654,\n                                width: 390\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    },\n    //...\n}\n```\n\n### Existing safari commands:\n\nWrappers over existing commands:\n* **url** - wrapper over wdio \"url\" in order to wait until the page is completely open (used timeout from [`testplane.pageLoadTimeout`](https://github.com/gemini-testing/testplane#pageloadtimeout) or `30000` ms). In [appium-xcuitest-driver](https://github.com/appium/appium-xcuitest-driver) page is open with using the `xcrun` utility - `xcrun simctl openurl` which just tells the simulator to open the page and does not wait anything;\n* **click** - replaces wdio \"click\" in order to perform real touch click (by default it emits only events on passed element). Should be used with **touch** command;\n* **screenshot** - wrapper of wdio \"screenshot\" in order to cut the native elements from the final image ([calibration](https://github.com/gemini-testing/testplane#calibrate) must be turned off);\n* **orientation** - wrapper of wdio \"orientation\" in order to recalculate size of native elements for \"screenshot\" command (turns on automatically when you specify a screenshot command);\n* **swipe** - replaces wdio \"swipe\" in order to perform swipe by coordinates in native context;\n* **touch** - replaces wdio \"touch\" in order to perform touch click by coordinates in native context;\n* **dragAndDrop** - replaces wdio \"dragAndDrop\" in order to perform drag and drop elements by coordinates in native context.\n\nCommands to work with native elements:\n* **deviceClickBack** - command to click back button on device, which closes the current tab and returns to the previous one.\n\n## Testing\n\nRun [mocha](http://mochajs.org) tests:\n```bash\nnpm run test-unit\n```\n\nRun [eslint](http://eslint.org) codestyle verification\n```bash\nnpm run lint\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini-testing%2Ftestplane-safari-commands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgemini-testing%2Ftestplane-safari-commands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini-testing%2Ftestplane-safari-commands/lists"}