Skip to content

Commit 57f6449

Browse files
committed
Remove searchBy from tests
1 parent d27b45c commit 57f6449

File tree

3 files changed

+10
-17
lines changed

3 files changed

+10
-17
lines changed

frontend/test/playwright/e2e/filters-sidebar-keyboard.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ for (const dir of languageDirections) {
3535
await setBreakpointCookie(page, "lg")
3636
/**
3737
* To simplify finding the last focusable element in the filters sidebar,
38-
* we use the image search page. After the removal of the "searchBy" filter,
39-
* the last element on the all media search page is the "license explanation"
40-
* button, not a checkbox.
38+
* we use the image search page. The last element on the all media search
39+
* page is the "license explanation" button, not a checkbox.
4140
*/
4241
await page.goto(pathWithDir("/search/image?q=birds", dir))
4342
})

frontend/test/playwright/e2e/filters.spec.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ breakpoints.describeMobileAndDesktop(() => {
6464
}
6565

6666
test("initial filters are applied based on the url", async ({ page }) => {
67-
await page.goto(
68-
"/search/?q=cat&license_type=commercial&license=cc0&searchBy=creator"
69-
)
67+
await page.goto("/search/?q=cat&license_type=commercial&license=cc0")
7068
await filters.open(page)
7169
// Creator filter was removed from the UI
7270
const expectedFilters = ["Zero", "Use commercially"]
@@ -79,9 +77,7 @@ breakpoints.describeMobileAndDesktop(() => {
7977
test("common filters are retained when media type changes from all media to single type", async ({
8078
page,
8179
}) => {
82-
await page.goto(
83-
"/search/?q=cat&license_type=commercial&license=cc0&searchBy=creator"
84-
)
80+
await page.goto("/search/?q=cat&license_type=commercial&license=cc0")
8581
await filters.open(page)
8682
// Creator filter was removed from the UI
8783
const expectedFilters = ["Zero", "Use commercially"]
@@ -92,7 +88,7 @@ breakpoints.describeMobileAndDesktop(() => {
9288
await changeSearchType(page, IMAGE)
9389

9490
await expect(page).toHaveURL(
95-
"/search/image?q=cat&license_type=commercial&license=cc0&searchBy=creator"
91+
"/search/image?q=cat&license_type=commercial&license=cc0"
9692
)
9793
await filters.open(page)
9894
for (const checkbox of expectedFilters) {
@@ -103,9 +99,7 @@ breakpoints.describeMobileAndDesktop(() => {
10399
test("common filters are retained when media type changes from single type to all media", async ({
104100
page,
105101
}) => {
106-
await page.goto(
107-
"/search/image?q=cat&license_type=commercial&license=cc0&searchBy=creator"
108-
)
102+
await page.goto("/search/image?q=cat&license_type=commercial&license=cc0")
109103
await filters.open(page)
110104

111105
// Creator filter was removed from the UI
@@ -119,7 +113,7 @@ breakpoints.describeMobileAndDesktop(() => {
119113
await expect(page.locator('input[type="checkbox"]:checked')).toHaveCount(3)
120114

121115
await expect(page).toHaveURL(
122-
"/search/?q=cat&license_type=commercial&license=cc0&searchBy=creator"
116+
"/search/?q=cat&license_type=commercial&license=cc0"
123117
)
124118
})
125119

frontend/test/playwright/e2e/search-query-server.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ test.describe("search query on SSR", () => {
3434

3535
test("q query parameter is set as the search term", async ({ page }) => {
3636
await goToSearchTerm(page, "cat", {
37-
query: "license=cc0&license_type=commercial&searchBy=creator",
37+
query: "license=cc0&license_type=commercial",
3838
})
3939

4040
const searchInput = page.locator('input[type="search"]')
@@ -66,7 +66,7 @@ test.describe("search query on SSR", () => {
6666
page,
6767
}) => {
6868
await goToSearchTerm(page, "cat", {
69-
query: "license=cc0&license_type=commercial&searchBy=creator",
69+
query: "license=cc0&license_type=commercial",
7070
})
7171

7272
await filters.open(page)
@@ -83,7 +83,7 @@ test.describe("search query on SSR", () => {
8383
}) => {
8484
await goToSearchTerm(page, "cat", {
8585
searchType: IMAGE,
86-
query: "searchBy=creator&extension=jpg,png,gif,svg",
86+
query: "extension=jpg,png,gif,svg",
8787
})
8888
await filters.open(page)
8989
const checkboxes = ["JPEG", "PNG", "GIF", "SVG"]

0 commit comments

Comments
 (0)