{"id":15015816,"url":"https://github.com/mainmatter/ember-test-selectors","last_synced_at":"2026-02-12T11:01:44.806Z","repository":{"id":5336065,"uuid":"52875107","full_name":"mainmatter/ember-test-selectors","owner":"mainmatter","description":"Enabling better element selectors in Ember.js tests","archived":false,"fork":false,"pushed_at":"2026-02-07T10:32:48.000Z","size":5778,"stargazers_count":262,"open_issues_count":16,"forks_count":41,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-02-07T13:31:45.612Z","etag":null,"topics":["ember","hacktoberfest","test","test-selectors"],"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/mainmatter.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-03-01T12:27:28.000Z","updated_at":"2025-11-18T08:32:19.000Z","dependencies_parsed_at":"2023-02-17T13:00:54.340Z","dependency_job_id":"4a4d6d29-7946-4f74-a415-224de02bf461","html_url":"https://github.com/mainmatter/ember-test-selectors","commit_stats":{"total_commits":1184,"total_committers":41,"mean_commits":"28.878048780487806","dds":0.5836148648648649,"last_synced_commit":"c1d80b6b150da40983b203141f592adc63f4f879"},"previous_names":["simplabs/ember-test-selectors"],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/mainmatter/ember-test-selectors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mainmatter%2Fember-test-selectors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mainmatter%2Fember-test-selectors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mainmatter%2Fember-test-selectors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mainmatter%2Fember-test-selectors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mainmatter","download_url":"https://codeload.github.com/mainmatter/ember-test-selectors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mainmatter%2Fember-test-selectors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29363615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ember","hacktoberfest","test","test-selectors"],"created_at":"2024-09-24T19:47:59.584Z","updated_at":"2026-02-12T11:01:44.771Z","avatar_url":"https://github.com/mainmatter.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"ember-test-selectors\n==============================================================================\n\nEnabling better element selectors in [Ember.js](http://emberjs.com) tests\n\n\u003e [!NOTE]\n\u003e ember-test-selectors was written and is maintained by [Mainmatter](https://mainmatter.com) and contributors.\n\u003e We offer consulting, training, and team augmentation for Ember.js – check out our [website](https://mainmatter.com/ember-consulting/) to learn more!\n\nFeatures\n------------------------------------------------------------------------------\n\n- Removes attributes starting with `data-test-` from HTML tags and\n  component/helper invocations in your templates for production builds\n\n- Removes properties starting with `data-test-` from your JS objects like\n  component classes for production builds\n\nMore information on why that is useful are available on our\n[blog](https://mainmatter.com/blog/2017/11/17/ember-test-selectors-road-to-1-0/)!\n\n\nCompatibility\n------------------------------------------------------------------------------\n\n- Classic Ember apps: Ember 3.8 or above, Ember CLI 3.8 or above\n- Embroider+Vite apps: Ember 3.28 or above, Ember CLI 4.12 or above\n- Node.js 18 or above\n\n\nInstallation in a Classic Ember app\n------------------------------------------------------------------------------\n\nInstall and use `ember-test-selectors` addon:\n\n```bash\nember install ember-test-selectors\n```\n\nSee the [addon configuration in the dedicated README](https://github.com/mainmatter/ember-test-selectors/blob/master/ember-test-selectors/README.md).\n\n\nInstallation in an Embroider+Vite app\n------------------------------------------------------------------------------\n\nIt's recommended to install and configure `strip-test-selectors` Babel plugin directly. (You can install and use `ember-test-selectors` classic addon, but `@embroider/compat` will have to rewrite it to maintain the compatibility with Vite, and this step has a performance cost.)\n\n```bash\npnpm add -D strip-test-selectors\n```\n\nSee the [Babel configuration in the dedicated README](https://github.com/mainmatter/ember-test-selectors/blob/master/strip-test-selectors/README.md).\n\n\nUsage\n------------------------------------------------------------------------------\n\nIn your templates you are now able to use `data-test-*` attributes and get them removed from `production` builds:\n\n```hbs\n\u003carticle\u003e\n  \u003ch1 data-test-post-title data-test-resource-id={{post.id}}\u003e{{post.title}}\u003c/h1\u003e\n  \u003cp\u003e{{post.body}}\u003c/p\u003e\n  \u003cbutton data-test-like-button\u003eLike\u003c/button\u003e\n\u003c/article\u003e\n```\n\nOnce you've done that you can use attribute selectors to look up and interact\nwith those elements:\n\n```js\nassert.dom('[data-test-post-title]').hasText('Ember is great!');\n\nawait click('[data-test-like-button]');\n```\n\n### Usage with Components\n\nYou can use the same syntax also for component invocations:\n\n```hbs\n\u003cSpinner @color=\"blue\" data-test-spinner\u003e\n```\n\nInside the `Spinner` component template the `data-test-spinner` attribute will\nbe applied to the element that has `...attributes` on it, or on the component\nwrapper `div` element if you don't use `tagName = ''`.\n\n\n### Usage in Ember addons\n\nIf you want to use ember-test-selectors in an addon make sure that it appears\nin the `dependencies` section of the `package.json` file, not in the\n`devDependencies`. This ensures that the selectors are also stripped correctly\neven if the app that uses the addon does not use ember-test-selectors itself.\n\n\nLicense\n------------------------------------------------------------------------------\n\nember-test-selectors is developed by and \u0026copy;\n[Mainmatter GmbH](http://mainmatter.com) and contributors. It is released under the\n[MIT License](https://github.com/mainmatter/ember-test-selectors/blob/master/LICENSE).\n\nember-test-selectors is not an official part of [Ember.js](http://emberjs.com)\nand is not maintained by the Ember.js Core Team.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmainmatter%2Fember-test-selectors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmainmatter%2Fember-test-selectors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmainmatter%2Fember-test-selectors/lists"}