Skip to content

test: add unit tests for newsletter buttons and verify target blank #138#174

Open
ahmad1368 wants to merge 1 commit into
stagingfrom
feature/newsletter-new-window-138
Open

test: add unit tests for newsletter buttons and verify target blank #138#174
ahmad1368 wants to merge 1 commit into
stagingfrom
feature/newsletter-new-window-138

Conversation

@ahmad1368

Copy link
Copy Markdown
Contributor

Closes #138

Changes made:

  • Hardcoded target="_blank" and rel="noopener noreferrer" inside Newsletter.astro component.
  • Updated configuration for Newsletter333 in src/lib/content.ts.
  • Added unit tests in src/components/SubscribetoNewsletterButtom.test.ts to verify the exact data structure and ensure the component source file guarantees the secure target attributes.

PTAL @vincent6767

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cloudsummit-github-io Ready Ready Preview, Comment Jul 12, 2026 5:14am

expect(newsletterContent.ctaHref).toBe("https://tally.so/r/mR6RBl");
});

// ۲. تست وجود هاردکد target="_blank" درون کامپوننت کاملا به صورت خودکار

@vincent6767 vincent6767 Jul 12, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @ahmad1368, can you use English for all comments in the PR? Thank you!

@vincent6767 vincent6767 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I approve the overall changes. @ahmad1368 Please address my comments before you merge. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants