Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/blog/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import { defineConfig, sharpImageService } from "astro/config";
import critters from "astro-critters";
import icon from "astro-icon";
import pagefind from "astro-pagefind";
import { DEFAULT_LOCALE_SETTING, LOCALES_SETTING } from "../../packages/shared/src/i18n/locales.ts";
import {
DEFAULT_LOCALE_SETTING,
LOCALES_SETTING,
} from "../../packages/shared/src/i18n/locales.ts";
import envSchema from "../../packages/shared/src/utils/env-schema.ts";
import { whenExternalScripts } from "../../packages/shared/src/utils/externalScripts.ts";
import {
Expand Down
1 change: 1 addition & 0 deletions apps/blog/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { defineConfig, devices } from "@playwright/test";
*/
export default defineConfig({
testDir: "tests/e2e",
testIgnore: ["tests/e2e/contact-form.spec.ts"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# 1. Check if contact-form.spec.ts physically exists in apps/blog's test tree
echo "=== Checking for contact-form.spec.ts in apps/blog ==="
fd "contact-form.spec.ts" apps/blog 2>/dev/null || echo "Not found"

# 2. List all .spec.ts files in apps/blog/tests/e2e to see what exists
echo "=== All .spec.ts files in apps/blog/tests/e2e ==="
fd -e "spec.ts" apps/blog/tests/e2e 2>/dev/null || echo "Directory does not exist or no specs found"

# 3. Check if apps/blog/tests/e2e directory exists at all
echo "=== Directory listing for apps/blog/tests ==="
ls -la apps/blog/tests 2>/dev/null || echo "No tests directory in apps/blog"

# 4. Look for the playwright.config.ts file and read its content
echo "=== Current playwright.config.ts content in apps/blog ==="
cat apps/blog/playwright.config.ts 2>/dev/null || echo "File not found"

# 5. Check apps/portfolio's playwright config for comparison
echo "=== Current playwright.config.ts content in apps/portfolio ==="
cat apps/portfolio/playwright.config.ts 2>/dev/null || echo "File not found"

# 6. List all test files in apps/portfolio to see blog-only specs
echo "=== All .spec.ts files in apps/portfolio/tests/e2e ==="
fd -e "spec.ts" apps/portfolio/tests 2>/dev/null || echo "No test files found"

Repository: yacosta738/yacosta738.github.io

Length of output: 7353


🌐 Web query:

Playwright testIgnore relative path pattern matching documentation

💡 Result:

testIgnore patterns are matched against the absolute file path of each test file; string values are treated as glob patterns (you can also use RegExp or an array of globs/regexes). So “relative-looking” patterns generally need to be written to match anywhere in the absolute path (e.g., prefix with **/). (playwright.dev)

Examples (from the docs and typical usage):

  • Ignore a directory anywhere: testIgnore: '**/test-assets/**' (playwright.dev)
  • You can also do: testIgnore: ['**/e2e/experimental/**', /.*\.flaky\.spec\.(ts|js)$/] (glob + regex) (playwright.dev)

Sources

  • [1] Playwright API docs — testConfig.testIgnore (playwright.dev)
  • [2] Playwright “Test configuration” — filtering tests (testIgnore/testMatch) (playwright.dev)

Citations:


Fix testIgnore glob patterns to use **/ prefix for reliable absolute-path matching.

Per Playwright's official documentation, testIgnore patterns are matched against the absolute file path using glob semantics. The pattern "tests/e2e/contact-form.spec.ts" (relative form) will not reliably match an absolute path like /runner/work/.../apps/blog/tests/e2e/contact-form.spec.ts without the **/ prefix.

Update both apps/blog/playwright.config.ts and apps/portfolio/playwright.config.ts to use the documented glob format:

Example for apps/blog
-	testIgnore: ["tests/e2e/contact-form.spec.ts"],
+	testIgnore: ["**/contact-form.spec.ts"],
Example for apps/portfolio
 	testIgnore: [
-		"tests/e2e/comments*.spec.ts",
-		"tests/e2e/search.spec.ts",
-		"tests/e2e/newsletter.spec.ts",
-		"tests/e2e/tag-external-articles.spec.ts",
+		"**/comments*.spec.ts",
+		"**/search.spec.ts",
+		"**/newsletter.spec.ts",
+		"**/tag-external-articles.spec.ts",
 	],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
testIgnore: ["tests/e2e/contact-form.spec.ts"],
testIgnore: ["**/contact-form.spec.ts"],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/blog/playwright.config.ts` at line 9, The Playwright config's testIgnore
patterns use relative globs that won't reliably match absolute paths; update the
testIgnore arrays in the Playwright configs (the testIgnore property in
apps/blog/playwright.config.ts and apps/portfolio/playwright.config.ts) to
prefix ignored file patterns with "**/" (e.g., change
"tests/e2e/contact-form.spec.ts" to "**/tests/e2e/contact-form.spec.ts") so the
glob will match absolute file paths as Playwright expects.


// Test execution settings
timeout: 120_000, // Increased timeout for webkit stability
Expand Down
35 changes: 28 additions & 7 deletions apps/blog/src/content.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ const locationSchema = z.object({

// System skills library collection (icons, metadata, etc.)
const skillsLibrary = defineCollection({
loader: glob({ pattern: "**/[^_]*.json", base: "../../packages/shared/src/data/skills" }),
loader: glob({
pattern: "**/[^_]*.json",
base: "../../packages/shared/src/data/skills",
}),
schema: z.object({
id: z.string(),
name: z.string(),
Expand All @@ -33,7 +36,10 @@ const skillsLibrary = defineCollection({

// Languages library collection (language names, mappings, metadata)
const languagesLibrary = defineCollection({
loader: glob({ pattern: "**/[^_]*.json", base: "../../packages/shared/src/data/languages" }),
loader: glob({
pattern: "**/[^_]*.json",
base: "../../packages/shared/src/data/languages",
}),
schema: z.object({
code: z.string(),
nativeName: z.string(),
Expand Down Expand Up @@ -66,7 +72,10 @@ const projectMetadata = defineCollection({

// Main resume collection using glob loader for multiple languages
const resume = defineCollection({
loader: glob({ pattern: "**/resume.json", base: "../../packages/shared/src/data/resume" }),
loader: glob({
pattern: "**/resume.json",
base: "../../packages/shared/src/data/resume",
}),
schema: z.object({
basics: z.object({
name: z.string(),
Expand Down Expand Up @@ -209,7 +218,10 @@ const resume = defineCollection({
});

const articles = defineCollection({
loader: glob({ pattern: "**/*.{md,mdx}", base: "../../packages/shared/src/data/articles" }),
loader: glob({
pattern: "**/*.{md,mdx}",
base: "../../packages/shared/src/data/articles",
}),
schema: ({ image }: SchemaContext) =>
z.object({
title: z.string(),
Expand All @@ -226,23 +238,32 @@ const articles = defineCollection({
});

const tags = defineCollection({
loader: glob({ pattern: "**/[^_]*.md", base: "../../packages/shared/src/data/tags" }),
loader: glob({
pattern: "**/[^_]*.md",
base: "../../packages/shared/src/data/tags",
}),
schema: z.object({
title: z.string(),
slug: z.string().optional(),
}),
});

const categories = defineCollection({
loader: glob({ pattern: "**/[^_]*.md", base: "../../packages/shared/src/data/categories" }),
loader: glob({
pattern: "**/[^_]*.md",
base: "../../packages/shared/src/data/categories",
}),
schema: z.object({
title: z.string(),
order: z.number().optional(),
}),
});

const authors = defineCollection({
loader: glob({ pattern: "**/[^_]*.json", base: "../../packages/shared/src/data/authors" }),
loader: glob({
pattern: "**/[^_]*.json",
base: "../../packages/shared/src/data/authors",
}),
schema: z.object({
name: z.string(),
email: z.string(),
Expand Down
2 changes: 1 addition & 1 deletion apps/blog/src/data/resume/en/resume.json
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@
"name": "Deutsche Bank",
"position": "Senior Software Engineer",
"startDate": "2023-04-08",
"endDate": "2025-12-18",
"endDate": "2025-12-18",
"summary": "As a Senior Software Engineer at Deutsche Bank, I bring expertise in collaborating with cross-functional teams to analyze business requirements, designing and delivering software solutions that follow best practices and high coding standards, and ensuring systems meet functional and performance goals.",
"url": "https://db.com"
},
Expand Down
2 changes: 1 addition & 1 deletion apps/blog/src/data/resume/es/resume.json
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
"name": "Deutsche Bank",
"position": "Ingeniero de Software Senior",
"startDate": "2023-04-08",
"endDate": "2025-12-18",
"endDate": "2025-12-18",
"summary": "Como Ingeniero de Software Senior en Deutsche Bank, aporto experiencia colaborando con equipos multifuncionales para analizar requisitos de negocio, diseñar y entregar soluciones de software que siguen buenas prácticas y altos estándares de codificación, asegurando que los sistemas cumplan objetivos funcionales y de rendimiento.",
"url": "https://db.com"
},
Expand Down
2 changes: 1 addition & 1 deletion apps/blog/src/pages/[lang]/index.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { localeParams, type Lang } from "@/i18n";
import { type Lang, localeParams } from "@/i18n";

export function getStaticPaths() {
return localeParams;
Expand Down
16 changes: 11 additions & 5 deletions apps/portfolio/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { defineConfig, devices } from "@playwright/test";
*/
export default defineConfig({
testDir: "tests/e2e",
testIgnore: [
"tests/e2e/comments*.spec.ts",
"tests/e2e/search.spec.ts",
"tests/e2e/newsletter.spec.ts",
"tests/e2e/tag-external-articles.spec.ts",
],

// Test execution settings
timeout: 120_000, // Increased timeout for webkit stability
Expand Down Expand Up @@ -34,7 +40,7 @@ export default defineConfig({

// Global configuration for all tests
use: {
baseURL: process.env.BASE_URL || "http://localhost:4322",
baseURL: process.env.BASE_URL || "http://localhost:4321",
trace: "on-first-retry",
screenshot: "on-first-failure",
video: "on-first-retry",
Expand All @@ -59,8 +65,8 @@ export default defineConfig({
: "pnpm build";

return {
command: `${buildCommand} && pnpm preview --port 4322`,
url: "http://localhost:4322",
command: `${buildCommand} && pnpm preview --port 4321`,
url: "http://localhost:4321",
timeout: 600_000,
reuseExistingServer: false,
env: { PLAYWRIGHT_TEST: "true" },
Expand All @@ -70,8 +76,8 @@ export default defineConfig({
}

return {
command: "pnpm dev --port 4322",
url: "http://localhost:4322",
command: "pnpm dev --port 4321",
url: "http://localhost:4321",
timeout: 180_000,
reuseExistingServer: true,
env: { PLAYWRIGHT_TEST: "true" },
Expand Down
35 changes: 28 additions & 7 deletions apps/portfolio/src/content.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ const locationSchema = z.object({

// System skills library collection (icons, metadata, etc.)
const skillsLibrary = defineCollection({
loader: glob({ pattern: "**/[^_]*.json", base: "../../packages/shared/src/data/skills" }),
loader: glob({
pattern: "**/[^_]*.json",
base: "../../packages/shared/src/data/skills",
}),
schema: z.object({
id: z.string(),
name: z.string(),
Expand All @@ -33,7 +36,10 @@ const skillsLibrary = defineCollection({

// Languages library collection (language names, mappings, metadata)
const languagesLibrary = defineCollection({
loader: glob({ pattern: "**/[^_]*.json", base: "../../packages/shared/src/data/languages" }),
loader: glob({
pattern: "**/[^_]*.json",
base: "../../packages/shared/src/data/languages",
}),
schema: z.object({
code: z.string(),
nativeName: z.string(),
Expand Down Expand Up @@ -66,7 +72,10 @@ const projectMetadata = defineCollection({

// Main resume collection using glob loader for multiple languages
const resume = defineCollection({
loader: glob({ pattern: "**/resume.json", base: "../../packages/shared/src/data/resume" }),
loader: glob({
pattern: "**/resume.json",
base: "../../packages/shared/src/data/resume",
}),
schema: z.object({
basics: z.object({
name: z.string(),
Expand Down Expand Up @@ -209,7 +218,10 @@ const resume = defineCollection({
});

const articles = defineCollection({
loader: glob({ pattern: "**/*.{md,mdx}", base: "../../packages/shared/src/data/articles" }),
loader: glob({
pattern: "**/*.{md,mdx}",
base: "../../packages/shared/src/data/articles",
}),
schema: ({ image }: SchemaContext) =>
z.object({
title: z.string(),
Expand All @@ -226,23 +238,32 @@ const articles = defineCollection({
});

const tags = defineCollection({
loader: glob({ pattern: "**/[^_]*.md", base: "../../packages/shared/src/data/tags" }),
loader: glob({
pattern: "**/[^_]*.md",
base: "../../packages/shared/src/data/tags",
}),
schema: z.object({
title: z.string(),
slug: z.string().optional(),
}),
});

const categories = defineCollection({
loader: glob({ pattern: "**/[^_]*.md", base: "../../packages/shared/src/data/categories" }),
loader: glob({
pattern: "**/[^_]*.md",
base: "../../packages/shared/src/data/categories",
}),
schema: z.object({
title: z.string(),
order: z.number().optional(),
}),
});

const authors = defineCollection({
loader: glob({ pattern: "**/[^_]*.json", base: "../../packages/shared/src/data/authors" }),
loader: glob({
pattern: "**/[^_]*.json",
base: "../../packages/shared/src/data/authors",
}),
schema: z.object({
name: z.string(),
email: z.string(),
Expand Down
7 changes: 5 additions & 2 deletions apps/portfolio/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ import { getViteConfig } from "astro/config";
export default getViteConfig({
resolve: {
alias: [
{ find: "@/", replacement: `${path.resolve("./src")}/` },
{ find: "@", replacement: path.resolve("./src") },
{
find: "@/",
replacement: `${path.resolve("../../packages/shared/src")}/`,
},
{ find: "@", replacement: path.resolve("../../packages/shared/src") },
],
},
// @ts-expect-error
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"test:unit:portfolio": "pnpm --filter=portfolio test:unit",
"test:unit:blog": "pnpm --filter=blog test:unit",
"test:unit:api": "pnpm --filter=yap-api test:unit",
"test:e2e": "pnpm --filter=portfolio --filter=blog test:e2e",
"test:e2e": "pnpm test:e2e:portfolio && pnpm test:e2e:blog",
"test:e2e:portfolio": "pnpm --filter=portfolio test:e2e",
"test:e2e:blog": "pnpm --filter=blog test:e2e",
"cloudflare:check": "bash scripts/cloudflare-check.sh",
Expand Down
Loading