diff --git a/.github/workflows/playwright-pizza.yml b/.github/workflows/playwright-pizza.yml new file mode 100644 index 0000000..3ac7d8e --- /dev/null +++ b/.github/workflows/playwright-pizza.yml @@ -0,0 +1,41 @@ +name: Playwright Pizza + +on: [pull_request] + +jobs: + vercel-pizza: + runs-on: ubuntu-latest + steps: + - name: Wait for Vercel (pizza) + uses: patrickedqvist/wait-for-vercel-preview@v1.3.1 + id: waitFor200 + with: + token: ${{ secrets.GITHUB_TOKEN }} + max_timeout: 60 + environment: Preview – monorepo-testing-workshop-pizza-shop + + playwright-ta: + needs: vercel-pizza + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0 + + - name: Pnpm install + uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 #v2.4.0 + with: + run_install: true + + - name: Setup node + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d #v3.8.1 + with: + node-version: 18 + cache: "pnpm" + + - name: Show preview url + run: echo ${{ needs.vercel-ta.outputs.preview_url }} + + - name: Run Playwright tests + run: pnpm --filter pizza-shop run e2e + env: + PLAYWRIGHT_BASE_URL: ${{ needs.vercel-ta.outputs.preview_url }} \ No newline at end of file diff --git a/.github/workflows/playwright-ta.yml b/.github/workflows/playwright-ta.yml index db73c80..a309ac9 100644 --- a/.github/workflows/playwright-ta.yml +++ b/.github/workflows/playwright-ta.yml @@ -1,35 +1,41 @@ -# name: Playwright Test Automation +name: Playwright Test Automation -# on: [pull_request] +on: [pull_request] -# jobs: -# vercel-ta: -# name: Wait for Vercel (test-automation) -# WRITE YOUR CODE HERE -# USE: https://github.com/patrickedqvist/wait-for-vercel-preview +jobs: + vercel-ta: + runs-on: ubuntu-latest + steps: + - name: Wait for Vercel (test-automation) + uses: patrickedqvist/wait-for-vercel-preview@v1.3.1 + id: waitFor200 + with: + token: ${{ secrets.GITHUB_TOKEN }} + max_timeout: 60 + environment: Preview – monorepo-testing-workshop-test-automation -# playwright-ta: -# needs: vercel-ta -# runs-on: ubuntu-latest -# timeout-minutes: 10 -# steps: -# - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0 + playwright-ta: + needs: vercel-ta + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0 -# - name: Pnpm install -# uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 #v2.4.0 -# with: -# run_install: true + - name: Pnpm install + uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 #v2.4.0 + with: + run_install: true -# - name: Setup node -# uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d #v3.8.1 -# with: -# node-version: 18 -# cache: "pnpm" + - name: Setup node + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d #v3.8.1 + with: + node-version: 18 + cache: "pnpm" -# - name: Show preview url -# run: echo ${{ needs.vercel-ta.outputs.preview_url }} + - name: Show preview url + run: echo ${{ needs.vercel-ta.outputs.preview_url }} -# - name: Run Playwright tests -# run: pnpm --filter test-automation run e2e -# env: -# PLAYWRIGHT_BASE_URL: ${{ needs.vercel-ta.outputs.preview_url }} + - name: Run Playwright tests + run: pnpm --filter test-automation run e2e + env: + PLAYWRIGHT_BASE_URL: ${{ needs.vercel-ta.outputs.preview_url }} \ No newline at end of file diff --git a/apps/test-automation/src/app/page.tsx b/apps/test-automation/src/app/page.tsx index 6ea2ca1..a7efb5f 100644 --- a/apps/test-automation/src/app/page.tsx +++ b/apps/test-automation/src/app/page.tsx @@ -4,7 +4,7 @@ const LINKS = [ { title: "🏖️ Summer Deal!", href: "#", - description: "Become a test automation guru for only $99!", + description: "Become a test automation guru for only $9900000!", }, { title: "💌 Contact Us!",