Skip to content

Commit

Permalink
WIP: remove tests from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bitterteasweetorange committed Nov 2, 2023
1 parent c3325bf commit 07712a6
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: pnpm install

- name: Test
run: pnpm test-ct && pnpm test
run: pnpm test-ct

- name: Build
run: pnpm build
Expand Down
96 changes: 48 additions & 48 deletions tests/CascaderInput.spec.ts
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
import { expect, test } from '@playwright/test'

const path = '/iframe.html?id=cascaderinput--defalut&viewMode=story'
test('default value', async ({ page }) => {
await page.goto(path)

const input = page.locator('input')
await expect(input).toHaveValue('children-1')
})

test('use value as placeholder when focused', async ({ page }) => {
await page.goto(path)

const input = page.locator('input')
await input.focus()

await expect(input).toHaveValue('')
await expect(input).toHaveAttribute('placeholder', 'children-1')

page.click('body')
await expect(input).toHaveValue('children-1')
})

test('select leaf', async ({ page }) => {
await page.goto(path)

const input = page.locator('input')

await input.click()

const item = page.locator('//span[text()="parent-1"]')
await item.click()

await expect(input).toHaveValue('parent-1')
})

test('render node', async ({ page }) => {
await page.goto(path)

const input = page.locator('input')

await input.click()

const li = page.locator('.MuiChip-label')

await expect(li.first()).toHaveText('100')
await expect(li.nth(1)).toHaveText('10')
})
// import { expect, test } from '@playwright/test'
//
// const path = '/iframe.html?id=cascaderinput--defalut&viewMode=story'
// test('default value', async ({ page }) => {
// await page.goto(path)
//
// const input = page.locator('input')
// await expect(input).toHaveValue('children-1')
// })
//
// test('use value as placeholder when focused', async ({ page }) => {
// await page.goto(path)
//
// const input = page.locator('input')
// await input.focus()
//
// await expect(input).toHaveValue('')
// await expect(input).toHaveAttribute('placeholder', 'children-1')
//
// page.click('body')
// await expect(input).toHaveValue('children-1')
// })
//
// test('select leaf', async ({ page }) => {
// await page.goto(path)
//
// const input = page.locator('input')
//
// await input.click()
//
// const item = page.locator('//span[text()="parent-1"]')
// await item.click()
//
// await expect(input).toHaveValue('parent-1')
// })
//
// test('render node', async ({ page }) => {
// await page.goto(path)
//
// const input = page.locator('input')
//
// await input.click()
//
// const li = page.locator('.MuiChip-label')
//
// await expect(li.first()).toHaveText('100')
// await expect(li.nth(1)).toHaveText('10')
// })

0 comments on commit 07712a6

Please sign in to comment.