{"id":21575570,"url":"https://github.com/rangle/angular-testing-workshop","last_synced_at":"2025-03-18T06:45:44.930Z","repository":{"id":54369440,"uuid":"87254131","full_name":"rangle/angular-testing-workshop","owner":"rangle","description":null,"archived":false,"fork":false,"pushed_at":"2021-02-22T22:39:34.000Z","size":200,"stargazers_count":2,"open_issues_count":14,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-24T13:32:26.331Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/rangle.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":"2017-04-05T01:55:04.000Z","updated_at":"2018-08-17T01:46:53.000Z","dependencies_parsed_at":"2022-08-13T13:40:23.579Z","dependency_job_id":null,"html_url":"https://github.com/rangle/angular-testing-workshop","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/rangle%2Fangular-testing-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangle%2Fangular-testing-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangle%2Fangular-testing-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangle%2Fangular-testing-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rangle","download_url":"https://codeload.github.com/rangle/angular-testing-workshop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244173507,"owners_count":20410295,"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-24T12:13:38.606Z","updated_at":"2025-03-18T06:45:44.885Z","avatar_url":"https://github.com/rangle.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angluar Testing Workshop\n\n## View the slides\n\n`cd slides`\n`npm install`\n`npm start`\nhttp://localhost:8081/\n\n## Resources\n\n### Angular.io\n\n### Rangle's ngrx architecture example app\n\nhttps://github.com/rangle/angular-ngrx-example/\n\n## exercises\n\nUsing Angular 4.0.0\n\n`cd exercises`\n\n`yarn` or `npm install`\n\n`npm run ex1`\n\nAPI: http://localhost:3000\n\nApp: http://localhost:4200\n\n`npm test ex1`\n\nCode for exercise is in `ex1/app/landing-page`.\n\nTo modify backend data, stop the app edit `mock-api/database.json` and restart.\n\nFor the solution replace \"ex1\" with \"ex1-sol\".\n\n#### Test Utility Wrappers\n\nConfigure test module: `import { configureTestModule } from './test/configure-test-module.function';\n\n```javascript\n// usage:\nbeforeEach(configureTestModule({\n  imports: [],\n  declarations: []\n  providers: [],\n}));\n```\n\nWrappers: `import {TestComponentSupport} from './test/test-component-support.class'\n\n```javascript\n// usage:\nlet support:TestComponentSupport\u003cMyComponent\u003e = new TestComponentSupport(MyComponent);\n\n```\npublic API:\n\n* `component` Type `T` (an instance of your component)\n* `detectChanges()` Runs change detection on your component.\n* `update()` Runs `ngOnChanges` on your component, if available.\n* `whenStable()` Same as Fixture method of same name.\n* `querySelector(selector: string): any` Retuns an HTMLElement.  Could probably be `querySelector(selector: string): HTMLElement`\n* `querySelectorAll(selector: string): any[]`\n* `getAttributeValue(selector: string, attributeName: string)`\n* `getStyle(selector: string)`\n* `getClassNames(selector: string)`\n* `getInnerHtml(selector: string)`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frangle%2Fangular-testing-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frangle%2Fangular-testing-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frangle%2Fangular-testing-workshop/lists"}