{"id":20852444,"url":"https://github.com/rumax/dom-events-mocking","last_synced_at":"2025-10-26T05:04:04.220Z","repository":{"id":57214729,"uuid":"72746628","full_name":"rumax/dom-events-mocking","owner":"rumax","description":"Dom events mocking","archived":false,"fork":false,"pushed_at":"2016-12-27T20:52:10.000Z","size":224,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-02-19T08:03:03.182Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rumax.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2016-11-03T13:12:26.000Z","updated_at":"2016-11-06T20:42:53.000Z","dependencies_parsed_at":"2022-08-26T13:41:44.463Z","dependency_job_id":null,"html_url":"https://github.com/rumax/dom-events-mocking","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/rumax%2Fdom-events-mocking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumax%2Fdom-events-mocking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumax%2Fdom-events-mocking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumax%2Fdom-events-mocking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rumax","download_url":"https://codeload.github.com/rumax/dom-events-mocking/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243222205,"owners_count":20256227,"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-18T03:17:41.888Z","updated_at":"2025-10-26T05:03:59.180Z","avatar_url":"https://github.com/rumax.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"DOM events mocking\n[![npm version](https://badge.fury.io/js/dom-events-mocking.svg)](https://badge.fury.io/js/dom-events-mocking) [![CircleCI](https://circleci.com/gh/rumax/dom-events-mocking.svg?style=svg)](https://circleci.com/gh/rumax/dom-events-mocking)\n\n=============\n\nWraps the DOM API to make real events mocking in the browser using method chaining.\n\n\u003e npm install --save dome-events\n\n\nImplements the following DOM events methods and helpers:\n  - `click`\n  - `dblclick`\n  - `drag`\n  - `at`\n  - `wait`\n  - `exec`\n  - `async`\n  - `done`\n  - etc.\n\n\n## Why Do I Need This?\n\nIf you want to test your application and want/can use JavaScript only, but still cover UI events. Or write some integration tests:\n\n```js\nit('Can handle my events', (done) =\u003e {\n  const btn = document.getElelemntById('YOUR_BUTTON');\n\n  events\n    .click(btn)\n    .exec(() =\u003e {\n      expect('YOUR_VALIDATION').toBeTruthy();\n    })\n    .click(() =\u003e {\n      // Dynamically created button\n      return document.getElelemntById('YOUR_NEW_BUTTON');\n    })\n    .exec(() =\u003e {\n      expect('YOUR_ANOTHER_VALIDATION').toBeFalsy();\n    })\n    .done(() =\u003e {\n      // Final validations\n      console.log('All steps executed');\n      done();\n    });\n});\n```\n\n![Demo](https://raw.githubusercontent.com/rumax/dom-events-mocking/develop/res/click.gif)\n\nBased on [happen](https://www.npmjs.com/package/happen).\n\n## License\n\nBSD-2-Clause\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frumax%2Fdom-events-mocking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frumax%2Fdom-events-mocking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frumax%2Fdom-events-mocking/lists"}