From c1e04945e96ad19b1ac07432adfb9b0fd262291a Mon Sep 17 00:00:00 2001 From: Sem Bauke Date: Tue, 21 May 2024 17:37:35 +0200 Subject: [PATCH] feat: convert projects to Playwright (#54689) Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com> Co-authored-by: Oliver Eyton-Williams --- .github/workflows/e2e-web.yml | 6 +- .../client-only-routes/show-project-links.tsx | 1 - .../src/components/settings/certification.tsx | 2 - .../solution-display-widget/index.tsx | 18 +- .../e2e/default/learn/challenges/projects.ts | 262 ------- .../show-cert-from-superblock.ts | 78 --- e2e/fixtures/js-ads-projects.json | 646 ++++++++++++++++++ e2e/fixtures/tribute-page-css.json | 5 + e2e/fixtures/tribute-page-html.json | 5 + e2e/hotkeys.spec.ts | 20 +- e2e/projects.spec.ts | 306 +++++++++ e2e/shortcuts-modal.spec.ts | 11 +- e2e/utils/editor.ts | 23 +- e2e/utils/request.ts | 18 +- e2e/utils/user-agent.ts | 1 + 15 files changed, 1015 insertions(+), 387 deletions(-) delete mode 100644 cypress/e2e/default/learn/challenges/projects.ts create mode 100644 e2e/fixtures/js-ads-projects.json create mode 100644 e2e/fixtures/tribute-page-css.json create mode 100644 e2e/fixtures/tribute-page-html.json create mode 100644 e2e/projects.spec.ts create mode 100644 e2e/utils/user-agent.ts diff --git a/.github/workflows/e2e-web.yml b/.github/workflows/e2e-web.yml index adeb21bc4b0..bb805d48636 100644 --- a/.github/workflows/e2e-web.yml +++ b/.github/workflows/e2e-web.yml @@ -77,12 +77,8 @@ jobs: strategy: fail-fast: false matrix: - browsers: [chrome, firefox, electron] + browsers: [chrome, firefox] node-version: [20.x] - include: - - browsers: electron - spec: cypress/e2e/default/learn/challenges/projects.ts - services: mongodb: image: mongo:4.4 diff --git a/client/src/client-only-routes/show-project-links.tsx b/client/src/client-only-routes/show-project-links.tsx index f57df8d5126..325e472133e 100644 --- a/client/src/client-only-routes/show-project-links.tsx +++ b/client/src/client-only-routes/show-project-links.tsx @@ -92,7 +92,6 @@ const ShowProjectLinks = (props: ShowProjectLinksProps): JSX.Element => { return ( void; showProjectPreview?: () => void; @@ -20,7 +19,6 @@ interface Props { export function SolutionDisplayWidget({ completedChallenge, - dataCy, projectTitle, showUserCode, showProjectPreview, @@ -36,7 +34,7 @@ export function SolutionDisplayWidget({ // two dropdowns for the same project on the page. const randomIdSuffix = Math.floor(Math.random() * 1_000_000); const ShowFilesSolutionForCertification = ( - ); const ShowExamResults = ( -