Download next.js/test/e2e/children-page/index.test.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.12 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/children-page/index.test.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/children-page/index.test.ts
-
curl -L -o index.test.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/children-page/index.test.ts
1.12 kB
| import { nextTestSetup } from 'e2e-utils' | |
| describe('children-page', () => { | |
| const { next } = nextTestSetup({ | |
| files: __dirname, | |
| }) | |
| describe('with app dir', () => { | |
| it('should show the content if you have a page named children', async () => { | |
| const browser = await next.browser('/children') | |
| const text = await browser.waitForElementByCss('#children-page').text() | |
| expect(text).toBe('children - app') | |
| const currentDisplay = await browser.eval( | |
| `window.getComputedStyle(document.querySelector('body')).display` | |
| ) | |
| expect(currentDisplay).toBe('block') | |
| }) | |
| }) | |
| describe('with pages dir', () => { | |
| it('should show the content if you have a page named children', async () => { | |
| const browser = await next.browser('/other/children') | |
| const text = await browser.waitForElementByCss('#children-page').text() | |
| expect(text).toBe('children - pages') | |
| const currentDisplay = await browser.eval( | |
| `window.getComputedStyle(document.querySelector('body')).display` | |
| ) | |
| expect(currentDisplay).toBe('block') | |
| }) | |
| }) | |
| }) | |