Skip to content

Commit

Permalink
Merge pull request #803 from dolthub/taylor/fix-blog
Browse files Browse the repository at this point in the history
Fix blog tests
  • Loading branch information
tbantle22 authored Apr 18, 2024
2 parents f46bb69 + 4f15ac5 commit 8ad7842
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions cypress/e2e/dolthub/publicPaths/render/blog/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ describe(`${pageName} renders expected components on different devices`, () => {
query1,
"Getting Started with Dolt and Knex.js",
"2023-09-27-dolt-and-knexjs/",
2,
),
newExpectationWithTypeString(
"should change input",
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/dolthub/publicPaths/render/blog/query.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe(`${pageName} renders expected components on different devices`, () => {
query,
"Getting Started with Dolt and Knex.js",
"2023-09-27-dolt-and-knexjs/",
2,
),
newExpectationWithClickFlow(
"should clear search",
Expand Down
8 changes: 6 additions & 2 deletions cypress/e2e/utils/sharedTests/blog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const testSearched = (
q: string,
title: string,
path: string,
numMatching = 1,
): Expectation[] => [
newExpectationWithURL(
"should route to query page",
Expand All @@ -25,12 +26,15 @@ export const testSearched = (
newExpectation(
"should have matching articles message",
"[data-cy=matching-articles]",
newShouldArgs("be.visible.and.contain", "Found 1 matching article."),
newShouldArgs(
"be.visible.and.contain",
`Found ${numMatching} matching article${numMatching > 1 ? "s" : ""}.`,
),
),
newExpectation(
"should have one blog",
"[data-cy=blog-list] > li",
newShouldArgs("be.visible.and.have.length", 1),
newShouldArgs("be.visible.and.have.length", numMatching),
),
newExpectation(
`should have matching blog title for ${q}`,
Expand Down

0 comments on commit 8ad7842

Please sign in to comment.