* Scaffold files for migration * Move user-agent into unit suite * Nothing to move from browser suite * Migrate tests to translations/content * Migrate existing translation test to meta * No graphql tests to migrate * Migrate lint-translation-reporter * Migrate lint-translation-reporter * Remove languages-schema, unused * Restore languages-schema * Restore languages-schema * Migrate rendering * Migrate routing * Migrate most of unit * Remove dead files, comment out tests that aren't expected to work yet * Migrate from get-redirect * Migrate page and pages * Migrate linting code * Fix lint issues * Found a few more * Run prettier * Move crowdin-config test and helper * Update crowdin-config.js * Remove translation linting, crowdin config lint, reduce file count * Remove test that's been skipped for a year * Restore linting with note to remove later * Update lint-translation-reporter.js * Clean up rendering suite * Update rendering.js * Remove excessive describe blocks * Redirect tests * Clean up unit * Remove test that's never called * Don't compare early access * Rename test suites * Update "content" tests * Update files.js * Update search.js * Update files.js * Update files.js
32 lines
1.3 KiB
JavaScript
32 lines
1.3 KiB
JavaScript
import { expect, jest } from '@jest/globals'
|
|
|
|
import { getDOM } from '../helpers/e2etest.js'
|
|
import { oldestSupported } from '../../lib/enterprise-server-releases.js'
|
|
|
|
describe('header', () => {
|
|
jest.setTimeout(5 * 60 * 1000)
|
|
|
|
describe('mobile-only product dropdown links', () => {
|
|
test('include Get started and admin, and emphasize the current product', async () => {
|
|
const $ = await getDOM(
|
|
'/en/get-started/importing-your-projects-to-github/importing-source-code-to-github/about-github-importer'
|
|
)
|
|
const getStarted = $('div ul ul li a[href="/en/get-started"]')
|
|
expect(getStarted.length).toBe(1)
|
|
expect(getStarted.text().trim()).toBe('Get started')
|
|
|
|
const ghec = $(`[data-testid=product-picker] a[href="/en/enterprise-cloud@latest/admin"]`)
|
|
expect(ghec.length).toBe(1)
|
|
expect(ghec.text().trim()).toBe('Enterprise administrators')
|
|
})
|
|
|
|
test('emphasizes the product that corresponds to the current page', async () => {
|
|
const $ = await getDOM(
|
|
`/en/enterprise-server@${oldestSupported}/get-started/importing-your-projects-to-github/importing-source-code-to-github/importing-a-git-repository-using-the-command-line`
|
|
)
|
|
|
|
expect($('[data-testid=product-picker] summary').text()).toBe('Get started')
|
|
})
|
|
})
|
|
})
|