From 648bc3bbdf795c48a4e0f7b0fcbf4ef62a24251a Mon Sep 17 00:00:00 2001 From: Danny Koppenhagen Date: Sat, 21 Dec 2024 06:18:28 +0100 Subject: [PATCH] chore: update project to vue3 and other latest dependencies Fixes #266, #463 Closes #509, #464, #461, #451, #332, #322, #317, #297, #287, #276, #199 --- .github/workflows/build.yml | 20 +++++--------------- .gitignore | 6 ------ cypress/e2e/smoke.cy.ts | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 21 deletions(-) create mode 100644 cypress/e2e/smoke.cy.ts diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ff7ff379..ad343ef3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,10 +4,8 @@ on: branches-ignore: - main - gh-pages - jobs: build-and-test: - timeout-minutes: 60 runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -15,17 +13,9 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 22 - - name: Install dependencies - run: npm ci - - name: Build - run: npm run build - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - run: npx playwright test - - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} + - name: Build and Run End2End tests with Cypress + uses: cypress-io/github-action@v4 with: - name: playwright-report - path: playwright-report/ - retention-days: 30 + build: npm run build + start: npm run dev + wait-on: "http://localhost:8080" diff --git a/.gitignore b/.gitignore index 806ed1ec..812a28a3 100644 --- a/.gitignore +++ b/.gitignore @@ -19,9 +19,3 @@ pnpm-debug.log* *.njsproj *.sln *.sw? - -# Playwright -/test-results/ -/playwright-report/ -/blob-report/ -/playwright/.cache/ diff --git a/cypress/e2e/smoke.cy.ts b/cypress/e2e/smoke.cy.ts new file mode 100644 index 00000000..d6b913c0 --- /dev/null +++ b/cypress/e2e/smoke.cy.ts @@ -0,0 +1,15 @@ +beforeEach(() => { + cy.visit("/") +}) + +it("should display the title", () => { + cy.get(".v-toolbar__content").contains("Trivy") +}) + +it("should contain a file input", () => { + cy.get(".v-file-upload input").should("have.attr", "type", "file") +}) + +it("should display an alert that no report was loaded", () => { + cy.get(".v-alert") +})