{"id":18893647,"url":"https://github.com/specstet/sluie2et","last_synced_at":"2025-10-31T16:03:14.567Z","repository":{"id":43018700,"uuid":"501589180","full_name":"SPECSTET/SLUIE2ET","owner":"SPECSTET","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-31T12:40:04.000Z","size":207705,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-31T07:16:41.165Z","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/SPECSTET.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":"2022-06-09T09:32:36.000Z","updated_at":"2022-06-09T12:57:29.000Z","dependencies_parsed_at":"2023-02-10T09:45:17.976Z","dependency_job_id":null,"html_url":"https://github.com/SPECSTET/SLUIE2ET","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/SPECSTET%2FSLUIE2ET","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SPECSTET%2FSLUIE2ET/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SPECSTET%2FSLUIE2ET/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SPECSTET%2FSLUIE2ET/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SPECSTET","download_url":"https://codeload.github.com/SPECSTET/SLUIE2ET/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239869221,"owners_count":19710485,"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-08T08:14:47.876Z","updated_at":"2025-10-31T16:03:14.493Z","avatar_url":"https://github.com/SPECSTET.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Playwright UI-Testing\n\n## Required environment variables\n\n### For the Playwright tests\n\n\u003cdl\u003e\n    \u003cdt\u003e\u003cb\u003eSLUIE2ET_CUG_USER\u003c/b\u003e\u003c/dt\u003e\n        \u003cdd\u003eUser for Closed User Group if exists\u003c/dd\u003e\n    \u003cdt\u003e\u003cb\u003eSLUIE2ET_CUG_PW\u003c/b\u003e\u003c/dt\u003e\n        \u003cdd\u003eDito password\u003c/dd\u003e\n    \u003cdt\u003e\u003cb\u003eSLUIE2ET_ENV\u003c/b\u003e\u003c/dt\u003e\n        \u003cdd\u003eName of the environment to seperate screenshots etc.\u003c/dd\u003e\n    \u003cdt\u003e\u003cb\u003eSLUIE2ET_HAS_DISCLAIMER\u003c/b\u003e\u003c/dt\u003e\n        \u003cdd\u003eSet to '1' if the page has a disclaimer or '0' if not\u003c/dd\u003e\n    \u003cdt\u003e\u003cb\u003eSLUIE2ET_URL\u003c/b\u003e\u003c/dt\u003e\n        \u003cdd\u003eURL every test will call\u003c/dd\u003e\n\u003c/dl\u003e\n\n### For the powershell test runner\n\n\u003cdl\u003e\n    \u003cdt\u003e\u003cb\u003eSLUIE2ET_URL_UAT\u003c/b\u003e\u003c/dt\u003e\n        \u003cdd\u003eURL for UAT tests. The test runner Will then temporary copied this value to SLUIE2ET_URL\u003c/dd\u003e\n    \u003cdt\u003e\u003cb\u003eSLUIE2ET_URL_PAV\u003c/b\u003e\u003c/dt\u003e\n        \u003cdd\u003eDito for PAV tests\u003c/dd\u003e\n    \u003cdt\u003e\u003cb\u003eSLUIE2ET_BLOB_URL\u003c/b\u003e\u003c/dt\u003e\n        \u003cdd\u003eBLOB Url for AzCopy so the test runner can copy the test result to this host\u003c/dd\u003e\n    \u003cdt\u003e\u003cb\u003eSLUIE2ET_REPORT_URL\u003c/b\u003e\u003c/dt\u003e\n        \u003cdd\u003ePublic URL of this BLOB Storage\u003c/dd\u003e\n\u003c/dl\u003e\n\n| Please remember that Visual Studio Code must be restarted if an environment variable has been changed!\n\n## Parameterize tests\n\nTo run the tests parameterized you can use the PowerShell test runner:\n| Script | Env | HasDisclaimer | Tag | Comment |\n|--- |--- |--- |--- |--- |\n| .\\run.ps1 | pav | 1 | components | Tests all components on PAV (PAV has a disclaimer) |\n| .\\run.ps1 | uat | 0 | forms | Run all form tests on UAT (UAT has a disclaimer) |\n--grep-invert @vanitys\n\n### More about parametrization\n\n- https://playwright.dev/docs/test-parameterize\n- https://playwright.dev/docs/test-cli\n- https://playwright.dev/docs/test-reporters#built-in-reporters\n\n## Installation\n\n1. **[Node with npm](https://phoenixnap.com/kb/install-node-js-npm-on-windows)**\n2. **[azcopy](https://adamtheautomator.com/azcopy-download/)** in windows directory\n3. [posh-git](https://computingforgeeks.com/posh-git-powershell-environment-for-git/)\n4. **[Visual Studio Code](https://code.visualstudio.com/download)**\n5. **Install** the Visual Studio Code **Extension** [Playwright Test Extension](https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright)\n6. **Run** `npm install` inside the project directory\n7. **Run** `npx playwright install` inside the project directory\n8. **View** the [latest Playwright videos](https://www.youtube.com/c/Playwrightdev)\n\n## Special points in the template\n\n### Test cases from CSV\n\nInside the directory `/tests/vanity-url` there are the tests to validate vanity urls **from a CSV file**. You will see, how:\n\n- every data row generates a own test case\n- the global screenshot and video rules are overwritten\n- await to a network idle\n- await the document complete loaded\n- soft assertion\n\n| [Readme Vanity URL tests](./tests/vanity-url/readme.md)\n\n### Screenshot with masked areas\n\nInside the directory `/tests/formulare` you will find tests for a form. You will see, how:\n\n- screenshots can have masked areas\n- image comparison\n\n| [Readme form tests](./tests/formulare/readme.md)\n\n### Soft Assertion\n\n| Checkout at the [Readme Vanity URL tests](./tests/vanity-url/readme.md)\n\n### Image Comparison\n\n| Checkout at the [Readme form tests](./tests/formulare/readme.md)\n\n### Configuration\n\nIn the `playwright.config.ts` you will find all the configuration settings for the tests. They are well documented incl. links to detailed documentations.\n\nThe most interesting parts are:\n\n- _line 30_ =\u003e define the **test reporters**\n- _line 36_ =\u003e define the **global teardown**\n- _line 40_ =\u003e configure the **screenshots** after a test run\n- _line 42_ =\u003e configure the **video recording**\n- _line 61_ =\u003e configure the browser **viewport**\n\nAll the **possible options** are described in the **[documentation](https://playwright.dev/docs/test-configuration)**.\n\n### Test reports\n\nIn the `playwright.config.ts` it's configured, that reports will generated automatically. You will find the reports in the directory `playwright-report`. You can show the report with the command `npx playwright show-report`inside the test directory.\n\nYou can also set in the config a parameter (_line 34_) to **[auto open](https://medium.com/geekculture/how-to-generate-html-report-in-playwright-f9ec9b82427a) the report** after the test run.\n\nIn the `globalTeardown.ts` you will find a solution, how you can put the **report into a ZIP file**.\n\n### Global Teardown\n\nIn the configuration `playwright.config.ts` at _line 36_ it is a **global teardown** defined. This will run **after all tests are executed** and the browser are closed. In this example, the report files will put into a ZIP file.\n\n## Some more things\n\n### Test Recorder\n\nA really cool feature of Playwright is the **test recorder** (code generator). This will **save you so much time**.\n\nCheck it out at [Playwright code generator](https://www.youtube.com/watch?v=wGr5rz8WGCE\u0026t=276s)\n\n### Work with TAG's\n\nIn the form tests you will see at _line 15_ that there is a tag **@forms**. with this tag you can define, **which tests should be run**. So you can run **only the form tests** with the command `npx playwright test --report-dir 'test-results/' --grep '@vanitys'`\n\nTo read more about the test annotations, read the [docs](https://playwright.dev/docs/test-annotations).\n\n## More stuff\n\n- [Playwright YouTube Playlist](https://www.youtube.com/playlist?list=PLriKR1xQz6aLcOx7QXvaBeSeMSDK0lZHF)\n- [Playwright + Azure Pipeline](https://www.youtube.com/watch?v=RCzXuCt8Lng)\n- [Playwright YouTube channel](https://www.youtube.com/@Playwrightdev)\n- [Playwright on Github](https://github.com/microsoft/playwright)\n\n## [TODO]\n\n- https://stackoverflow.com/questions/70262213/playwright-before-each-for-all-spec-files\n- await page.setExtraHTTPHeaders({'Funky': 'Play'});\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspecstet%2Fsluie2et","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspecstet%2Fsluie2et","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspecstet%2Fsluie2et/lists"}