Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add Drakula app to Trusted By section #742

Merged
merged 4 commits into from
Dec 19, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
fix: try to enable wait for hydration
  • Loading branch information
kirillzyusko committed Dec 19, 2024
commit 45319d33a8aafac9a99007a824ce9d1f1d00d8ae
6 changes: 5 additions & 1 deletion docs/__tests__/screenshot.spec.ts
Original file line number Diff line number Diff line change
@@ -11,6 +11,10 @@ const sitemapPath = "./build/sitemap.xml";
const stylesheetPath = "./__tests__/screenshot.css";
const stylesheet = fs.readFileSync(stylesheetPath).toString();

function waitForDocusaurusHydration() {
return document.documentElement.dataset.hasHydrated === "true";
}

function screenshotPathname(pathname: string) {
test(`pathname ${pathname}`, async ({ page }) => {
const url = siteUrl + pathname;
@@ -19,7 +23,7 @@ function screenshotPathname(pathname: string) {
// Wait for hydration, requires Docusaurus v2.4.3+
// Docusaurus adds a <html data-has-hydrated="true"> once hydrated
// See https://github.com/facebook/docusaurus/pull/9256
// await page.waitForFunction(waitForDocusaurusHydration);
await page.waitForFunction(waitForDocusaurusHydration);
await page.addStyleTag({ content: stylesheet });
await argosScreenshot(page, pathnameToArgosName(pathname));
});
Loading
Oops, something went wrong.