{"id":23495153,"url":"https://github.com/willklein/ui-testing-workshop","last_synced_at":"2026-01-22T05:02:17.302Z","repository":{"id":145189116,"uuid":"475169685","full_name":"willklein/ui-testing-workshop","owner":"willklein","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-28T23:14:02.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T02:52:21.291Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/willklein.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":"2022-03-28T20:32:46.000Z","updated_at":"2023-03-07T13:34:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"1edf8367-9119-4b14-86aa-49b038e3779f","html_url":"https://github.com/willklein/ui-testing-workshop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/willklein/ui-testing-workshop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willklein%2Fui-testing-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willklein%2Fui-testing-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willklein%2Fui-testing-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willklein%2Fui-testing-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willklein","download_url":"https://codeload.github.com/willklein/ui-testing-workshop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willklein%2Fui-testing-workshop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28655026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-12-25T03:14:34.574Z","updated_at":"2026-01-22T05:02:17.286Z","avatar_url":"https://github.com/willklein.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ui-testing-workshop\n\n## Audience\n\nUI developers - anybody that works on front-end at all\n\n## Notes / discussion with Nicholas Boll\n\ntesting is historically considered an aspect of quality control\nreframe it as key to developer experience\n- easier to develop new things aka \"to write code\"\n- easier to make changes - reacquiring context - or getting the context you never had before because you didn't write it\n- confidence\n- codifying context -\u003e what's in my head now\n  - specifications for what the code should do\n  - implies BDD\n  - don't document implementation -\u003e may help to have an example of test code that is hard to get context of\n  - describing in terms of features, user experience\n  - value of \"should\"\n  - value of matchers - using the right ones or even making custom ones\n  - timebomb tests - find example for a version-based one that goes away when you upgrade a dep\n\ntest from the outside perspective rather than the inside\nif this fails, is it OK or not OK -\u003e codify your assumptions, because sometimes the assumptions will change\n\ntest failure: expects (true) to be (false) -\u003e not good\nyou can add context to a failure\nthis is also where a matcher could be useful to describe what actually \"fails\"\n- show how this gives you more context\n- show how failure is useful or not\n\n\"frontload maintenance work\"\n\nwhat gives us the most **meaningful** feedback - to develop as fast as possible\na little extra work to apply BDD\n\ninternals vs externals\n- implemenation should be able to change - find Enzyme example\n- \n\nwhat is our \"environment?\"\n- avoid developing against SUVs\n- don't develop in your full application stack, develop in a development stack\n- invest into development environments\n- develop in layers, not in mocks / layer your stack, don't mock your stack\n\nJest + React Testing Library\n- mostly unit tests\n- where our developer-based tests are\n\n- always use get queries not find - why? find are asynchronous, run get under the hood\n- intentionality of it should be there vs it may not be there yet\n- never use query unless you have to test for the non-existance\n- getByRole - cover the \"order of queries\" - what you should be looking things up by, i.e. data-testid is a last resort\n\n\nCypress\n- integration of frontend, maybe end to end, but doesn't have to be\n- where our user-based tests are\n- we may get into evangelizing Cypress for more than this - failures are easier to debug\n- storybook vs component runner\n- cover the command queue\n  - queue is maintained in state, can be queried\n- context may include Selenium, what came before it\n  - runs in the browser\n- every query is an assertion\n\n\nI used to see nested describes as a way to de-dupe code - but this can go overboard - becomes harder to understand context of what is being execute - beforeEach/beforeAll\n\"building \u0026 compiling in your head\" - don't do it\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillklein%2Fui-testing-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillklein%2Fui-testing-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillklein%2Fui-testing-workshop/lists"}