mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
test: expand sidebar
This commit is contained in:
parent
3439808d63
commit
77a0e866dd
1 changed files with 25 additions and 0 deletions
25
__tests__/cases/expand-to-target.ts
Normal file
25
__tests__/cases/expand-to-target.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import {
|
||||
expectToFind,
|
||||
selectFileTreeItem,
|
||||
sleep,
|
||||
waitForLegacyPJAXRedirect
|
||||
} from '../utils'
|
||||
|
||||
describe(`in Gitako project page`, () => {
|
||||
beforeAll(() => page.goto('https://github.com/EnixCoda/Gitako/tree/develop/src'))
|
||||
|
||||
it('expand to target on load and after PJAX', async () => {
|
||||
await sleep(3000)
|
||||
|
||||
// Expect Gitako sidebar to have expanded src to see contents
|
||||
await expectToFind(selectFileTreeItem('src/components'))
|
||||
|
||||
await page.click(
|
||||
`.js-details-container div[role="row"] div[role="rowheader"] [title="components"]`,
|
||||
)
|
||||
await waitForLegacyPJAXRedirect()
|
||||
|
||||
// Expect Gitako sidebar to have expanded components and see contents
|
||||
await expectToFind(selectFileTreeItem('src/components/Gitako.tsx'))
|
||||
})
|
||||
})
|
||||
Loading…
Reference in a new issue