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

playwright(book): let the tests pass on small screens #1892

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Changes from all commits
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
6 changes: 6 additions & 0 deletions tests/git-scm.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ test('book', async ({ page }) => {
await expect(chaptersDropdown.locator('.active')).toHaveCount(1)

// Navigate to the French translation
if (await page.evaluate(() => matchMedia('(max-width: 940px)').matches)) {
// On small screens, the links to the translated versions of the ProGit book
// are hidden by default, and have to be "un-hidden" by clicking on the
// sidebar button first.
await page.locator('.sidebar-btn').click();
}
await page.getByRole('link', { name: 'Français' }).click()
await expect(page).toHaveURL(/book\/fr/)
await expect(page.getByRole('link', { name: 'Démarrage rapide' })).toBeVisible()
Expand Down
Loading