{"id":19324692,"url":"https://github.com/soarez/easy-frontend-tests","last_synced_at":"2025-02-24T06:16:01.029Z","repository":{"id":22941609,"uuid":"26290928","full_name":"soarez/easy-frontend-tests","owner":"soarez","description":"Slides and content for my talk at require(lx)","archived":false,"fork":false,"pushed_at":"2014-11-06T21:29:54.000Z","size":3172,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-18T03:14:55.317Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/soarez.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}},"created_at":"2014-11-06T21:28:56.000Z","updated_at":"2015-04-02T14:44:09.000Z","dependencies_parsed_at":"2022-09-10T03:41:15.185Z","dependency_job_id":null,"html_url":"https://github.com/soarez/easy-frontend-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/soarez%2Feasy-frontend-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soarez%2Feasy-frontend-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soarez%2Feasy-frontend-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soarez%2Feasy-frontend-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soarez","download_url":"https://codeload.github.com/soarez/easy-frontend-tests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240427298,"owners_count":19799471,"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":[],"created_at":"2024-11-10T02:06:30.661Z","updated_at":"2025-02-24T06:16:00.987Z","avatar_url":"https://github.com/soarez.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Easy front-end tests\n\nWrite \u0026 run front-end tests easily either locally or through a selenium provider.\n\n## Writing tests\n\nWhen specifying the URLs for things that are running locally prefer `vcap.me`\nover `localhost`. This is necessary for some target systems where it isn't easy\nto forward traffic to the tunnel.\n\n### Functional tests\n\nLook at `test/flow1.js` for an example.  \nEdit or create similar files under `test/`.  \nTake a look at the [WEBDRIVER I/O API](http://webdriver.io/api.html) to know\nwhat you can do with the `browser` (or `client`) object.\n\n### Unit tests\n\nLook at `test/unit/lib` for an example.  \nEdit or create similar files under `test/unit`.  \nAdd dependencies in `test/unit/index.html`.\n\n## Selecting target browsers\n\nEdit `test/browsers.js`.  \nThere is should be a list (array) of what browsers to test.\n\n### To add a local browser as target\n\n```javascript\nvar browsers = [\n...\n{ desiredCapabilities: { browserName: 'firefox' } },\n...\n];\n```\n\n### To add a remote browser from a selenium provider\n\ne.g. sauce labs:\n\n```\nvar browsers = [\n...\n  {\n    desiredCapabilities: {\n      browserName: 'internet explorer',\n      platform: 'Windows 8.1',\n      version: '11'\n    },\n    user: process.env.SAUCE_USERNAME,\n    key: process.env.SAUCE_ACCESS_KEY,\n    port: 80,\n    host: 'ondemand.saucelabs.com'\n  }\n...\n];\n```\n\n## Running the tests\n\nFor local tests make sure [selenium server](http://www.seleniumhq.org/) (e.g. `brew install selenium-server-standalone`) is running.\n\nFor remote tests, make sure you have a tunnel setup. e.g. for sauce labs, [Sauce Connect](https://docs.saucelabs.com/reference/sauce-connect/).\n\n### Functional tests\n\n```\n$ mocha\n```\n\n### Unit tests\n\n```\nnode test/unit/run\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoarez%2Feasy-frontend-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoarez%2Feasy-frontend-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoarez%2Feasy-frontend-tests/lists"}