Skip to content

Commit

Permalink
🛠
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Jul 3, 2023
1 parent f4d9881 commit a33e467
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
6 changes: 3 additions & 3 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ custom:
package:
excludeDevDependencies: true
patterns:
- './!**'
- 'server/**'
- 'dist/**'
- "./!**"
- "server/**"
- "dist/**"

plugins:
- serverless-offline
1 change: 0 additions & 1 deletion tests/functions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,3 @@ async function functionsTest(page: Page) {
await page.waitForTimeout(100);
await expect(result).toHaveText("Stuff is: 6");
}

6 changes: 3 additions & 3 deletions tests/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ test("index", async ({ page }) => {

test("black-box should be black", async ({ page }) => {
await page.goto("/app/");
const blackBox = page.locator('.black-box');
await expect(blackBox).toHaveCSS('background-color', 'rgb(0, 0, 0)');
const blackBox = page.locator(".black-box");
await expect(blackBox).toHaveCSS("background-color", "rgb(0, 0, 0)");
});

test("server origin should match origin", async ({ page }) => {
await page.goto("/app/");
const origin = page.locator('#server-origin');
const origin = page.locator("#server-origin");
const url = new URL(await page.url());
await expect(origin).toHaveText(`Origin: ${url.origin}`);
});
22 changes: 11 additions & 11 deletions tests/media.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ import { expect, test } from "@playwright/test";

test("local image should be served correctly", async ({ page }) => {
await page.goto("/app/media/");
const image0 = page.locator('#image-png');
await expect(image0).toHaveJSProperty('naturalWidth', 256);
await expect(image0).toHaveJSProperty('naturalHeight', 256);
const image0 = page.locator("#image-png");
await expect(image0).toHaveJSProperty("naturalWidth", 256);
await expect(image0).toHaveJSProperty("naturalHeight", 256);

const image1 = page.locator('#jsx-png');
await expect(image1).toHaveJSProperty('naturalWidth', 1280);
await expect(image1).toHaveJSProperty('naturalHeight', 1280);
const image1 = page.locator("#jsx-png");
await expect(image1).toHaveJSProperty("naturalWidth", 1280);
await expect(image1).toHaveJSProperty("naturalHeight", 1280);

const image2 = page.locator('#image-svg');
await expect(image2).toHaveJSProperty('naturalWidth', 300);
await expect(image2).toHaveJSProperty('naturalHeight', 93);
const image2 = page.locator("#image-svg");
await expect(image2).toHaveJSProperty("naturalWidth", 300);
await expect(image2).toHaveJSProperty("naturalHeight", 93);

const image3 = page.locator('#jsx-svg');
await expect(image3).toHaveAttribute('viewBox', '0 0 649 201');
const image3 = page.locator("#jsx-svg");
await expect(image3).toHaveAttribute("viewBox", "0 0 649 201");
});
4 changes: 3 additions & 1 deletion tests/react.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ test("qwik react", async ({ page }) => {
expect(rsp.status()).toBe(200);

await expect(page.locator("h1")).toContainText("Qwik React");
await expect(page.locator(".finished-qwik")).toHaveText("Everything rendered");
await expect(page.locator(".finished-qwik")).toHaveText(
"Everything rendered"
);
});

0 comments on commit a33e467

Please sign in to comment.