diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml deleted file mode 100644 index 046c1709..00000000 --- a/.github/workflows/playwright.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Playwright Tests -on: - pull_request_target: - branches: [develop] - types: [opened, synchronize, reopened, ready_for_review] -jobs: - test: - timeout-minutes: 60 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - - name: Install dependencies - run: npm ci - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - env: - DATABASE_URL: ${{ secrets.DATABASE_URL }} - run: npx playwright test - - uses: actions/upload-artifact@v3 - if: always() - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 diff --git a/cdk/lib/pipeline-stack.ts b/cdk/lib/pipeline-stack.ts index 613e76b2..148fd18a 100644 --- a/cdk/lib/pipeline-stack.ts +++ b/cdk/lib/pipeline-stack.ts @@ -19,6 +19,7 @@ import { ShellStep, } from "aws-cdk-lib/pipelines"; import * as ssm from "aws-cdk-lib/aws-ssm"; +import * as codebuild from "aws-cdk-lib/aws-codebuild"; export class PipelineStack extends cdk.Stack { constructor(scope: Construct, id: string, props: cdk.StackProps) { @@ -50,6 +51,7 @@ export class PipelineStack extends cdk.Stack { codeBuildDefaults: { cache: Cache.local(LocalCacheMode.DOCKER_LAYER), buildEnvironment: { + computeType: codebuild.ComputeType.MEDIUM, privileged: true, environmentVariables: { DOCKER_BUILDKIT: { diff --git a/e2e/articles.spec.ts b/e2e/articles.spec.ts index a39dab69..c50edd6b 100644 --- a/e2e/articles.spec.ts +++ b/e2e/articles.spec.ts @@ -18,7 +18,7 @@ test.describe("Articles", () => { }); await expect(page.locator(".animate-pulse")).toBeVisible(); - await expect(page.locator(".animate-pulse")).not.toBeVisible(); + await expect(page.locator(".animate-pulse")).toBeHidden(); const finalArticleCount = await page.$$eval( "article", diff --git a/e2e/login.spec.ts b/e2e/login.spec.ts index 02f15395..220d2bab 100644 --- a/e2e/login.spec.ts +++ b/e2e/login.spec.ts @@ -14,7 +14,7 @@ test.beforeEach(async ({ page }) => { test.describe("Login Page", () => { test("should display the login button", async ({ page }) => { const loginButton = page.getByRole("button", { - name: "Sign in with GitHub Login", + name: "Login with GitHub", }); expect(loginButton).toBeTruthy(); }); @@ -23,13 +23,14 @@ test.describe("Login Page", () => { page, }) => { const button = page.getByRole("button", { - name: "Sign in with GitHub Login", + name: "Login with GitHub", }); await button.click(); await page.waitForURL("https://github.com/**"); - await page.waitForSelector("#login_field"); + const loginField = page.locator("#login_field"); + await loginField.isVisible(); expect(page.getByLabel("Username or email address")).toBeTruthy(); expect(page.getByLabel("Password")).toBeTruthy(); diff --git a/playwright.config.ts b/playwright.config.ts index d3b739c6..674b903d 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -37,21 +37,22 @@ export default defineConfig({ use: { ...devices["Desktop Chrome"] }, }, - { - name: "firefox", - use: { ...devices["Desktop Firefox"] }, - }, - - { - name: "webkit", - use: { ...devices["Desktop Safari"] }, - }, + // Example other browsers + // { + // name: "firefox", + // use: { ...devices["Desktop Firefox"] }, + // }, - /* Test against mobile viewports. */ // { - // name: 'Mobile Chrome', - // use: { ...devices['Pixel 5'] }, + // name: "webkit", + // use: { ...devices["Desktop Safari"] }, // }, + + /* Test against mobile viewports. */ + { + name: "Mobile Chrome", + use: { ...devices["Pixel 5"] }, + }, // { // name: 'Mobile Safari', // use: { ...devices['iPhone 12'] },