-
-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into 1071-video-player-page-for-courses
- Loading branch information
Showing
20 changed files
with
149 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ jobs: | |
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | ||
E2E_USER_EMAIL: [email protected] | ||
E2E_USER_ID: 8e3179ce-f32b-4d0a-ba3b-234d66b836ad | ||
E2E_USER_SESSION_ID: df8a11f2-f20a-43d6-80a0-a213f1efedc1 | ||
E2E_USER_ONE_SESSION_ID: df8a11f2-f20a-43d6-80a0-a213f1efedc1 | ||
|
||
steps: | ||
- name: Checkout repository | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
Tue, October 29th, 2024 • Niall Maher | ||
|
||
# 🎃 Is Your Domain Haunted? + Dev Productivity Tips | ||
|
||
Here's a Chrome DevTools trick to share screenshots of elements: the "Capture node screenshot" feature. | ||
|
||
Right-click any element in the Elements panel, select "Capture node screenshot," and instantly get a perfect screenshot of just that component. This is incredibly useful for documentation, bug reports, or sharing UI elements with designers. | ||
|
||
No more awkward cropping in image editors. | ||
|
||
## 📚 This Week's Picks | ||
|
||
**[How to Cancel Async Code in JavaScript (4 min)](https://www.codu.co/articles/how-to-cancel-async-code-in-javascript-k4ate_e8)** | ||
Canceling asynchronous operations in JavaScript has historically been challenging. Not anymore thanks to AbortController API and its companion, AbortSignal. A short guide I wrote to introduce these topics. | ||
|
||
**[Before you buy a domain name, first check to see if it's haunted (6 min)](https://www.bryanbraun.com/2024/10/25/before-you-buy-a-domain-name-first-check-to-see-if-its-haunted/)** | ||
Since it's Halloween season, you probably buy too many domains if you are anything like me. Here's why you check if it's "haunted." | ||
|
||
**[Creating Links to Locations in Google Maps and Apple Maps (2 min)](https://www.codu.co/articles/creating-links-to-locations-in-google-maps-and-apple-maps-eqj0ozor)** | ||
This guide covers different methods for linking to locations in Google Maps and Apple Maps. | ||
|
||
**[SOLID Principles: Building a Strong Foundation for Your Code (2 min)](https://www.codu.co/articles/solid-principles-building-a-strong-foundation-for-your-code-fliy0v84)** | ||
Maintaining and extending code in software development can become challenging as projects grow. Here are how SOLID principles can help. | ||
|
||
**[Why does JavaScript's fetch make me wait TWICE (video)](https://youtu.be/Ki64Cnyf_cA?si=JotsNJdMySFhV-82)** | ||
Ever wonder why you need to use response.json() after fetching in JavaScript? This video will explain why this isn't just a single operation. | ||
|
||
**[Our Journey with Caching (4 min)](https://nextjs.org/blog/our-journey-with-caching)** | ||
This post dives into caching with Next.js. Written by the Next.js team, it is an essential and short guide to getting it right in your applications. | ||
|
||
## 📖 Book of the Week | ||
|
||
**[Inspired: How to Create Tech Products Customers Love](https://amzn.to/3Ai1D7k)** | ||
|
||
This one might be familiar if you've read my newsletter for a while. But I guess it's that time of year again when I re-read my favorite product book. | ||
|
||
Marty Cagan's insights never get old - from how to validate ideas quickly to structuring teams that consistently ship great products. What I love most is how it challenges the usual "build what customers ask for" mindset. Instead, Cagan shows how to dig deeper and solve problems customers didn't even know they had. If you're involved in product decisions at any level, this book, I'd say, is worth revisiting every year. | ||
|
||
## 🛠️ Something Cool | ||
|
||
**[Schotten Totten 2 | Board Game](https://amzn.to/3C6eQks)** | ||
|
||
Yes, it's not code related. But if you're looking for a perfect lunch break game, this is it. It's a two-player card battle where you're trying to breach your opponent's castle walls. What makes it fun is how it packs strategy into 15-minute rounds - think poker hands mixed with tactical positioning. | ||
|
||
Once you get your head around the rules (which might take a game or two if you are slow like me), you'll be discovering new strategies weeks later. A rare gem that's both accessible and strategically rich. | ||
|
||
## 🔗 Quick Links | ||
|
||
- Codú TikTok: [https://www.tiktok.com/@codu.co](https://newsletter.codu.co/l/OKhlNrmpjTTHP763xCz1UNOw/p8DcaDEDbL8FJC5y1tmH4w/EEOHywhMSrHPNxKbF3Ps892Q) | ||
- Hacktoberfest GitHub Issues: [https://github.com/codu-code/codu/issues](https://newsletter.codu.co/l/OKhlNrmpjTTHP763xCz1UNOw/EWCx6TdpfoYQZxltZdSeZQ/EEOHywhMSrHPNxKbF3Ps892Q) | ||
- Our YouTube channel: [https://www.youtube.com/@codu](https://newsletter.codu.co/l/OKhlNrmpjTTHP763xCz1UNOw/iJvccMa1dTBysEZfCVFzkw/EEOHywhMSrHPNxKbF3Ps892Q) | ||
- Find us on Twitch: [https://www.twitch.tv/codudotco](https://www.twitch.tv/codudotco) | ||
|
||
**If you have any ideas or feedback, reply to this email.** | ||
|
||
Thanks, and stay awesome, | ||
|
||
Niall | ||
|
||
Founder @ [Codú](https://www.codu.co/?ref=newsletter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ import postgres from "postgres"; | |
const DATABASE_URL = process.env.DATABASE_URL || ""; | ||
// These can be removed in a follow on PR. Until this hits main we cant add E2E_USER_* stuff to the env. | ||
const E2E_SESSION_ID = | ||
process.env.E2E_USER_SESSION_ID || "df8a11f2-f20a-43d6-80a0-a213f1efedc1"; | ||
process.env.E2E_USER_ONE_SESSION_ID || "df8a11f2-f20a-43d6-80a0-a213f1efedc1"; | ||
const E2E_USER_ID = | ||
process.env.E2E_USER_ID || "8e3179ce-f32b-4d0a-ba3b-234d66b836ad"; | ||
const E2E_USER_EMAIL = process.env.E2E_USER_EMAIL || "[email protected]"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import test from "@playwright/test"; | ||
import { loggedInAsUserOne } from "./utils"; | ||
|
||
test.describe("Unauthenticated my-posts Page", () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.context().clearCookies(); | ||
}); | ||
// | ||
// Replace with tests for unauthenticated users | ||
}); | ||
|
||
test.describe("Authenticated my-posts Page", () => { | ||
test.beforeEach(async ({ page }) => { | ||
await loggedInAsUserOne(page); | ||
}); | ||
// | ||
// Replace with tests for authenticated users | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import test from "@playwright/test"; | ||
import { loggedInAsUserOne } from "./utils"; | ||
|
||
test.describe("Unauthenticated setttings Page", () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.context().clearCookies(); | ||
}); | ||
// | ||
// Replace with tests for unauthenticated users | ||
}); | ||
|
||
test.describe("Authenticated settings Page", () => { | ||
test.beforeEach(async ({ page }) => { | ||
await loggedInAsUserOne(page); | ||
}); | ||
// | ||
// Replace with tests for authenticated users | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./utils"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { expect, Page } from "@playwright/test"; | ||
|
||
export const loggedInAsUserOne = async (page: Page) => { | ||
try { | ||
expect(process.env.E2E_USER_ONE_SESSION_ID).toBeDefined(); | ||
|
||
await page.context().addCookies([ | ||
{ | ||
name: "next-auth.session-token", | ||
value: process.env.E2E_USER_ONE_SESSION_ID as string, | ||
domain: "localhost", | ||
path: "/", | ||
sameSite: "Lax", | ||
}, | ||
]); | ||
|
||
expect( | ||
(await page.context().cookies()).find( | ||
(cookie) => cookie.name === "next-auth.session-token", | ||
), | ||
).toBeTruthy(); | ||
} catch (err) { | ||
throw Error("Error while authenticating E2E test user one"); | ||
} | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.