Skip to content

Commit 68079c2

Browse files
committed
homepage: update download link tests
The name of the install link changed and many of the links were removed. Update the tests to reflect that.
1 parent 6512c40 commit 68079c2

File tree

1 file changed

+6
-31
lines changed

1 file changed

+6
-31
lines changed

tests/git-scm.spec.js

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -48,57 +48,32 @@ test.describe('Windows', () => {
4848
const userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36'
4949
test.use({ userAgent })
5050

51-
test('download/GUI links', async ({ page, browserName }) => {
51+
test('install link', async ({ page, browserName }) => {
5252
await pretendPlatform(page, browserName, userAgent, 'Windows')
5353
await page.goto(url)
54-
await expect(page.getByRole('link', { name: 'Download for Windows' })).toBeVisible()
55-
56-
await expect(page.getByRole('link', { name: 'Graphical UIs' })).toBeHidden()
57-
const windowsGUIs = page.getByRole('link', { name: 'Windows GUIs' })
58-
await expect(windowsGUIs).toBeVisible()
59-
await expect(windowsGUIs).toHaveAttribute('href', /\/downloads\/guis\?os=windows$/)
60-
61-
// navigate to Windows GUIs
62-
await windowsGUIs.click()
63-
const windowsButton = page.getByRole('link', { name: 'Windows' })
64-
await expect(windowsButton).toBeVisible()
65-
await expect(windowsButton).toHaveClass(/selected/)
66-
67-
const allButton = page.getByRole('link', { name: 'All', exact: true })
68-
await expect(allButton).not.toHaveClass(/selected/)
69-
70-
const thumbnails = page.locator('.gui-thumbnails li:visible')
71-
const count = await thumbnails.count()
72-
await allButton.click()
73-
await expect.poll(() => thumbnails.count()).toBeGreaterThan(count)
54+
await expect(page.getByRole('link', { name: 'Install for Windows' })).toBeVisible()
7455
})
7556
})
7657

7758
test.describe('macOS', () => {
7859
const userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 14_6_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Safari/605.1.15'
7960
test.use({ userAgent })
8061

81-
test('download/GUI links', async ({ page, browserName }) => {
62+
test('install link', async ({ page, browserName }) => {
8263
await pretendPlatform(page, browserName, userAgent, 'Mac OS X')
8364
await page.goto(url)
84-
await expect(page.getByRole('link', { name: 'Download for Mac' })).toBeVisible()
85-
86-
await expect(page.getByRole('link', { name: 'Graphical UIs' })).toBeHidden()
87-
await expect(page.getByRole('link', { name: 'Mac GUIs' })).toBeVisible()
65+
await expect(page.getByRole('link', { name: 'Install for Mac' })).toBeVisible()
8866
})
8967
})
9068

9169
test.describe('Linux', () => {
9270
const userAgent = 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0'
9371
test.use({ userAgent })
9472

95-
test('download/GUI links', async ({ page, browserName }) => {
73+
test('install link', async ({ page, browserName }) => {
9674
await pretendPlatform(page, browserName, userAgent, 'Linux')
9775
await page.goto(url)
98-
await expect(page.getByRole('link', { name: 'Download for Linux' })).toBeVisible()
99-
100-
await expect(page.getByRole('link', { name: 'Graphical UIs' })).toBeHidden()
101-
await expect(page.getByRole('link', { name: 'Linux GUIs' })).toBeVisible()
76+
await expect(page.getByRole('link', { name: 'Install for Linux' })).toBeVisible()
10277
})
10378
})
10479

0 commit comments

Comments
 (0)