From e76b32b25274c4e822c7c73b3dc08d18f79c3f79 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 12:32:24 -0500 Subject: [PATCH 01/49] Update sprint_1_orientation.md --- sprint_1_orientation.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/sprint_1_orientation.md b/sprint_1_orientation.md index 159cf04bb..c80a208b7 100644 --- a/sprint_1_orientation.md +++ b/sprint_1_orientation.md @@ -1,16 +1,15 @@ # Lean and Agile Principles for Empowering Teachers and Students in a Changing World: spoken by Founder and Ceo at new Employee Orientation -As the founder of MyWebClass.org, I am thrilled to welcome all of you to our team. We are embarking on an exciting journey to revolutionize education by creating a community of people dedicated to helping students succeed in the modern software industry. +Introduction +Welcome to MyWebClass.org, where we're all about revolutionizing education in the modern software industry. Our values include people, learning, efficiency, and dependability, and we're led by the visionary Keith Williams. -Our mission is to provide educational opportunities and a practical, hands-on learning experience to students and teachers of all ages and backgrounds. We want to create a platform where everyone feels welcome to learn and grow, and we believe that our values are the key to achieving this mission. +Testing +We need to test everything from front-end frameworks to back-end servers to ensure our website can handle the traffic. We'll use tools like Playwright, Artillery, and Lighthouse for testing, and we'll test CSS frameworks for beauty and usability. We'll also test coding standards, accessibility, and user experience. With proper testing and planning, we can avoid disaster. -At MyWebClass.org, we value people, learning, efficiency, and dependability. We understand that everyone has the potential to succeed, and we strive to create an inclusive and supportive environment where everyone feels included and valued. We believe that learning is a lifelong process, and we are committed to providing educational opportunities that help students and teachers gain experience with new technologies and learn advanced software engineering concepts. We recognize that time is a valuable resource, and we aim to provide a practical, hands-on learning experience that allows students and teachers to develop the skills they need to succeed in the modern software industry quickly. Finally, we understand the importance of being reliable and consistent, and we aim to provide a stable and dependable platform for students and teachers to learn and collaborate. +Deployment and Instructions +Our deployment process needs to be easy to follow, with clear instructions for local installation and various sized deployments for testing. We'll use Next.js for exploratory project testing for static pages. -Our origin story began in 2023 when I, Keith Williams, founded MyWebClass.org. As a university lecturer with over 30 years of experience as a software engineer and entrepreneur, I saw the need to bridge the gap between educators and professionals in the software industry. I wanted to create a community of people committed to helping students of all ages and backgrounds succeed, and that's why I founded MyWebClass.org. +Production Readiness +We need to use automated testing and continuous integration to catch issues early, and a robust logging system to monitor performance. Alerts and external monitoring tools like ElasticSearch, Logstash, and Kibana will help us catch critical issues. We'll also need to develop a logging strategy to track application and server performance. -Now, we are at the first milestone in the development of our company. We want to launch a site as quickly as possible, but we also want to ensure that we launch a product that reflects our mission, vision, and values. That's why we are asking you, our new employees, to form teams to develop competing prototypes of the MyWebClass.org site that will compete in a competition to become the A/B versions of the site that we will test with our first customers. - -We are making a customized learning management system that will enable us to deliver on our mission and values. However, to start, we need a site that will help us get the ball rolling. This site must embody our values and reflect our mission and vision. - -As we begin this competition, I want to remind you of the importance of our values. People, learning, efficiency, and dependability are the cornerstones of our company, and we must ensure that these values are reflected in everything we do. - -Thank you for joining us on this journey. Together, we can create a community of people committed to helping students of all ages and backgrounds succeed in the modern software industry. Let's get to work! \ No newline at end of file +Conclusion +By taking all these factors into consideration, we can create a site that is performant, cost-effective, secure, scalable, and user-friendly. And most importantly, we can avoid the nightmare scenario of a crashed website and a penniless CEO wandering the streets of Newark muttering about node.js. With hard work and dedication, we can help students of all ages and backgrounds succeed in the modern software industry. Let's get to work! From 8a26a66c162c2e278e42ff750867e9e2e7c53b44 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 12:33:03 -0500 Subject: [PATCH 02/49] Update sprint_1_orientation.md --- sprint_1_orientation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sprint_1_orientation.md b/sprint_1_orientation.md index c80a208b7..b4d8ffd22 100644 --- a/sprint_1_orientation.md +++ b/sprint_1_orientation.md @@ -1,4 +1,4 @@ -# Lean and Agile Principles for Empowering Teachers and Students in a Changing World: spoken by Founder and Ceo at new Employee Orientation +# Capacity Planning and Technology Evaluation Introduction Welcome to MyWebClass.org, where we're all about revolutionizing education in the modern software industry. Our values include people, learning, efficiency, and dependability, and we're led by the visionary Keith Williams. From 2d0d808d27c3a56f607873a5da2312dbdb804791 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 20:00:19 -0500 Subject: [PATCH 03/49] playwright --- .github/workflows/test_and_quality.yml | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/test_and_quality.yml diff --git a/.github/workflows/test_and_quality.yml b/.github/workflows/test_and_quality.yml new file mode 100644 index 000000000..1e2a1b537 --- /dev/null +++ b/.github/workflows/test_and_quality.yml @@ -0,0 +1,41 @@ +name: Test and Build + +on: [push] + workflow_dispatch: +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: 18.x + + - name: Install dependencies + run: npm install + + - name: Run tests + run: npm run test + + - name: Upload screenshots and videos of failed tests + uses: actions/upload-artifact@v2 + with: + name: test-results + path: screenshots/, videos/ + + - name: Run code quality tools + run: | + npm run lint + npm run format + npm run build + npm run w3c + + - name: Upload code coverage results + uses: actions/upload-artifact@v2 + with: + name: coverage-results + path: coverage/ From ca17344ae014abbf1ff204863ca95204f9c76df2 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 20:04:30 -0500 Subject: [PATCH 04/49] Update test_and_quality.yml --- .github/workflows/test_and_quality.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_and_quality.yml b/.github/workflows/test_and_quality.yml index 1e2a1b537..f27b486bc 100644 --- a/.github/workflows/test_and_quality.yml +++ b/.github/workflows/test_and_quality.yml @@ -1,8 +1,14 @@ -name: Test and Build +name: Deploy static content to Pages -on: [push] - workflow_dispatch: +on: + # Runs on pushes targeting the default branch + push: + branches: "*" + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: jobs: + build: runs-on: ubuntu-latest From 964e05b651196e839dea9a585e65db0c2ca44b33 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 20:07:47 -0500 Subject: [PATCH 05/49] Update test.yml --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3cf4e8684..6d69c0c29 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,9 +9,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: '18.x' - name: Install dependencies @@ -19,4 +19,4 @@ jobs: - name: Install playwright browsers run: npx playwright install --with-deps - name: Run tests - run: npx playwright test \ No newline at end of file + run: npx playwright test From ae1c9e232ba6e86c471dcbc9249c2c890bbd65a6 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 20:09:08 -0500 Subject: [PATCH 06/49] Update test_and_quality.yml --- .github/workflows/test_and_quality.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_and_quality.yml b/.github/workflows/test_and_quality.yml index f27b486bc..b029d8ed3 100644 --- a/.github/workflows/test_and_quality.yml +++ b/.github/workflows/test_and_quality.yml @@ -1,4 +1,4 @@ -name: Deploy static content to Pages +name: Just Test with Playwright on: # Runs on pushes targeting the default branch @@ -14,10 +14,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: 18.x @@ -28,7 +28,7 @@ jobs: run: npm run test - name: Upload screenshots and videos of failed tests - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: test-results path: screenshots/, videos/ @@ -41,7 +41,7 @@ jobs: npm run w3c - name: Upload code coverage results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: coverage-results path: coverage/ From 50a102833c459ea3711be5fa1c3ee0b0937f534c Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 20:24:50 -0500 Subject: [PATCH 07/49] Update playwright.config.js --- playwright.config.js | 124 ++++++++++++++++++++++++++----------------- 1 file changed, 76 insertions(+), 48 deletions(-) diff --git a/playwright.config.js b/playwright.config.js index fc3065565..af52d67e5 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -1,79 +1,107 @@ -// @ts-check -const { defineConfig, devices } = require('@playwright/test') - -/** - * Read environment variables from file. - * https://github.com/motdotla/dotenv - */ -// require('dotenv').config(); - -/** - * @see https://playwright.dev/docs/test-configuration - */ +const { defineConfig, devices } = require('@playwright/test'); +const path = require('path'); + module.exports = defineConfig({ + // Directory where test files are located. testDir: './tests', - /* Maximum time one test can run for. */ + + // Maximum time each test can run for. timeout: 30 * 1000, + + // Maximum time the expect() function should wait for a condition to be met. expect: { - /** - * Maximum time expect() should wait for the condition to be met. - * For example in `await expect(locator).toHaveText();` - */ timeout: 5000 }, - /* Run tests in files in parallel */ + + // Run tests in files in parallel. fullyParallel: true, - /* Fail the build on CI if you accidentally left test.only in the source code. */ + + // Forbid test.only() on CI environments. forbidOnly: !!process.env.CI, - /* Retry on CI only */ + + // Retry failed tests up to 2 times on CI environments. retries: process.env.CI ? 2 : 0, - /* Opt out of parallel tests on CI. */ + + // Opt out of parallel tests on CI environments. workers: process.env.CI ? 1 : undefined, - /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: 'html', - /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ + + // Use the 'list' reporter for test results. + reporter: 'list', + + // Set shared settings for all projects. use: { - /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ + // Maximum time each action such as click() can take. Defaults to 0 (no limit). actionTimeout: 0, - /* Base URL to use in actions like `await page.goto('/')`. */ + + // Base URL to use in actions like await page.goto('/'). + // Uncomment and set a value if your tests need to navigate to a specific URL. // baseURL: 'http://localhost:3000', - /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ - trace: 'on-first-retry' + // Collect trace when retrying the failed test. + // See https://playwright.dev/docs/trace-viewer + trace: 'on-first-retry', + + // Set screenshot options for failed tests. + screenshot: 'only-on-failure', + screenshotPath: path.join(process.cwd(), 'screenshots'), + + // Set video options for failed tests. + video: 'retain-on-failure', + videoSize: { width: 1920, height: 1080 }, + videoPath: path.join(process.cwd(), 'videos') }, - /* Configure projects for major browsers */ + // Configure projects for major browsers. projects: [ { name: 'chromium', - use: { ...devices['Desktop Chrome'] } - } + use: { + ...devices['Desktop Chrome'], - /* Test against mobile viewports. */ - // { - // name: 'Mobile Chrome', - // use: { ...devices['Pixel 5'] }, - // }, - // { - // name: 'Mobile Safari', - // use: { ...devices['iPhone 12'] }, - // }, + // Set context options for the browser. + contextOptions: { + viewport: { + width: 1920, + height: 1080 + }, + userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36', + acceptDownloads: true + }, - /* Test against branded browsers. */ + // Set additional options for the browser. + launchOptions: { + headless: true, + args: [ + '--disable-infobars', + '--disable-notifications', + '--disable-web-security' + ] + } + } + }, + + // Uncomment and configure projects for other browsers, such as Firefox and Safari. // { - // name: 'Microsoft Edge', - // use: { channel: 'msedge' }, + // name: 'firefox', + // use: { + // ...devices['Desktop Firefox'], + // launchOptions: { headless: true } + // } // }, // { - // name: 'Google Chrome', - // use: { channel: 'chrome' }, - // }, + // name: 'webkit', + // use: { + // ...devices['Desktop Safari'], + // launchOptions: { headless: true } + // } + // } ], - /* Folder for test artifacts such as screenshots, videos, traces, etc. */ + // Folder for test artifacts such as screenshots, videos, traces, etc. + // Uncomment and set a value if you want to specify an output directory. // outputDir: 'test-results/', - /* Run your local dev server before starting the tests */ + // Start a local development server before running tests. webServer: { command: 'npm run start', port: 3000, From 715d1487c0b49ab31d5619532d45a449da89e011 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 20:27:47 -0500 Subject: [PATCH 08/49] Update playwright.config.js --- playwright.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playwright.config.js b/playwright.config.js index af52d67e5..7218740fd 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -1,5 +1,5 @@ -const { defineConfig, devices } = require('@playwright/test'); -const path = require('path'); +const { defineConfig, devices } = require('@playwright/test') +const path = require('path') module.exports = defineConfig({ // Directory where test files are located. @@ -78,7 +78,7 @@ module.exports = defineConfig({ ] } } - }, + } // Uncomment and configure projects for other browsers, such as Firefox and Safari. // { From ced8b9af7b4b8f12489a3b862ae62b176b2a78b0 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 20:30:51 -0500 Subject: [PATCH 09/49] Update test_and_quality.yml --- .github/workflows/test_and_quality.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_and_quality.yml b/.github/workflows/test_and_quality.yml index b029d8ed3..5b0854b37 100644 --- a/.github/workflows/test_and_quality.yml +++ b/.github/workflows/test_and_quality.yml @@ -22,7 +22,9 @@ jobs: node-version: 18.x - name: Install dependencies - run: npm install + run: | + npx playwright install chromium + npm install - name: Run tests run: npm run test From c691db55219f0cfdec02ecfd10f402ece686b0e8 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 20:33:18 -0500 Subject: [PATCH 10/49] Update test_and_quality.yml --- .github/workflows/test_and_quality.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test_and_quality.yml b/.github/workflows/test_and_quality.yml index 5b0854b37..8c3122f17 100644 --- a/.github/workflows/test_and_quality.yml +++ b/.github/workflows/test_and_quality.yml @@ -24,7 +24,8 @@ jobs: - name: Install dependencies run: | npx playwright install chromium - npm install + npm install lint format build + npm install - name: Run tests run: npm run test @@ -35,13 +36,6 @@ jobs: name: test-results path: screenshots/, videos/ - - name: Run code quality tools - run: | - npm run lint - npm run format - npm run build - npm run w3c - - name: Upload code coverage results uses: actions/upload-artifact@v3 with: From 37bbbcb7059ff222cebfebe0d1ac52d46e55dd71 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 20:35:25 -0500 Subject: [PATCH 11/49] Update playwright.config.js --- playwright.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/playwright.config.js b/playwright.config.js index 7218740fd..318c13771 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -46,7 +46,9 @@ module.exports = defineConfig({ screenshotPath: path.join(process.cwd(), 'screenshots'), // Set video options for failed tests. - video: 'retain-on-failure', + + // Always record a video for each test. + video: 'on', videoSize: { width: 1920, height: 1080 }, videoPath: path.join(process.cwd(), 'videos') }, From 7e672a5e296c8d0a32db909c772edcb429888cb6 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 20:38:25 -0500 Subject: [PATCH 12/49] Update playwright.config.js --- playwright.config.js | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/playwright.config.js b/playwright.config.js index 318c13771..7f80ae9f6 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -4,62 +4,46 @@ const path = require('path') module.exports = defineConfig({ // Directory where test files are located. testDir: './tests', - // Maximum time each test can run for. timeout: 30 * 1000, - // Maximum time the expect() function should wait for a condition to be met. expect: { timeout: 5000 }, - // Run tests in files in parallel. fullyParallel: true, - // Forbid test.only() on CI environments. forbidOnly: !!process.env.CI, - // Retry failed tests up to 2 times on CI environments. retries: process.env.CI ? 2 : 0, - // Opt out of parallel tests on CI environments. workers: process.env.CI ? 1 : undefined, - // Use the 'list' reporter for test results. reporter: 'list', - // Set shared settings for all projects. use: { // Maximum time each action such as click() can take. Defaults to 0 (no limit). actionTimeout: 0, - // Base URL to use in actions like await page.goto('/'). // Uncomment and set a value if your tests need to navigate to a specific URL. // baseURL: 'http://localhost:3000', - // Collect trace when retrying the failed test. // See https://playwright.dev/docs/trace-viewer trace: 'on-first-retry', - // Set screenshot options for failed tests. screenshot: 'only-on-failure', - screenshotPath: path.join(process.cwd(), 'screenshots'), - - // Set video options for failed tests. - + screenshotPath: path.join(process.cwd(), 'screenshots'), // Always record a video for each test. video: 'on', videoSize: { width: 1920, height: 1080 }, videoPath: path.join(process.cwd(), 'videos') }, - // Configure projects for major browsers. projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'], - // Set context options for the browser. contextOptions: { viewport: { @@ -69,7 +53,6 @@ module.exports = defineConfig({ userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36', acceptDownloads: true }, - // Set additional options for the browser. launchOptions: { headless: true, @@ -81,7 +64,6 @@ module.exports = defineConfig({ } } } - // Uncomment and configure projects for other browsers, such as Firefox and Safari. // { // name: 'firefox', @@ -98,11 +80,9 @@ module.exports = defineConfig({ // } // } ], - // Folder for test artifacts such as screenshots, videos, traces, etc. // Uncomment and set a value if you want to specify an output directory. // outputDir: 'test-results/', - // Start a local development server before running tests. webServer: { command: 'npm run start', From 2a705ce22dac200cbfa7bdd97f0506783233e207 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 20:41:51 -0500 Subject: [PATCH 13/49] Update playwright.config.js --- playwright.config.js | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/playwright.config.js b/playwright.config.js index 7f80ae9f6..a508ca48d 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -2,49 +2,30 @@ const { defineConfig, devices } = require('@playwright/test') const path = require('path') module.exports = defineConfig({ - // Directory where test files are located. testDir: './tests', - // Maximum time each test can run for. timeout: 30 * 1000, - // Maximum time the expect() function should wait for a condition to be met. expect: { timeout: 5000 }, - // Run tests in files in parallel. fullyParallel: true, - // Forbid test.only() on CI environments. forbidOnly: !!process.env.CI, - // Retry failed tests up to 2 times on CI environments. retries: process.env.CI ? 2 : 0, - // Opt out of parallel tests on CI environments. workers: process.env.CI ? 1 : undefined, - // Use the 'list' reporter for test results. reporter: 'list', - // Set shared settings for all projects. use: { - // Maximum time each action such as click() can take. Defaults to 0 (no limit). actionTimeout: 0, - // Base URL to use in actions like await page.goto('/'). - // Uncomment and set a value if your tests need to navigate to a specific URL. - // baseURL: 'http://localhost:3000', - // Collect trace when retrying the failed test. - // See https://playwright.dev/docs/trace-viewer trace: 'on-first-retry', - // Set screenshot options for failed tests. screenshot: 'only-on-failure', screenshotPath: path.join(process.cwd(), 'screenshots'), - // Always record a video for each test. video: 'on', videoSize: { width: 1920, height: 1080 }, videoPath: path.join(process.cwd(), 'videos') }, - // Configure projects for major browsers. projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'], - // Set context options for the browser. contextOptions: { viewport: { width: 1920, @@ -53,7 +34,6 @@ module.exports = defineConfig({ userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36', acceptDownloads: true }, - // Set additional options for the browser. launchOptions: { headless: true, args: [ @@ -64,26 +44,7 @@ module.exports = defineConfig({ } } } - // Uncomment and configure projects for other browsers, such as Firefox and Safari. - // { - // name: 'firefox', - // use: { - // ...devices['Desktop Firefox'], - // launchOptions: { headless: true } - // } - // }, - // { - // name: 'webkit', - // use: { - // ...devices['Desktop Safari'], - // launchOptions: { headless: true } - // } - // } ], - // Folder for test artifacts such as screenshots, videos, traces, etc. - // Uncomment and set a value if you want to specify an output directory. - // outputDir: 'test-results/', - // Start a local development server before running tests. webServer: { command: 'npm run start', port: 3000, From 52c28cef809fe229af1e06b127df25e297575731 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 20:43:40 -0500 Subject: [PATCH 14/49] Update playwright.config.js --- playwright.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright.config.js b/playwright.config.js index a508ca48d..53bd01c22 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -16,7 +16,7 @@ module.exports = defineConfig({ actionTimeout: 0, trace: 'on-first-retry', screenshot: 'only-on-failure', - screenshotPath: path.join(process.cwd(), 'screenshots'), + screenshotPath: path.join(process.cwd(), 'screenshots'), video: 'on', videoSize: { width: 1920, height: 1080 }, videoPath: path.join(process.cwd(), 'videos') From ae4796dd0478b781774267c5549d20a03dc05c09 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 20:48:33 -0500 Subject: [PATCH 15/49] Update test_and_quality.yml --- .github/workflows/test_and_quality.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_quality.yml b/.github/workflows/test_and_quality.yml index 8c3122f17..f0ec75291 100644 --- a/.github/workflows/test_and_quality.yml +++ b/.github/workflows/test_and_quality.yml @@ -34,7 +34,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: test-results - path: screenshots/, videos/ + path: test-results/screenshots/, test-results/videos/ - name: Upload code coverage results uses: actions/upload-artifact@v3 From 08c9f48854985c0945d0a4e4da70fee3df98be1d Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Wed, 8 Mar 2023 20:53:37 -0500 Subject: [PATCH 16/49] Update test_and_quality.yml --- .github/workflows/test_and_quality.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_and_quality.yml b/.github/workflows/test_and_quality.yml index f0ec75291..c3f92d6cf 100644 --- a/.github/workflows/test_and_quality.yml +++ b/.github/workflows/test_and_quality.yml @@ -34,10 +34,5 @@ jobs: uses: actions/upload-artifact@v3 with: name: test-results - path: test-results/screenshots/, test-results/videos/ - - - name: Upload code coverage results - uses: actions/upload-artifact@v3 - with: - name: coverage-results - path: coverage/ + path: | + ./test-resu* From 806889f6bd5e23ce747fe309ded17f188652a5e7 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Thu, 9 Mar 2023 15:08:04 -0500 Subject: [PATCH 17/49] Rename test_and_quality.yml to playwright_test_record_video.yml --- .../{test_and_quality.yml => playwright_test_record_video.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{test_and_quality.yml => playwright_test_record_video.yml} (100%) diff --git a/.github/workflows/test_and_quality.yml b/.github/workflows/playwright_test_record_video.yml similarity index 100% rename from .github/workflows/test_and_quality.yml rename to .github/workflows/playwright_test_record_video.yml From 2d1300bd68c8a3cdc41efdc7f3d4248587dd6dba Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 13:38:40 -0500 Subject: [PATCH 18/49] updated with lighthouse --- .github/workflows/playwright_test_record_video.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index c3f92d6cf..80d96f81e 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -25,11 +25,17 @@ jobs: run: | npx playwright install chromium npm install lint format build + npm install -g lighthouse npm install - name: Run tests run: npm run test + - name: Run Lighthouse + run: | + npm run start + lighthouse http://localhost:3000 --output html --output-path test-results/report.html + - name: Upload screenshots and videos of failed tests uses: actions/upload-artifact@v3 with: From 6d9304ae45ab990a6201856ff2f47943fb2917eb Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 14:46:06 -0500 Subject: [PATCH 19/49] Create script.js --- script.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 script.js diff --git a/script.js b/script.js new file mode 100644 index 000000000..4629a9c84 --- /dev/null +++ b/script.js @@ -0,0 +1,15 @@ +const fs = require('fs'); +const { chromium } = require('playwright'); + +(async () => { + const browser = await chromium.launch(); + const page = await browser.newPage(); + + const report = fs.readFileSync('test-results/lighthousereport.json', 'utf8'); + const reportObj = JSON.parse(report); + + await page.setContent(reportObj.report); + await page.pdf({ path: 'test-results/lighthouse/report.pdf', format: 'A4' }); + + await browser.close(); +})(); From fa335ad95c9fc791e3ea58330480c0e71db3d50c Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 14:48:53 -0500 Subject: [PATCH 20/49] Update and rename script.js to create_pdf_from_lighthouseJsonOutput.js --- script.js => create_pdf_from_lighthouseJsonOutput.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename script.js => create_pdf_from_lighthouseJsonOutput.js (63%) diff --git a/script.js b/create_pdf_from_lighthouseJsonOutput.js similarity index 63% rename from script.js rename to create_pdf_from_lighthouseJsonOutput.js index 4629a9c84..8ffab1a4f 100644 --- a/script.js +++ b/create_pdf_from_lighthouseJsonOutput.js @@ -5,11 +5,11 @@ const { chromium } = require('playwright'); const browser = await chromium.launch(); const page = await browser.newPage(); - const report = fs.readFileSync('test-results/lighthousereport.json', 'utf8'); + const report = fs.readFileSync('./test-results/lighthousereport.json', 'utf8'); const reportObj = JSON.parse(report); await page.setContent(reportObj.report); - await page.pdf({ path: 'test-results/lighthouse/report.pdf', format: 'A4' }); + await page.pdf({ path: './test-results/lighthouse/report.pdf', format: 'A4' }); await browser.close(); })(); From 6d52ef7d87edb0c0160a19c89d2ca216f438e8f0 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 14:49:53 -0500 Subject: [PATCH 21/49] Update playwright_test_record_video.yml --- .../workflows/playwright_test_record_video.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index 80d96f81e..8cf7060bc 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -24,19 +24,18 @@ jobs: - name: Install dependencies run: | npx playwright install chromium - npm install lint format build npm install -g lighthouse npm install + npm run start - - name: Run tests - run: npm run test + - name: Run PLaywright tests + run: npx playwright test --config=playwright.config.js - - name: Run Lighthouse + - name: Generate Lighthouse Report and Convert it to PDF using script.js run: | - npm run start - lighthouse http://localhost:3000 --output html --output-path test-results/report.html - - - name: Upload screenshots and videos of failed tests + lighthouse http://localhost:3000 --output json --output-path ./test-results/lighthouse/report.json + node create_pdf_from_lighthouseJsonOutput.js + - name: Upload report, screenshots and videos of failed tests uses: actions/upload-artifact@v3 with: name: test-results From 2a31a498985f526cce1c5433809a98dbf0426913 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 14:53:11 -0500 Subject: [PATCH 22/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index 8cf7060bc..41a3291c4 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -1,4 +1,4 @@ -name: Just Test with Playwright +name: Run Playright and Generate LightHouse PDF Report on: # Runs on pushes targeting the default branch @@ -31,7 +31,7 @@ jobs: - name: Run PLaywright tests run: npx playwright test --config=playwright.config.js - - name: Generate Lighthouse Report and Convert it to PDF using script.js + - name: Generate Lighthouse Report and Convert it to PDF using create_pdf_from_lighthouseJsonOutput.js run: | lighthouse http://localhost:3000 --output json --output-path ./test-results/lighthouse/report.json node create_pdf_from_lighthouseJsonOutput.js From cfa2fb0222df01dbd364cc48ed67244dc2b79c9e Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 15:03:51 -0500 Subject: [PATCH 23/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index 41a3291c4..6b65e06e2 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -24,7 +24,7 @@ jobs: - name: Install dependencies run: | npx playwright install chromium - npm install -g lighthouse + npm install lighthouse npm install npm run start From 8eded23ac812c2a1fbcefcde2ac66a24c3a7d6e8 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 15:24:10 -0500 Subject: [PATCH 24/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index 6b65e06e2..92b13f6ea 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 17.x - name: Install dependencies run: | From a50a0dc3f0e2b3f1d7818fca5b3bad4f6e4754a2 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 15:28:54 -0500 Subject: [PATCH 25/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index 92b13f6ea..27fbf8f2e 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -26,7 +26,7 @@ jobs: npx playwright install chromium npm install lighthouse npm install - npm run start + npm run start & npx wait-on http://localhost:3000 - name: Run PLaywright tests run: npx playwright test --config=playwright.config.js From 0264a3a18824d7483c7911e876c35290096a10a8 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 15:31:35 -0500 Subject: [PATCH 26/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index 27fbf8f2e..e976ebec3 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -24,7 +24,7 @@ jobs: - name: Install dependencies run: | npx playwright install chromium - npm install lighthouse + npm install -g lighthouse npm install npm run start & npx wait-on http://localhost:3000 From 7d24e7ac9f08bfd4b061554a7fe5ef51ab1dea23 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 15:35:52 -0500 Subject: [PATCH 27/49] Update create_pdf_from_lighthouseJsonOutput.js --- create_pdf_from_lighthouseJsonOutput.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/create_pdf_from_lighthouseJsonOutput.js b/create_pdf_from_lighthouseJsonOutput.js index 8ffab1a4f..39088269f 100644 --- a/create_pdf_from_lighthouseJsonOutput.js +++ b/create_pdf_from_lighthouseJsonOutput.js @@ -5,11 +5,11 @@ const { chromium } = require('playwright'); const browser = await chromium.launch(); const page = await browser.newPage(); - const report = fs.readFileSync('./test-results/lighthousereport.json', 'utf8'); + const report = fs.readFileSync('./test-results/report.json', 'utf8'); const reportObj = JSON.parse(report); await page.setContent(reportObj.report); - await page.pdf({ path: './test-results/lighthouse/report.pdf', format: 'A4' }); + await page.pdf({ path: './test-results/light_house_report.pdf', format: 'A4' }); await browser.close(); })(); From f060163bfe836a8100c111af08d50566897f818c Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 15:36:07 -0500 Subject: [PATCH 28/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index e976ebec3..b5c83bd3e 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -33,7 +33,7 @@ jobs: - name: Generate Lighthouse Report and Convert it to PDF using create_pdf_from_lighthouseJsonOutput.js run: | - lighthouse http://localhost:3000 --output json --output-path ./test-results/lighthouse/report.json + lighthouse http://localhost:3000 --output json --output-path ./test-results/report.json node create_pdf_from_lighthouseJsonOutput.js - name: Upload report, screenshots and videos of failed tests uses: actions/upload-artifact@v3 From 4f78dbc35f6ecc2371085b612b3b3482aeed41f2 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 15:57:53 -0500 Subject: [PATCH 29/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index b5c83bd3e..ba24057e6 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -34,6 +34,7 @@ jobs: - name: Generate Lighthouse Report and Convert it to PDF using create_pdf_from_lighthouseJsonOutput.js run: | lighthouse http://localhost:3000 --output json --output-path ./test-results/report.json + npm install chromium node create_pdf_from_lighthouseJsonOutput.js - name: Upload report, screenshots and videos of failed tests uses: actions/upload-artifact@v3 From 426c8e808afe2f9813d4097a93eb47d7756a8dd0 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:03:56 -0500 Subject: [PATCH 30/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index ba24057e6..788ac9b43 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -26,6 +26,10 @@ jobs: npx playwright install chromium npm install -g lighthouse npm install + npm install -g chrome-launcher + npm install -g axe-core + npm install -g chromium + npm run start & npx wait-on http://localhost:3000 - name: Run PLaywright tests @@ -34,7 +38,6 @@ jobs: - name: Generate Lighthouse Report and Convert it to PDF using create_pdf_from_lighthouseJsonOutput.js run: | lighthouse http://localhost:3000 --output json --output-path ./test-results/report.json - npm install chromium node create_pdf_from_lighthouseJsonOutput.js - name: Upload report, screenshots and videos of failed tests uses: actions/upload-artifact@v3 From cb63cfdc557982cc97866c5b8ca1139efa48cba9 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:09:52 -0500 Subject: [PATCH 31/49] Update playwright_test_record_video.yml --- .../playwright_test_record_video.yml | 30 ++++++++----------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index 788ac9b43..1052864fc 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -1,17 +1,13 @@ -name: Run Playright and Generate LightHouse PDF Report +name: Run Playwright and Generate LightHouse PDF Report on: - # Runs on pushes targeting the default branch push: branches: "*" - - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: + jobs: - build: runs-on: ubuntu-latest - steps: - name: Checkout code uses: actions/checkout@v3 @@ -19,29 +15,27 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: 17.x + node-version: "17.x" - name: Install dependencies run: | + npm ci npx playwright install chromium - npm install -g lighthouse - npm install - npm install -g chrome-launcher - npm install -g axe-core - npm install -g chromium + npm install -g lighthouse chrome-launcher axe-core chromium wait-on - npm run start & npx wait-on http://localhost:3000 + - name: Start the application + run: npm run start & npx wait-on http://localhost:3000 - - name: Run PLaywright tests + - name: Run Playwright tests run: npx playwright test --config=playwright.config.js - name: Generate Lighthouse Report and Convert it to PDF using create_pdf_from_lighthouseJsonOutput.js run: | - lighthouse http://localhost:3000 --output json --output-path ./test-results/report.json - node create_pdf_from_lighthouseJsonOutput.js + lighthouse http://localhost:3000 --output json --output-path ./test-results/report.json + node create_pdf_from_lighthouseJsonOutput.js + - name: Upload report, screenshots and videos of failed tests uses: actions/upload-artifact@v3 with: name: test-results - path: | - ./test-resu* + path: ./test-results From 18a9a2266973e9bec4cab611051d37c8b1e6aa32 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:13:38 -0500 Subject: [PATCH 32/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index 1052864fc..9c0450026 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -19,19 +19,28 @@ jobs: - name: Install dependencies run: | + sudo apt-get update + sudo apt-get install -y libgbm-dev npm ci npx playwright install chromium npm install -g lighthouse chrome-launcher axe-core chromium wait-on + - name: Start the X server + run: | + export DISPLAY=:0 + startx & sleep 5 + - name: Start the application - run: npm run start & npx wait-on http://localhost:3000 + run: | + export DISPLAY=:1 + npm run start & npx wait-on http://localhost:3000 - name: Run Playwright tests run: npx playwright test --config=playwright.config.js - name: Generate Lighthouse Report and Convert it to PDF using create_pdf_from_lighthouseJsonOutput.js run: | - lighthouse http://localhost:3000 --output json --output-path ./test-results/report.json + lighthouse http://localhost:3000 --output json --output-path ./test-results/report.json --chrome-flags="--headless --no-sandbox --disable-gpu" node create_pdf_from_lighthouseJsonOutput.js - name: Upload report, screenshots and videos of failed tests From 62091fcadbde1da39595259faf845150ad7dd3b3 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:17:09 -0500 Subject: [PATCH 33/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index 9c0450026..30cd414b2 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -41,6 +41,7 @@ jobs: - name: Generate Lighthouse Report and Convert it to PDF using create_pdf_from_lighthouseJsonOutput.js run: | lighthouse http://localhost:3000 --output json --output-path ./test-results/report.json --chrome-flags="--headless --no-sandbox --disable-gpu" + npm install playwright node create_pdf_from_lighthouseJsonOutput.js - name: Upload report, screenshots and videos of failed tests From 5edb922b83f038d11e4d86cba6b6f328bd595f98 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:20:56 -0500 Subject: [PATCH 34/49] Update create_pdf_from_lighthouseJsonOutput.js --- create_pdf_from_lighthouseJsonOutput.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/create_pdf_from_lighthouseJsonOutput.js b/create_pdf_from_lighthouseJsonOutput.js index 39088269f..54d9276fe 100644 --- a/create_pdf_from_lighthouseJsonOutput.js +++ b/create_pdf_from_lighthouseJsonOutput.js @@ -8,7 +8,11 @@ const { chromium } = require('playwright'); const report = fs.readFileSync('./test-results/report.json', 'utf8'); const reportObj = JSON.parse(report); - await page.setContent(reportObj.report); + if (typeof reportObj.report !== 'string') { + throw new Error('Report is not a string'); + } + + await page.setContent(JSON.stringify(reportObj.report)); await page.pdf({ path: './test-results/light_house_report.pdf', format: 'A4' }); await browser.close(); From a5dc8dc64c4e70259c5d2d4ef6f0afb4fe641829 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:25:43 -0500 Subject: [PATCH 35/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index 30cd414b2..415a5d5c1 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -40,7 +40,7 @@ jobs: - name: Generate Lighthouse Report and Convert it to PDF using create_pdf_from_lighthouseJsonOutput.js run: | - lighthouse http://localhost:3000 --output json --output-path ./test-results/report.json --chrome-flags="--headless --no-sandbox --disable-gpu" + lighthouse http://localhost:3000 --output json --output-path report.json --chrome-flags="--headless --no-sandbox --disable-gpu" npm install playwright node create_pdf_from_lighthouseJsonOutput.js From 0510fc9a6fdc2b4e99f1c5f121de20e04bac8b9c Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:26:02 -0500 Subject: [PATCH 36/49] Update create_pdf_from_lighthouseJsonOutput.js --- create_pdf_from_lighthouseJsonOutput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_pdf_from_lighthouseJsonOutput.js b/create_pdf_from_lighthouseJsonOutput.js index 54d9276fe..09e628ba5 100644 --- a/create_pdf_from_lighthouseJsonOutput.js +++ b/create_pdf_from_lighthouseJsonOutput.js @@ -5,7 +5,7 @@ const { chromium } = require('playwright'); const browser = await chromium.launch(); const page = await browser.newPage(); - const report = fs.readFileSync('./test-results/report.json', 'utf8'); + const report = fs.readFileSync('report.json', 'utf8'); const reportObj = JSON.parse(report); if (typeof reportObj.report !== 'string') { From 87af756e2426cbe8d63de6aeefb6c888b2585183 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:28:56 -0500 Subject: [PATCH 37/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index 415a5d5c1..11e7829c2 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -40,9 +40,7 @@ jobs: - name: Generate Lighthouse Report and Convert it to PDF using create_pdf_from_lighthouseJsonOutput.js run: | - lighthouse http://localhost:3000 --output json --output-path report.json --chrome-flags="--headless --no-sandbox --disable-gpu" - npm install playwright - node create_pdf_from_lighthouseJsonOutput.js + lighthouse http://localhost:3000 --output json --output-path ./test-results/report.json --chrome-flags="--headless --no-sandbox --disable-gpu" - name: Upload report, screenshots and videos of failed tests uses: actions/upload-artifact@v3 From 2b2f6a2964ab3db34ccf7fec465bd122fe95d3ab Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:33:44 -0500 Subject: [PATCH 38/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index 11e7829c2..813404e28 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -41,7 +41,7 @@ jobs: - name: Generate Lighthouse Report and Convert it to PDF using create_pdf_from_lighthouseJsonOutput.js run: | lighthouse http://localhost:3000 --output json --output-path ./test-results/report.json --chrome-flags="--headless --no-sandbox --disable-gpu" - + node create_pdf_from_lighthouseJsonOutput.js - name: Upload report, screenshots and videos of failed tests uses: actions/upload-artifact@v3 with: From 7b89ae89495dc70e2f8b90c5638fe9bde2b8ba39 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:34:24 -0500 Subject: [PATCH 39/49] Update create_pdf_from_lighthouseJsonOutput.js --- create_pdf_from_lighthouseJsonOutput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_pdf_from_lighthouseJsonOutput.js b/create_pdf_from_lighthouseJsonOutput.js index 09e628ba5..54d9276fe 100644 --- a/create_pdf_from_lighthouseJsonOutput.js +++ b/create_pdf_from_lighthouseJsonOutput.js @@ -5,7 +5,7 @@ const { chromium } = require('playwright'); const browser = await chromium.launch(); const page = await browser.newPage(); - const report = fs.readFileSync('report.json', 'utf8'); + const report = fs.readFileSync('./test-results/report.json', 'utf8'); const reportObj = JSON.parse(report); if (typeof reportObj.report !== 'string') { From 01a5fa47069d25779009cf6da95eefe79177aad0 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:36:53 -0500 Subject: [PATCH 40/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index 813404e28..10ebbb30f 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -23,7 +23,7 @@ jobs: sudo apt-get install -y libgbm-dev npm ci npx playwright install chromium - npm install -g lighthouse chrome-launcher axe-core chromium wait-on + npm install -g playwright lighthouse chrome-launcher axe-core chromium wait-on - name: Start the X server run: | From 20b02ff6e0b015a7f1fb5794ae8facad2ac4145c Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:39:28 -0500 Subject: [PATCH 41/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index 10ebbb30f..b1c2d2e6c 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -41,6 +41,7 @@ jobs: - name: Generate Lighthouse Report and Convert it to PDF using create_pdf_from_lighthouseJsonOutput.js run: | lighthouse http://localhost:3000 --output json --output-path ./test-results/report.json --chrome-flags="--headless --no-sandbox --disable-gpu" + npm install playwright node create_pdf_from_lighthouseJsonOutput.js - name: Upload report, screenshots and videos of failed tests uses: actions/upload-artifact@v3 From 4eab8ad1f1934434c794893e4560d735f8cb4167 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:44:17 -0500 Subject: [PATCH 42/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index b1c2d2e6c..857c56707 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -20,7 +20,8 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y libgbm-dev + sudo apt-get install -y libgbm-dev + sudo apt-get install -y libgbm-dev xinit npm ci npx playwright install chromium npm install -g playwright lighthouse chrome-launcher axe-core chromium wait-on @@ -38,11 +39,9 @@ jobs: - name: Run Playwright tests run: npx playwright test --config=playwright.config.js - - name: Generate Lighthouse Report and Convert it to PDF using create_pdf_from_lighthouseJsonOutput.js + - name: Generate Lighthouse Report run: | - lighthouse http://localhost:3000 --output json --output-path ./test-results/report.json --chrome-flags="--headless --no-sandbox --disable-gpu" - npm install playwright - node create_pdf_from_lighthouseJsonOutput.js + lighthouse http://localhost:3000 --output html --output-path ./test-results/report.html --chrome-flags="--headless --no-sandbox --disable-gpu" - name: Upload report, screenshots and videos of failed tests uses: actions/upload-artifact@v3 with: From f3913eac490a582a2347a3b26e24dd46a3e8f304 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:44:39 -0500 Subject: [PATCH 43/49] Delete create_pdf_from_lighthouseJsonOutput.js --- create_pdf_from_lighthouseJsonOutput.js | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 create_pdf_from_lighthouseJsonOutput.js diff --git a/create_pdf_from_lighthouseJsonOutput.js b/create_pdf_from_lighthouseJsonOutput.js deleted file mode 100644 index 54d9276fe..000000000 --- a/create_pdf_from_lighthouseJsonOutput.js +++ /dev/null @@ -1,19 +0,0 @@ -const fs = require('fs'); -const { chromium } = require('playwright'); - -(async () => { - const browser = await chromium.launch(); - const page = await browser.newPage(); - - const report = fs.readFileSync('./test-results/report.json', 'utf8'); - const reportObj = JSON.parse(report); - - if (typeof reportObj.report !== 'string') { - throw new Error('Report is not a string'); - } - - await page.setContent(JSON.stringify(reportObj.report)); - await page.pdf({ path: './test-results/light_house_report.pdf', format: 'A4' }); - - await browser.close(); -})(); From 0fc7d3e5a96ea1f40a436111b8b0021ee7a34e86 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:48:15 -0500 Subject: [PATCH 44/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index 857c56707..fb14c08f1 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -21,15 +21,9 @@ jobs: run: | sudo apt-get update sudo apt-get install -y libgbm-dev - sudo apt-get install -y libgbm-dev xinit npm ci npx playwright install chromium - npm install -g playwright lighthouse chrome-launcher axe-core chromium wait-on - - - name: Start the X server - run: | - export DISPLAY=:0 - startx & sleep 5 + npm install -g lighthouse chrome-launcher axe-core chromium wait-on - name: Start the application run: | From 33480e4f4eb6a1f0d8a30c5b87f70e36a6e5a244 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Fri, 10 Mar 2023 16:52:50 -0500 Subject: [PATCH 45/49] Update playwright_test_record_video.yml --- .github/workflows/playwright_test_record_video.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_test_record_video.yml index fb14c08f1..fea96bbb7 100644 --- a/.github/workflows/playwright_test_record_video.yml +++ b/.github/workflows/playwright_test_record_video.yml @@ -1,4 +1,4 @@ -name: Run Playwright and Generate LightHouse PDF Report +name: Run Playwright and Generate a video, screenshots, and LightHouse HTML Report on: push: From 9573da3819bcd29be10a6db608e07c5e3f99d930 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Tue, 21 Mar 2023 12:00:55 -0400 Subject: [PATCH 46/49] Rename playwright_test_record_video.yml to playwright_video_lighthouse_report.yml --- ...st_record_video.yml => playwright_video_lighthouse_report.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{playwright_test_record_video.yml => playwright_video_lighthouse_report.yml} (100%) diff --git a/.github/workflows/playwright_test_record_video.yml b/.github/workflows/playwright_video_lighthouse_report.yml similarity index 100% rename from .github/workflows/playwright_test_record_video.yml rename to .github/workflows/playwright_video_lighthouse_report.yml From bba51863a9a83110096c064041263a2f1bc8987f Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Tue, 21 Mar 2023 17:51:50 -0400 Subject: [PATCH 47/49] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index b85863e93..a6c02424a 100644 --- a/readme.md +++ b/readme.md @@ -41,7 +41,7 @@ Finally, use Playwright to create powerful and reliable automated tests for web 1. [Part 1 - Getting Ready for Project 1](https://youtu.be/b60nwHeJjrQ) 2. [Part 2 - Lean and Using ChatGPT for The Project ](https://youtu.be/EZMRNybUtUI) 3. [Part 3 - Project Introduction](https://youtu.be/FkPZDFmGuys) -4. TBD +4. [Part 4 - Getting Ready for Project 2](https://youtu.be/ZiQIheh5xb4) # Project Setup ## I am giving you my code; howevever, you should replace what I did with your own work. Feel free to choose another CSS framework; howevever, you must complete the project simulation's requirements. From 7b86bdeaf632a2c1962771d257c6280e051f7911 Mon Sep 17 00:00:00 2001 From: kaw393939 Date: Tue, 21 Mar 2023 18:18:30 -0400 Subject: [PATCH 48/49] Update readme.md --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index a6c02424a..434925430 100644 --- a/readme.md +++ b/readme.md @@ -42,6 +42,7 @@ Finally, use Playwright to create powerful and reliable automated tests for web 2. [Part 2 - Lean and Using ChatGPT for The Project ](https://youtu.be/EZMRNybUtUI) 3. [Part 3 - Project Introduction](https://youtu.be/FkPZDFmGuys) 4. [Part 4 - Getting Ready for Project 2](https://youtu.be/ZiQIheh5xb4) +5. [Part 4a - Playwright and LightHouse Action](https://youtu.be/JiIp0NxvHlU) # Project Setup ## I am giving you my code; howevever, you should replace what I did with your own work. Feel free to choose another CSS framework; howevever, you must complete the project simulation's requirements. From a5277f7209d2684812298720f35587fbb84a6a77 Mon Sep 17 00:00:00 2001 From: Carlos Ray <106279547+Carlomos7@users.noreply.github.com> Date: Mon, 27 Mar 2023 20:13:05 -0400 Subject: [PATCH 49/49] Create task_table.md --- task_table.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 task_table.md diff --git a/task_table.md b/task_table.md new file mode 100644 index 000000000..9b7a0dd28 --- /dev/null +++ b/task_table.md @@ -0,0 +1,37 @@ +# Team Member Task Tracker +## Arqam Usman Ali +| Task | Story Points | Comments | +| ----------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------ | +| Determine business requirements for internationalization | 2 | Shared with Carlos | +| Determine business requirements for SEO | 3 | | +| Identify positive and negative tests to ensure SEO works as intended | 5 | | +| Research and implement tools and technologies to support SEO | 8 | | +| Recommend SEO tools based on data and specific reasons | 5 | | +| Determine legal requirements for web accessibility | 3 | | +| Research GDPR compliance and Google Analytics Consent Mode | 5 | | +| Provide a privacy policy and confirmation modal for GDPR compliance | 5 | | +| Total story points: | 36 | | +## Frank Xu +| Task | Story Points | Comments | +| ----------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------ | +| Web Accessibility and Internationalization Research, Implementation, Testing, and Issue Resolutions | 8 | | +| Implement and monitor DevOps pipeline using GitHub Actions | 3 | Shared with Carlos | +| Automatically test W3C validation, handicap accessibility, and JavaScript style | 3 | Shared with Carlos | +| Run CodeQL and ESLint using GitHub Actions | 5 | | +| Measure build time, bundle size, code quality score, deployment time, developer environment setup time, and test running time | 8 | | +| Development of Responsive Content Template and Homepage | 3 | Shared with Carlos | +| Testing and Quality Assurance | 3 | Shared with Carlos | +| Total story points: | 33 | | +## Carlos Segarra +| Task | Story Points | Comments | +| ----------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------ | +| Determine business requirements for internationalization | 2 | Shared with Arqam | +| Web Accessibility and Internationalization Research, Implementation, Testing, and Issue Resolutions | 8 | | +| Implement and monitor DevOps pipeline using GitHub Actions | 3 | Shared with Frank | +| Automatically test W3C validation, handicap accessibility, and JavaScript style | 3 | Shared with Frank | +| Test and evaluate different node package managers (NPM, Yarn, etc.) | 5 | | +| Test and evaluate build tools (Webpack, Veet, EsBuild) | 5 | | +| Generate Lighthouse Reports using Playwright | 5 | | +| Development of Responsive Content Template and Homepage | 3 | | +| Testing and Quality Assurance | 3 | Shared with Frank | +| Total story points: | 37 | |