mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-17 13:54:11 +00:00
Add ui tests for sub-issue creation (#2053)
This commit is contained in:
parent
546eac5dee
commit
059bc3fdf8
plugins/tracker-resources/src/components/issues/edit
tests/sanity/tests
@ -98,16 +98,17 @@
|
|||||||
|
|
||||||
<div bind:this={thisRef} class="flex-col root">
|
<div bind:this={thisRef} class="flex-col root">
|
||||||
<div class="flex-row-top">
|
<div class="flex-row-top">
|
||||||
<StatusEditor
|
<div id="status-editor">
|
||||||
value={newIssue}
|
<StatusEditor
|
||||||
statuses={issueStatuses}
|
value={newIssue}
|
||||||
kind="transparent"
|
statuses={issueStatuses}
|
||||||
width="min-content"
|
kind="transparent"
|
||||||
size="medium"
|
width="min-content"
|
||||||
tooltipFill={false}
|
size="medium"
|
||||||
tooltipAlignment="bottom"
|
tooltipAlignment="bottom"
|
||||||
on:change={({ detail }) => (newIssue.status = detail)}
|
on:change={({ detail }) => (newIssue.status = detail)}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
<div class="w-full flex-col content">
|
<div class="w-full flex-col content">
|
||||||
<EditBox
|
<EditBox
|
||||||
bind:value={newIssue.title}
|
bind:value={newIssue.title}
|
||||||
|
@ -95,13 +95,7 @@
|
|||||||
<span class="flex-no-shrink text" on:click={() => openIssue(issue)}>
|
<span class="flex-no-shrink text" on:click={() => openIssue(issue)}>
|
||||||
{getIssueId(currentTeam, issue)}
|
{getIssueId(currentTeam, issue)}
|
||||||
</span>
|
</span>
|
||||||
<StatusEditor
|
<StatusEditor value={issue} statuses={issueStatuses} kind="transparent" tooltipAlignment="bottom" />
|
||||||
value={issue}
|
|
||||||
statuses={issueStatuses}
|
|
||||||
kind="transparent"
|
|
||||||
tooltipFill={false}
|
|
||||||
tooltipAlignment="bottom"
|
|
||||||
/>
|
|
||||||
<span class="text name" title={issue.title} on:click={() => openIssue(issue)}>
|
<span class="text name" title={issue.title} on:click={() => openIssue(issue)}>
|
||||||
{issue.title}
|
{issue.title}
|
||||||
</span>
|
</span>
|
||||||
|
@ -71,6 +71,7 @@
|
|||||||
|
|
||||||
<Tooltip label={tracker.string.AddSubIssues} props={{ subIssues: 1 }} direction="bottom">
|
<Tooltip label={tracker.string.AddSubIssues} props={{ subIssues: 1 }} direction="bottom">
|
||||||
<Button
|
<Button
|
||||||
|
id="add-sub-issue"
|
||||||
width="min-content"
|
width="min-content"
|
||||||
icon={hasSubIssues ? IconAdd : undefined}
|
icon={hasSubIssues ? IconAdd : undefined}
|
||||||
label={hasSubIssues ? undefined : tracker.string.AddSubIssues}
|
label={hasSubIssues ? undefined : tracker.string.AddSubIssues}
|
||||||
|
@ -3,34 +3,30 @@ import { PlatformSetting, PlatformURI } from './utils'
|
|||||||
test.use({
|
test.use({
|
||||||
storageState: PlatformSetting
|
storageState: PlatformSetting
|
||||||
})
|
})
|
||||||
test('create-issue', async ({ page }) => {
|
test('create-issue-and-sub-issue', async ({ page }) => {
|
||||||
await page.goto(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp`)
|
await page.goto(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp`)
|
||||||
// Click [id="app-tracker\:string\:TrackerApplication"]
|
|
||||||
await page.click('[id="app-tracker\\:string\\:TrackerApplication"]')
|
await page.click('[id="app-tracker\\:string\\:TrackerApplication"]')
|
||||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/tracker%3Aapp%3ATracker`)
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/tracker%3Aapp%3ATracker`)
|
||||||
// Click button:has-text("New issue")
|
|
||||||
await page.click('button:has-text("New issue")')
|
await page.click('button:has-text("New issue")')
|
||||||
// Click [placeholder="Issue\ title"]
|
|
||||||
await page.click('[placeholder="Issue\\ title"]')
|
await page.click('[placeholder="Issue\\ title"]')
|
||||||
// Fill [placeholder="Issue\ title"]
|
|
||||||
await page.fill('[placeholder="Issue\\ title"]', 'test-issue')
|
await page.fill('[placeholder="Issue\\ title"]', 'test-issue')
|
||||||
// Click p
|
|
||||||
await page.fill('.ProseMirror', 'some description')
|
await page.fill('.ProseMirror', 'some description')
|
||||||
// Click button:has-text("Backlog")
|
|
||||||
await page.click('button:has-text("Backlog")')
|
await page.click('button:has-text("Backlog")')
|
||||||
// Click button:has-text("Todo")
|
|
||||||
await page.click('button:has-text("Todo")')
|
await page.click('button:has-text("Todo")')
|
||||||
// Click button:has-text("No priority")
|
|
||||||
await page.click('button:has-text("No priority")')
|
await page.click('button:has-text("No priority")')
|
||||||
// Click button:has-text("Urgent")
|
|
||||||
await page.click('button:has-text("Urgent")')
|
await page.click('button:has-text("Urgent")')
|
||||||
// Click button:has-text("Save issue")
|
|
||||||
await page.click('button:has-text("Save issue")')
|
await page.click('button:has-text("Save issue")')
|
||||||
// Click text=Issues Active Backlog Board Projects >> span
|
|
||||||
await page.click('text=Issues Active Backlog Board Projects >> span')
|
await page.click('.antiNav-element__dropbox :text("Issues")')
|
||||||
await expect(page).toHaveURL(
|
await page.click('.listGrid :has-text("test-issue") span')
|
||||||
`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/tracker%3Aapp%3ATracker/tracker%3Ateam%3ADefaultTeam/issues`
|
await page.click('#add-sub-issue')
|
||||||
)
|
await page.click('[placeholder="Issue\\ title"]')
|
||||||
// Click text=TSK-1
|
await page.fill('[placeholder="Issue\\ title"]', 'sub-issue')
|
||||||
await page.click('text=TSK-1')
|
await page.fill('.ProseMirror', 'sub-issue description')
|
||||||
|
await page.click('#status-editor')
|
||||||
|
await page.click('button:has-text("In Progress")')
|
||||||
|
await page.click('button:has-text("Assignee")')
|
||||||
|
await page.click('.selectPopup button:has-text("John Appleseed")')
|
||||||
|
await page.click('button:has-text("Save")')
|
||||||
|
await page.click('span.name:text("sub-issue")')
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user