mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
39 lines
968 B
TypeScript
39 lines
968 B
TypeScript
import { selectors } from '../selectors'
|
|
import { testURL } from '../testURL'
|
|
import {
|
|
collapseFloatModeSidebar,
|
|
expandFloatModeSidebar,
|
|
getTextContent,
|
|
patientClick,
|
|
sleep,
|
|
waitForRedirect,
|
|
} from '../utils'
|
|
|
|
jest.retryTimes(3)
|
|
|
|
describe(`in Gitako project page`, () => {
|
|
beforeAll(() => page.goto(testURL`https://github.com/EnixCoda/Gitako/tree/develop/src`))
|
|
|
|
it('should work with PJAX', async () => {
|
|
await sleep(3000)
|
|
|
|
await expandFloatModeSidebar()
|
|
await patientClick(selectors.gitako.fileItemOf('src/analytics.ts'))
|
|
await waitForRedirect()
|
|
await collapseFloatModeSidebar()
|
|
|
|
await page.click(selectors.github.navBarItemIssues)
|
|
await waitForRedirect()
|
|
|
|
await page.click(selectors.github.navBarItemPulls)
|
|
await waitForRedirect()
|
|
|
|
page.goBack()
|
|
await sleep(1000)
|
|
|
|
page.goBack()
|
|
await sleep(1000)
|
|
|
|
expect(await getTextContent(selectors.github.breadcrumbFileName)).toBe('/analytics.ts')
|
|
})
|
|
})
|