Skip to content

Commit 813b83b

Browse files
committed
test - add a test for list.js patch
this update playwright deps too, to get latest testing
1 parent d57aae7 commit 813b83b

File tree

10 files changed

+91
-13
lines changed

10 files changed

+91
-13
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.quarto/
2+
/_site/
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
project:
2+
type: website
3+
4+
website:
5+
title: "Testing listing search"
6+
7+
format: html
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: "Testing listing search"
3+
listing:
4+
contents: posts
5+
sort: "date desc"
6+
type: table
7+
categories: true
8+
filter-ui: true
9+
page-layout: full
10+
title-block-banner: true
11+
---
12+
13+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# options specified here will apply to all posts in this folder
2+
3+
# Enable banner style title blocks
4+
title-block-banner: true
40.8 KB
Loading
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "Post With Code"
3+
author: "Harlow Malloc"
4+
date: "2024-09-06"
5+
categories: [news, code, analysis]
6+
image: "image.jpg"
7+
---
8+
9+
This is a post with executable code.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: "Welcome To My Blog"
3+
author: "Tristan O'Malley"
4+
date: "2024-09-03"
5+
categories: [news]
6+
---
7+
8+
This is the first post in a Quarto blog. Welcome!
9+
10+
![](thumbnail.jpg)
11+
12+
Since this post doesn't specify an explicit `image`, the first image in the post will be used in the listing page of posts.
39 KB
Loading
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { expect, test } from "@playwright/test";
2+
3+
import { getUrl } from "../src/utils.js";
4+
5+
test('List.js is correctly patch to allow searching with lowercase and uppercase',
6+
async ({ page }) => {
7+
await page.goto(getUrl('blog/listing-search/_site/'));
8+
await page.getByPlaceholder('Filter').click();
9+
await page.getByPlaceholder('Filter').fill('Code');
10+
await page.getByPlaceholder('Filter').press('Enter');
11+
await expect(page.getByRole('link', { name: 'Post With Code' })).toBeVisible();
12+
await expect(page.getByRole('link', { name: 'Welcome To My Blog' })).toBeHidden();
13+
await page.getByPlaceholder('Filter').click();
14+
await page.getByPlaceholder('Filter').fill('');
15+
await page.getByPlaceholder('Filter').press('Enter');
16+
await expect(page.getByRole('link', { name: 'Post With Code' })).toBeVisible();
17+
await expect(page.getByRole('link', { name: 'Welcome To My Blog' })).toBeVisible();
18+
await page.getByPlaceholder('Filter').click();
19+
await page.getByPlaceholder('Filter').fill('CODE');
20+
await page.getByPlaceholder('Filter').press('Enter');
21+
await expect(page.getByRole('link', { name: 'Post With Code' })).toBeVisible();
22+
await expect(page.getByRole('link', { name: 'Welcome To My Blog' })).toBeHidden();
23+
});

tests/integration/playwright/yarn.lock

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,27 @@
33

44

55
"@playwright/test@^1.28.1":
6-
version "1.28.1"
7-
resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.28.1.tgz#e5be297e024a3256610cac2baaa9347fd57c7860"
8-
integrity sha512-xN6spdqrNlwSn9KabIhqfZR7IWjPpFK1835tFNgjrlysaSezuX8PYUwaz38V/yI8TJLG9PkAMEXoHRXYXlpTPQ==
6+
version "1.47.0"
7+
resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.47.0.tgz#69fc55b10754147cc20021afbfa05747d4961bf0"
8+
integrity sha512-SgAdlSwYVpToI4e/IH19IHHWvoijAYH5hu2MWSXptRypLSnzj51PcGD+rsOXFayde4P9ZLi+loXVwArg6IUkCA==
99
dependencies:
10-
"@types/node" "*"
11-
playwright-core "1.28.1"
10+
playwright "1.47.0"
1211

13-
"@types/node@*":
14-
version "18.11.9"
15-
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4"
16-
integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==
12+
13+
version "2.3.2"
14+
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
15+
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
1716

18-
19-
version "1.28.1"
20-
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.28.1.tgz#8400be9f4a8d1c0489abdb9e75a4cc0ffc3c00cb"
21-
integrity sha512-3PixLnGPno0E8rSBJjtwqTwJe3Yw72QwBBBxNoukIj3lEeBNXwbNiKrNuB1oyQgTBw5QHUhNO3SteEtHaMK6ag==
17+
18+
version "1.47.0"
19+
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.47.0.tgz#b54ec060fd83e5c2e46b63986b5ebb5e96ace427"
20+
integrity sha512-1DyHT8OqkcfCkYUD9zzUTfg7EfTd+6a8MkD/NWOvjo0u/SCNd5YmY/lJwFvUZOxJbWNds+ei7ic2+R/cRz/PDg==
21+
22+
23+
version "1.47.0"
24+
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.47.0.tgz#fb9b028883fad11362f9ff63ce7ba44bda0bf626"
25+
integrity sha512-jOWiRq2pdNAX/mwLiwFYnPHpEZ4rM+fRSQpRHwEwZlP2PUANvL3+aJOF/bvISMhFD30rqMxUB4RJx9aQbfh4Ww==
26+
dependencies:
27+
playwright-core "1.47.0"
28+
optionalDependencies:
29+
fsevents "2.3.2"

0 commit comments

Comments
 (0)