From a65de21c62b3f0253ed406d12af6742df038960a Mon Sep 17 00:00:00 2001 From: smoser-LiL Date: Tue, 19 Nov 2024 18:05:56 +0000 Subject: [PATCH 1/2] Moving files using main --- NOTICE | 41 +++++++++++++++++++++++++++++++++++++++-- README.md | 19 ++++++++++++++++--- 2 files changed, 55 insertions(+), 5 deletions(-) diff --git a/NOTICE b/NOTICE index 547595f..c843029 100644 --- a/NOTICE +++ b/NOTICE @@ -1,11 +1,48 @@ -Copyright 2022 LinkedIn Corporation +Copyright 2024 LinkedIn Corporation All Rights Reserved. Licensed under the LinkedIn Learning Exercise File License (the "License"). See LICENSE in the project root for license information. ATTRIBUTIONS: -[PLEASE PROVIDE ATTRIBUTIONS OR DELETE THIS AND THE ABOVE LINE “ATTRIBUTIONS”] + +------------------- +**fsevents** +https://github.com/moment/fsevents +License: MIT +https://opensource.org/licenses/MIT +------------------- +**dotenv** +https://github.com/motdotla/dotenv +License: BSD-2-Clause +https://opensource.org/licenses/BSD-2-Clause +------------------- +**undici-types** +https://github.com/nodejs/undici +License: MIT +https://opensource.org/licenses/MIT +------------------- +**playwright-core** +https://github.com/microsoft/playwright +License: Apache-2.0 +http://www.apache.org/licenses/LICENSE-2.0 +------------------- +**@playwright/test** +https://github.com/microsoft/playwright +License: Apache-2.0 +http://www.apache.org/licenses/LICENSE-2.0 +------------------- +**playwright** +https://github.com/microsoft/playwright +License: Apache-2.0 +http://www.apache.org/licenses/LICENSE-2.0 +------------------- +**@types/node** +https://github.com/DefinitelyTyped/DefinitelyTyped +License: MIT +https://opensource.org/licenses/MIT +------------------- + Please note, this project may automatically load third party code from external repositories (for example, NPM modules, Composer packages, or other dependencies). diff --git a/README.md b/README.md index 132f930..ee35ef7 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ -# LEARNING PLAYWRIGHT +# Learning Playwright This is the repository for the LinkedIn Learning course `learning-playwright`. The full course is available from [LinkedIn Learning][lil-course-url]. ![learning-playwright][lil-thumbnail-url] +## Course Description + +It’s no surprise that Playwright has joined the ranks of other top-rated open-source automation tools. Playwright’s comprehensive feature set allows testers and developers to quickly create new test automation projects without having to combine multiple libraries and other tools. Whether you’re a manual tester, a quality assurance specialist, a software developer, or a seasoned automation engineer, this course offers hands-on, practical experience with using some of the most important features of Playwright. Join instructor Butch Mayhew as he takes you through the essentials and prepares you to start writing, running, analyzing, and debugging your first test. + _See the readme file in the main branch for updated instructions and information._ ## Instructions @@ -36,6 +40,15 @@ Commit changes using this command: git commit -m "some message" 2. Clone this repository into your local machine using the terminal (Mac), CMD (Windows), or a GUI tool like SourceTree. 3. Utilize the [RESOURCES.md](./RESOURCES.md) file to follow along with all the links to the course. +## Instructor + +Butch Mayhew + +Playwright Ambassador + + +Check out my other courses on [LinkedIn Learning](https://www.linkedin.com/learning/instructors/butch-mayhew?u=104). + [0]: # "Replace these placeholder URLs with actual course URLs" -[lil-course-url]: https://www.linkedin.com/learning/ -[lil-thumbnail-url]: http:// +[lil-course-url]: https://www.linkedin.com/learning/learning-playwright/ +[lil-thumbnail-url]: https://media.licdn.com/dms/image/v2/D4D0DAQH9KXFauT3_nw/learning-public-crop_675_1200/learning-public-crop_675_1200/0/1730827611420?e=2147483647&v=beta&t=Hgonc3KqLVcsREG50BjKBFZ07NP2DY-pksa9-Oweu7Q From 8a6fcb8cd37caa1f2f09f5cdc1361190465b05b1 Mon Sep 17 00:00:00 2001 From: Tresor Date: Wed, 18 Feb 2026 01:21:42 +0200 Subject: [PATCH 2/2] Add Playwright test scripts and update configuration files --- package.json | 14 +++++++++++++- playwright.config.ts | 10 +++++----- tsconfig.json | 12 ++++++++++++ 3 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 tsconfig.json diff --git a/package.json b/package.json index 84ab366..8adb514 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,19 @@ "version": "1.0.0", "description": "This is the repository for the LinkedIn Learning course `learning-playwright`. The full course is available from [LinkedIn Learning][lil-course-url].", "main": "index.js", - "scripts": {}, + "scripts": { + "test": "npx playwright test", + "test:headed": "npx playwright test --headed", + "test:chromium": "npx playwright test --project=chromium", + "test:firefox": "npx playwright test --project=firefox", + "test:report": "npx playwright test && npx playwright show-report", + "test:debug": "npx playwright test --debug", + "test:trace": "npx playwright test --trace on", + "test:slow": "npx playwright test --slow-mo 1000", + "test:grep": "npx playwright test --grep @smoke", + "test:grep-invert": "npx playwright test --grep-invert @smoke", + "test:ui": "npx playwright test --ui" + }, "keywords": [], "author": "", "license": "ISC", diff --git a/playwright.config.ts b/playwright.config.ts index d98ad16..519e3fb 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -49,12 +49,12 @@ export default defineConfig({ name: 'chromium', dependencies: ["setup"], use: { ...devices['Desktop Chrome'], permissions: ["clipboard-read"] }, + }, + { + name: 'firefox', + dependencies: ["setup"], + use: { ...devices['Desktop Firefox'] }, } - // { - // name: 'firefox', - // dependencies: ["setup"], - // use: { ...devices['Desktop Firefox'] }, - // }, // { // name: 'webkit', diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..429b000 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "CommonJS", + "moduleResolution": "Node", + "types": ["node"], + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true + }, + "include": ["**/*.ts"] +} \ No newline at end of file