{"id":15536821,"url":"https://github.com/trentmwillis/dom-box","last_synced_at":"2026-05-15T20:32:39.602Z","repository":{"id":65996638,"uuid":"98566059","full_name":"trentmwillis/dom-box","owner":"trentmwillis","description":"A toolbox to help you test the DOM","archived":false,"fork":false,"pushed_at":"2017-09-16T00:41:42.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-05T04:03:37.718Z","etag":null,"topics":["dom","javascript","testing"],"latest_commit_sha":null,"homepage":"","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/trentmwillis.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":"2017-07-27T17:59:06.000Z","updated_at":"2017-09-16T00:41:43.000Z","dependencies_parsed_at":"2023-06-28T17:31:41.640Z","dependency_job_id":null,"html_url":"https://github.com/trentmwillis/dom-box","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/trentmwillis/dom-box","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trentmwillis%2Fdom-box","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trentmwillis%2Fdom-box/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trentmwillis%2Fdom-box/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trentmwillis%2Fdom-box/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trentmwillis","download_url":"https://codeload.github.com/trentmwillis/dom-box/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trentmwillis%2Fdom-box/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33078899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["dom","javascript","testing"],"created_at":"2024-10-02T11:53:45.247Z","updated_at":"2026-05-15T20:32:39.580Z","avatar_url":"https://github.com/trentmwillis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QUnit-DOM\n\nQUnit-DOM is a set of helpers for testing code that interacts with the Document Object Model in a browser. It is designed to improve the maintainability, clarity, and quality of unit-style tests in the browser.\n\nIt strives to be independent of any specific front-end framework but also provides hooks for integration where needed.\n\n## DOM Objects\n\nDOM Objects are inspired by the Page Object pattern from Selenium. They are simple objects that allow you to add a layer of abstraction to give semantic meaning to the DOM you are interested in for your tests.\n\nIn particular, DOM Objects stive for the following:\n\n* Semantically represent the features of the UI\n* Don't make assertions\n* Can represent a portion of or the entirety of a page\n* Can return DOM Nodes or further DOM Objects\n\nThese characteristics make DOM Objects a minimal abstraction that can then be composed (see below) to great effect.\n\n## DOM Interactions\n\nThe ins-and-outs of interacting with DOM, including many edge cases for event dispatching and ordering, make it very tedious to test even simple scenarios. QUnit-DOM provides a set of interaction helpers to make those interactions dead simple.\n\n## DOM Object Interactions\n\nDOM Objects and Interactions are convenient on their own, but together they allow you to test complex UI flows with a powerful level of expressiveness.\n\nFor instance, if you wanted to test a user login flow, then you might say the following in English:\n\n```\nClick the login button\nFill in the name field\nFill in the password field\nClick submit\nVerify the popup is displayed\nClick close on the popup\nVerify the popup is closed\n```\n\nWith QUnit-DOM this can be easily translated into the following:\n\n```js\nawait dom.click(page.login);\nawait dom.fillIn(page.name, 'Trent Willis');\nawait dom.fillIn(page.password, 'cats');\nawait dom.click(page.submit);\n\nassert.ok(page.popup);\n\nawait dom.click(page.popupClose);\n\nassert.notOk(page.popup);\n```\n\nOr maybe you're testing a loading state and want to verify that it transitions correctly:\n\n```js\nawait dom.click(page.linkToSlowRoute);\nawait dom.waitFor(() =\u003e page.loadingSpinner);\nawait dom.waitFor(() =\u003e !page.loadingSpinner);\n\nassert.equal(page.header, 'Welcome to Slow Route!');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrentmwillis%2Fdom-box","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrentmwillis%2Fdom-box","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrentmwillis%2Fdom-box/lists"}