Skip to content

Commit 61a777f

Browse files
committed
Update rendering tests to use different products
1 parent c44ce87 commit 61a777f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tests/rendering/footer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe('footer', () => {
88

99
describe('"contact us" link', () => {
1010
test('leads to support from articles', async () => {
11-
const $ = await getDOM(`/en/${nonEnterpriseDefaultVersion}/github`)
11+
const $ = await getDOM(`/en/${nonEnterpriseDefaultVersion}/issues`)
1212
expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact')
1313
})
1414

@@ -20,7 +20,7 @@ describe('footer', () => {
2020

2121
describe('"contact us" link with nextjs', () => {
2222
test('leads to support from articles', async () => {
23-
const $ = await getDOM(`/en/${nonEnterpriseDefaultVersion}/github?nextjs=`)
23+
const $ = await getDOM(`/en/${nonEnterpriseDefaultVersion}/issues?nextjs=`)
2424
expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact')
2525
})
2626
})

tests/rendering/products.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import nonEnterpriseDefaultVersion from '../../lib/non-enterprise-default-versio
66
describe('mobile-only products nav', () => {
77
const cases = [
88
// Note the unversioned homepage at `/` does not have a product selected in the mobile dropdown
9-
['/github', 'GitHub'],
9+
['/repositories', 'Repositories'],
1010
// Enterprise server
1111
['/en/enterprise/admin', 'Enterprise administrators'],
1212
[
@@ -41,8 +41,8 @@ describe('products middleware', () => {
4141

4242
test('adds res.context.currentProduct object', async () => {
4343
const currentProduct = await getJSON(
44-
`/en/${nonEnterpriseDefaultVersion}/github?json=currentProduct`
44+
`/en/${nonEnterpriseDefaultVersion}/actions?json=currentProduct`
4545
)
46-
expect(currentProduct).toBe('github')
46+
expect(currentProduct).toBe('actions')
4747
})
4848
})

tests/rendering/sidebar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('sidebar', () => {
3434
expect($githubPage('[data-testid=sidebar] [data-testid=sidebar-product]').length).toBe(1)
3535
expect(
3636
$githubPage('[data-testid=sidebar] [data-testid=sidebar-product] > a').text().trim()
37-
).toBe('GitHub')
37+
).toBe('Get started')
3838
})
3939

4040
test('includes links to external products like the Atom, Electron, and CodeQL', async () => {

0 commit comments

Comments
 (0)