-
-
Notifications
You must be signed in to change notification settings - Fork 276
chore(deps): upgrade to Reveal 6 #435
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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
15 changes: 15 additions & 0 deletions
15
quarkdown-html/src/test/e2e/slides/speaker-notes/speaker-view/main.qd
This file contains hidden or 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,15 @@ | ||
| # Slide 1 | ||
|
|
||
| .speakernote | ||
| hello | ||
|
|
||
| # Slide 2 | ||
|
|
||
| .speakernote | ||
| **Formatted** speaker note | ||
|
|
||
| - Bullet 1 | ||
| - Bullet 2 | ||
| - Bullet 3 | ||
|
|
||
| # Slide 3 |
25 changes: 25 additions & 0 deletions
25
quarkdown-html/src/test/e2e/slides/speaker-notes/speaker-view/speaker-view.spec.ts
This file contains hidden or 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 {suite} from "../../../quarkdown"; | ||
|
|
||
| const {testMatrix, expect} = suite(__dirname); | ||
|
|
||
| testMatrix( | ||
| "speaker notes are accessible in the speaker view", | ||
| ["slides"], | ||
| async (page) => { | ||
| // Inline .speaker-notes should be empty when showNotes is not enabled | ||
| const speakerNotes = page.locator(".speaker-notes"); | ||
| await expect(speakerNotes).toBeEmpty(); | ||
|
|
||
| // Open speaker view by pressing S | ||
| const popupPromise = page.context().waitForEvent("page"); | ||
| await page.keyboard.press("s"); | ||
| const speakerPage = await popupPromise; | ||
| await speakerPage.waitForLoadState("domcontentloaded"); | ||
|
|
||
| const notesContainer = speakerPage.locator(".speaker-controls-notes"); | ||
| await expect(notesContainer).toBeVisible({timeout: 10000}); | ||
|
|
||
| // The speaker view shows the current slide's notes | ||
| await expect(notesContainer).toContainText("hello"); | ||
| } | ||
| ); |
17 changes: 17 additions & 0 deletions
17
quarkdown-html/src/test/e2e/slides/speaker-notes/visible-notes/main.qd
This file contains hidden or 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,17 @@ | ||
| .slides speakernotes:{yes} | ||
|
|
||
| # Slide 1 | ||
|
|
||
| .speakernote | ||
| hello | ||
|
|
||
| # Slide 2 | ||
|
|
||
| .speakernote | ||
| **Formatted** speaker note | ||
|
|
||
| - Bullet 1 | ||
| - Bullet 2 | ||
| - Bullet 3 | ||
|
|
||
| # Slide 3 |
42 changes: 42 additions & 0 deletions
42
quarkdown-html/src/test/e2e/slides/speaker-notes/visible-notes/visible-notes.spec.ts
This file contains hidden or 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,42 @@ | ||
| import {Locator} from "@playwright/test"; | ||
| import {suite} from "../../../quarkdown"; | ||
|
|
||
| const {testMatrix, expect} = suite(__dirname); | ||
|
|
||
| async function assertNoteContent(note: Locator) { | ||
| await expect(note).toContainText("Formatted"); | ||
| const bullets = note.locator("li"); | ||
| await expect(bullets).toHaveCount(3); | ||
| await expect(bullets.nth(0)).toHaveText("Bullet 1"); | ||
| await expect(bullets.nth(1)).toHaveText("Bullet 2"); | ||
| await expect(bullets.nth(2)).toHaveText("Bullet 3"); | ||
| } | ||
|
|
||
| testMatrix( | ||
| "speaker notes are visible on each slide", | ||
| ["slides", "slides-print"], | ||
| async (page, docType) => { | ||
| const notes = page.locator(".speaker-notes"); | ||
|
|
||
| if (docType === "slides-print") { | ||
| // In print mode, each slide has its own .speaker-notes element | ||
| await expect(notes).toHaveCount(3); | ||
|
|
||
| await expect(notes.nth(0)).toContainText("hello"); | ||
| await assertNoteContent(notes.nth(1)); | ||
|
|
||
| // Slide 3 has no speaker note | ||
| await expect(notes.nth(2)).toBeEmpty(); | ||
| } else { | ||
| // In regular slides mode, .speaker-notes shows the current slide's note | ||
| await expect(notes).toContainText("hello"); | ||
|
|
||
| await page.keyboard.press("ArrowRight"); | ||
| await assertNoteContent(notes); | ||
|
|
||
| // Slide 3 has no speaker note | ||
| await page.keyboard.press("ArrowRight"); | ||
| await expect(notes).toContainText("No notes on this slide."); | ||
| } | ||
| } | ||
| ); |
19 changes: 19 additions & 0 deletions
19
quarkdown-html/src/test/e2e/slides/transition/custom/custom.spec.ts
This file contains hidden or 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,19 @@ | ||
| import {suite} from "../../../quarkdown"; | ||
| import {getTransitionConfig} from "../transition-config"; | ||
|
|
||
| const {testMatrix, expect} = suite(__dirname); | ||
|
|
||
| testMatrix( | ||
| "applies custom transition configuration", | ||
| ["slides"], | ||
| async (page) => { | ||
| const config = await getTransitionConfig(page); | ||
| expect(config.transition).toBe("fade"); | ||
| expect(config.transitionSpeed).toBe("fast"); | ||
|
|
||
| // Navigate and verify the slide changes with custom transition | ||
| await expect(page.locator(".reveal .slides > section.present h1")).toHaveText("Slide 1"); | ||
| await page.keyboard.press("ArrowRight"); | ||
| await expect(page.locator(".reveal .slides > section.present h1")).toHaveText("Slide 2"); | ||
| } | ||
| ); |
This file contains hidden or 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,9 @@ | ||
| .slides transition:{fade} speed:{fast} | ||
|
|
||
| # Slide 1 | ||
|
|
||
| Hello | ||
|
|
||
| # Slide 2 | ||
|
|
||
| World |
19 changes: 19 additions & 0 deletions
19
quarkdown-html/src/test/e2e/slides/transition/default/default.spec.ts
This file contains hidden or 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,19 @@ | ||
| import {suite} from "../../../quarkdown"; | ||
| import {getTransitionConfig} from "../transition-config"; | ||
|
|
||
| const {testMatrix, expect} = suite(__dirname); | ||
|
|
||
| testMatrix( | ||
| "uses default slide transition", | ||
| ["slides"], | ||
| async (page) => { | ||
| const config = await getTransitionConfig(page); | ||
| expect(config.transition).toBe("slide"); | ||
| expect(config.transitionSpeed).toBe("default"); | ||
|
|
||
| // Navigate and verify the slide changes | ||
| await expect(page.locator(".reveal .slides > section.present h1")).toHaveText("Slide 1"); | ||
| await page.keyboard.press("ArrowRight"); | ||
| await expect(page.locator(".reveal .slides > section.present h1")).toHaveText("Slide 2"); | ||
| } | ||
| ); |
7 changes: 7 additions & 0 deletions
7
quarkdown-html/src/test/e2e/slides/transition/default/main.qd
This file contains hidden or 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,7 @@ | ||
| # Slide 1 | ||
|
|
||
| Hello | ||
|
|
||
| # Slide 2 | ||
|
|
||
| World |
11 changes: 11 additions & 0 deletions
11
quarkdown-html/src/test/e2e/slides/transition/transition-config.ts
This file contains hidden or 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,11 @@ | ||
| import {Page} from "@playwright/test"; | ||
|
|
||
| /** | ||
| * Retrieves the Reveal.js transition configuration from the page. | ||
| */ | ||
| export async function getTransitionConfig(page: Page) { | ||
| return page.evaluate(() => { | ||
| const config = (window as any).Reveal.getConfig(); | ||
| return {transition: config.transition as string, transitionSpeed: config.transitionSpeed as string}; | ||
| }); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.