Skip to content

Commit cb58892

Browse files
authored
Merge pull request #86 from checkly/guolau/fix-broken-video-embeds
fix: broken video embeds and refactor existing embeds to use reusable snippet
2 parents 8b7d108 + 57ef813 commit cb58892

15 files changed

+69
-98
lines changed

cli/environment-variables.mdx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ description: 'Learn how to use environment variables in your Checkly project'
44
sidebarTitle: 'Environment Variables'
55
---
66

7+
import { YoutubeEmbed } from "/snippets/youtube-embed.jsx"
78

89
There are two types of environment variables (env vars) in the Checkly CLI context.
910

@@ -12,14 +13,7 @@ There are two types of environment variables (env vars) in the Checkly CLI conte
1213

1314
To get a quick overview of when to use which, checkout this video 👇
1415

15-
<iframe
16-
className="w-full aspect-video rounded-xl"
17-
src="https://www.youtube.com/embed/nEIOBRSbjAk"
18-
title="YouTube video player"
19-
frameBorder="0"
20-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
21-
allowFullScreen
22-
></iframe>
16+
<YoutubeEmbed id="nEIOBRSbjAk" title="How to use Checkly local and remote environment variables" />
2317

2418
## Local Environment Variables
2519

detect/synthetic-monitoring/api-checks/set-up-and-tear-down.mdx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ sidebarTitle: Set Up and Tear Down
66
---
77

88
import GenericRuntimeVariablesTable from '/snippets/generic-runtime-variables-table.mdx';
9+
import { YoutubeEmbed } from "/snippets/youtube-embed.jsx"
910

1011
Setup and teardown scripts can be used to execute arbitrary JavaScript/TypeScript code before and/or after an API check.
1112
Both script types have access to all environment variables, runtime objects like `request` and `response` and popular npm packages
@@ -18,14 +19,7 @@ However, you can also use them [via our web UI](#using-setup-and-teardown-script
1819
1920
Check the video below for a quick overview of using setup and teardown scripts through the web UI and with the CLI.
2021

21-
<iframe
22-
className="w-full aspect-video rounded-xl"
23-
src="https://www.youtube.com/embed/38ZXJy-nlvI"
24-
title="YouTube video player"
25-
frameBorder="0"
26-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
27-
allowFullScreen
28-
></iframe>
22+
<YoutubeEmbed id="38ZXJy-nlvI" title="Monitor complex API endpoints with Checkly API checks" />
2923

3024
## Setup scripts
3125

detect/synthetic-monitoring/browser-checks/visual-regressions.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ description: 'Visual monitoring for more consistent UIs and complex assertions'
44
sidebarTitle: 'Visual Monitoring'
55
---
66

7+
import { YoutubeEmbed } from "/snippets/youtube-embed.jsx"
8+
79
Playwright Test gives you the ability to do visual regression testing and snapshot testing. With Checkly, you can run these tests
810
against production, 24x7.
911

@@ -13,7 +15,7 @@ core screens on production.
1315

1416
Have a look at this video for a quick explainer:
1517

16-
<Youtube id="uTm40YOtj_g" />
18+
<YoutubeEmbed id="uTm40YOtj_g" title="Add Visual Regression Testing to your Synthetic Monitoring" />
1719

1820
The TL;DR is that you can:
1921

guides/auto-waiting-methods.mdx

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ tags:
88
---
99

1010
import PlaywrightCheckSuiteTryOut from "/snippets/playwright-check-suite-tryout.mdx"
11+
import { YoutubeEmbed } from "/snippets/youtube-embed.jsx"
1112

1213
<PlaywrightCheckSuiteTryOut />
1314

@@ -209,17 +210,7 @@ A full walkthrough of the code changes is [on our documentation site](/detect/sy
209210

210211
To see a demo of how this state works in Checkly, take a look at Stefan’s tutorial video:
211212

212-
<Frame>
213-
<iframe
214-
src="https://www.youtube.com/embed/kzQu0Y_Nxjk"
215-
width="560"
216-
height="315"
217-
title="Degraded states in checkly"
218-
frameborder="0"
219-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
220-
allowfullscreen
221-
/>
222-
</Frame>
213+
<YoutubeEmbed id="kzQu0Y_Nxjk" title="Get alerted when your Playwright checks degrade in performance" />
223214

224215
## 3. Monitor network traffic with `waitForResponse`
225216

@@ -265,17 +256,7 @@ A note on code reading: for myself, and many other users on Stack Overflow, it's
265256

266257
See response body waiting in action as demonstrated by Stefan here:
267258

268-
<Frame>
269-
<iframe
270-
src="https://www.youtube.com/embed/5CER0dKweyw"
271-
width="560"
272-
height="315"
273-
title="Response body waiting in Playwright"
274-
frameborder="0"
275-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
276-
allowfullscreen
277-
/>
278-
</Frame>
259+
<YoutubeEmbed id="5CER0dKweyw" title="How to wait for a specific API response in your Playwright end-to-end tests" />
279260

280261
## 4. Implement your own auto-waiting and retry mechanism
281262

@@ -306,17 +287,7 @@ This approach won't fix the application's UI/UX issues but allows you to "work a
306287

307288
Stefan explains it in detail on YouTube if you want to learn more about this approach.
308289

309-
<Frame>
310-
<iframe
311-
src="https://www.youtube.com/embed/8g7FvoRToGo"
312-
width="560"
313-
height="315"
314-
title="Avoid flaky end-to-end tests due to poorly hydrated Frontends with Playwright's toPass()"
315-
frameborder="0"
316-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
317-
allowfullscreen
318-
/>
319-
</Frame>
290+
<YoutubeEmbed id="8g7FvoRToGo" title="Avoid flaky end-to-end tests due to poorly hydrated Frontends with Playwright's toPass()" />
320291

321292
## Conclusions
322293

guides/claude-code-monitoring.mdx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ avatar: 'images/avatars/nica-mellifera.png'
88
tags:
99
- AI
1010
---
11+
12+
import { YoutubeEmbed } from "/snippets/youtube-embed.jsx"
13+
1114
AI-assisted coding promises to massively upgrade developer productivity, and with Checkly's model of [Monitoring as Code](https://www.checklyhq.com/blog/monitoring-as-code-in-your-sdlc/), you can create monitoring coverage for all your services in minutes instead of days. This guide will show you how to create an AI development environment that lets you create and deploy several types of Checkly monitoring.
1215

1316
## Setup
@@ -392,11 +395,4 @@ To learn more about Checkly's capabilities, explore these resources:
392395

393396
For more tutorials and advanced use cases, visit the [Checkly YouTube channel](https://www.youtube.com/@ChecklyHQ), where you can see great tutorials like this guide to the Playwright MCP server:
394397

395-
<iframe
396-
className="w-full aspect-video rounded-xl"
397-
src="https://www.youtube.com/embed/MIlcVo1x3Is"
398-
title="Generating Playwright Tests With AI: Let's Try the New Playwright MCP Server!"
399-
frameBorder="0"
400-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
401-
allowFullScreen
402-
></iframe>
398+
<YoutubeEmbed id="MIlcVo1x3Is" title="Generating Playwright Tests With AI: Let's Try the New Playwright MCP Server!" />

guides/developer-fixtures.mdx

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ sidebarTitle: Testing Fixtures
88
---
99

1010
import PlaywrightCheckSuiteTryOut from "/snippets/playwright-check-suite-tryout.mdx"
11+
import { YoutubeEmbed } from "/snippets/youtube-embed.jsx"
1112

1213
<PlaywrightCheckSuiteTryOut />
1314

@@ -155,16 +156,7 @@ In this example, we've just put our fixtures at the top of a single check's file
155156
### See it in action: Reuse Playwright Code across Files and Tests with Fixtures
156157
To see fixtures demonstrated, and a step-by-step explanation of the code, check out [Stefan's tutorial video](https://www.youtube.com/watch?v=2O7dyz6XO2s&list=PLMZDRUOi3a8N067UNvkxXEThKlTII_OJ-&index=5):
157158

158-
<Frame>
159-
<iframe
160-
src="https://www.youtube.com/embed/2O7dyz6XO2s"
161-
width="560"
162-
height="315"
163-
frameborder="0"
164-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
165-
allowfullscreen
166-
/>
167-
</Frame>
159+
<YoutubeEmbed id="2O7dyz6XO2s" title="Reuse Playwright Code across Files and Tests with Fixtures" />
168160

169161
## Running standardized code across every check
170162
While it's useful to package up tasks like logging in across multiple tests, we may want some code to run before and after every single check. Some possible examples:
@@ -213,16 +205,7 @@ import { expect } from '@playwright/test';
213205
### See it in action: running code before and after every check
214206
To see this demonstrated, and a step-by-step explanation of the fixture code, check out [Stefan's tutorial video](https://www.youtube.com/watch?v=hegZS46J0rA&list=PLMZDRUOi3a8N067UNvkxXEThKlTII_OJ-&index=1):
215207

216-
<Frame>
217-
<iframe
218-
src="https://www.youtube.com/embed/hegZS46J0rA"
219-
width="560"
220-
height="315"
221-
frameborder="0"
222-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
223-
allowfullscreen
224-
/>
225-
</Frame>
208+
<YoutubeEmbed id="hegZS46J0rA" title="Add global beforeEach / afterEach hooks using Playwright automatic fixtures" />
226209

227210
Here's our [complete YouTube playlist on fixtures](https://www.youtube.com/playlist?list=PLMZDRUOi3a8N067UNvkxXEThKlTII_OJ-).
228211

guides/monitoring-ecommerce-apps-using-playwright.mdx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tags: Playwright
77

88
import CliAuth from '/snippets/cli-auth.mdx';
99
import CliProjectInit from '/snippets/cli-project-init.mdx';
10+
import { YoutubeEmbed } from "/snippets/youtube-embed.jsx"
1011

1112
## Inspired by Infrastructure-as-Code and E2E-Testing
1213

@@ -35,17 +36,7 @@ What does one gain when moving from a manual to a monitoring as code approach? T
3536

3637
Watch our launch event to learn more about our CLI:
3738

38-
<Frame>
39-
<iframe
40-
src="https://www.youtube.com/embed/IcaMW2opx2U"
41-
width="560"
42-
height="315"
43-
title="monitoring as code launch event video"
44-
frameborder="0"
45-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
46-
allowfullscreen
47-
/>
48-
</Frame>
39+
<YoutubeEmbed id="IcaMW2opx2U" title="The new Era of Monitoring as Code" />
4940

5041
## Monitoring as Code with Checkly
5142

learn/playwright/codegen.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@ learn_playwright:
1414
---
1515

1616
import PlaywrightCheckSuiteTryOut from "/snippets/playwright-check-suite-tryout.mdx"
17+
import { YoutubeEmbed } from "/snippets/youtube-embed.jsx"
1718

1819
<PlaywrightCheckSuiteTryOut />
1920

2021
Did you know that you can use Playwright to generate your automation scripts automatically? Let's dive into how you can leverage Playwright's `codegen` feature to record scripts effortlessly.
2122

22-
23-
2423
### Step 1: Launch Playwright Codegen
2524

2625
To get started, you'll use the `codegen` command from the Playwright executable. Let's say you want to create a script for interacting with [Checkly](https://checklyhq.com/). You would run the following command in your terminal:
@@ -125,8 +124,7 @@ You’ll also notice in the screenshot that the inspector automatically adds a `
125124

126125
To see the highly visual codegen tool in action, check out Stefan’s video below:
127126

128-
129-
127+
<YoutubeEmbed id="O-uS5wKKB30" title="How to record automation scripts using Playwright Codegen" />
130128

131129
### Go further with Playwright
132130

learn/playwright/how-to-detect-broken-links.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ learn_playwright:
1414
---
1515

1616
import PlaywrightCheckSuiteTryOut from "/snippets/playwright-check-suite-tryout.mdx"
17+
import { YoutubeEmbed } from "/snippets/youtube-embed.jsx"
1718

1819
<PlaywrightCheckSuiteTryOut />
1920

@@ -23,7 +24,7 @@ Let's unveil some links going nowhere!
2324

2425
If you prefer the video version of this tutorial, check the video below, and if you're only here to copy and paste a final implementation, find the final code on GitHub.
2526

26-
27+
<YoutubeEmbed id="EJJ_PYK8YiM" title="How to detect broken links with Playwright Test" />
2728

2829
## Let's break down the problem
2930

learn/playwright/how-to-parameterize-playwright-projects.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ learn_playwright:
1414
---
1515

1616
import PlaywrightCheckSuiteTryOut from "/snippets/playwright-check-suite-tryout.mdx"
17+
import { YoutubeEmbed } from "/snippets/youtube-embed.jsx"
1718

1819
<PlaywrightCheckSuiteTryOut />
1920

@@ -35,7 +36,7 @@ Let me show in this article how to implement options to configure fixtures, page
3536

3637
If you prefer video, here's a recording explaining the same concepts.
3738

38-
39+
<YoutubeEmbed id="rRmfYu8hlbw" title="How to parameterize and configure your custom Playwright fixtures" />
3940

4041
## Why fixtures enable clean Playwright projects
4142

0 commit comments

Comments
 (0)