mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-16 05:13:06 +00:00
Fixing few issues. (#2220)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
6015e001b6
commit
bbe6c12474
@ -84,7 +84,7 @@
|
||||
}
|
||||
okProcessing = true
|
||||
const r = okAction()
|
||||
if (r instanceof Promise && createMore) {
|
||||
if (r instanceof Promise) {
|
||||
r.then(() => {
|
||||
okProcessing = false
|
||||
dispatch('close')
|
||||
|
@ -283,7 +283,9 @@
|
||||
{#if issueId}{issueId}{/if}
|
||||
</span>
|
||||
<svelte:fragment slot="actions">
|
||||
<CopyToClipboard issueUrl={generateIssueShortLink(issueId)} {issueId} />
|
||||
{#if issueId}
|
||||
<CopyToClipboard issueUrl={generateIssueShortLink(issueId)} {issueId} />
|
||||
{/if}
|
||||
</svelte:fragment>
|
||||
|
||||
<svelte:fragment slot="custom-attributes">
|
||||
|
@ -48,7 +48,7 @@ export async function copyToClipboard (object: Issue, ev: Event, { type }: { typ
|
||||
|
||||
export function generateIssueShortLink (issueId: string): string {
|
||||
const location = getCurrentLocation()
|
||||
return `${window.location.host}/${workbenchId}/${location.path[1]}/${trackerId}/${issueId}`
|
||||
return `${window.location.protocol}//${window.location.host}/${workbenchId}/${location.path[1]}/${trackerId}/${issueId}`
|
||||
}
|
||||
|
||||
export async function generateIssueLocation (loc: Location, issueId: string): Promise<Location | undefined> {
|
||||
|
@ -10,7 +10,7 @@ test.describe('duplicate-org-test', () => {
|
||||
// Create user and workspace
|
||||
await page.goto(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/sanity-ws`)
|
||||
})
|
||||
test('test', async ({ page }) => {
|
||||
test('check-contact-exists', async ({ page }) => {
|
||||
await page.click('[id="app-lead\\:string\\:LeadApplication"]')
|
||||
|
||||
// Click text=Customers
|
||||
@ -35,6 +35,8 @@ test.describe('duplicate-org-test', () => {
|
||||
// Click button:has-text("Create")
|
||||
await page.click('button:has-text("Create")')
|
||||
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
|
||||
// Click button:has-text("New Customer")
|
||||
await page.click('button:has-text("New Customer")')
|
||||
|
||||
|
@ -30,6 +30,7 @@ test.describe('contact tests', () => {
|
||||
await lastName.fill(last)
|
||||
|
||||
await page.locator('.antiCard').locator('button:has-text("Create")').click()
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
})
|
||||
test('create-organization', async ({ page }) => {
|
||||
await page.locator('[id="app-contact\\:string\\:Contacts"]').click()
|
||||
@ -45,7 +46,7 @@ test.describe('contact tests', () => {
|
||||
await firstName.fill(orgName)
|
||||
|
||||
await page.locator('.antiCard').locator('button:has-text("Create")').click()
|
||||
await page.isHidden('button:has-text("Create")')
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
await expect(page.locator(`text=${orgName}`)).toBeVisible()
|
||||
})
|
||||
test('contact-search', async ({ page }) => {
|
||||
@ -86,7 +87,8 @@ test.describe('contact tests', () => {
|
||||
await lastName.click()
|
||||
await lastName.fill(last)
|
||||
|
||||
await page.locator('.antiCard').locator('button:has-text("Create")').click()
|
||||
await page.locator('.antiCard button:has-text("Create")').click()
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
|
||||
// Click #context-menu svg
|
||||
await page.hover(`td:has-text("${first} ${last}")`)
|
||||
|
@ -19,6 +19,7 @@ test.describe('recruit tests', () => {
|
||||
const orgId = 'Organiation-' + generateId()
|
||||
await page.fill('[placeholder="Apple"]', orgId)
|
||||
await page.click('button:has-text("Create")')
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
await page.click(`text=${orgId}`)
|
||||
|
||||
await page.click('[id="contact:string:AddMember"]')
|
||||
|
@ -29,6 +29,7 @@ test.describe('recruit review tests', () => {
|
||||
await page.click('button:has-text("Rosamund Chen")')
|
||||
|
||||
await page.click('button:has-text("Create")')
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
|
||||
await page.click(`tr:has-text('${reviewId}') td a`)
|
||||
await page.click('button:has-text("2 members")')
|
||||
|
@ -44,7 +44,8 @@ test.describe('recruit tests', () => {
|
||||
await emailInput.fill(email)
|
||||
await emailInput.press('Enter')
|
||||
|
||||
await page.locator('.antiCard').locator('button:has-text("Create")').click()
|
||||
await page.locator('.antiCard button:has-text("Create")').click()
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
|
||||
await page.click(`text="${first} ${last}"`)
|
||||
|
||||
@ -86,6 +87,7 @@ test.describe('recruit tests', () => {
|
||||
await page.click(`button:has-text("${vacancyId}")`)
|
||||
|
||||
await page.click('button:has-text("Create")')
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
|
||||
await page.click(`tr:has-text("${vacancyId}") >> text=APP-`)
|
||||
await page.click('button:has-text("Assigned recruiter")')
|
||||
@ -102,6 +104,8 @@ test.describe('recruit tests', () => {
|
||||
await page.click('button:has-text("Vacancy")')
|
||||
await page.fill('form [placeholder="Software\\ Engineer"]', vacancyId)
|
||||
await page.click('form button:has-text("Create")')
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
|
||||
await page.click(`tr > :has-text("${vacancyId}")`)
|
||||
|
||||
// Create Applicatio n1
|
||||
@ -109,6 +113,7 @@ test.describe('recruit tests', () => {
|
||||
await page.click('form[id="recruit:string:CreateApplication"] button:has-text("Talent")')
|
||||
await page.click('button:has-text("Alex P.")')
|
||||
await page.click('form[id="recruit:string:CreateApplication"] button:has-text("Create")')
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
|
||||
await expect(page.locator('text=APP-').first()).toBeVisible()
|
||||
await expect(page.locator('text=Alex P.').first()).toBeVisible()
|
||||
@ -170,6 +175,7 @@ test.describe('recruit tests', () => {
|
||||
await page.click('form button:has-text("Talent")')
|
||||
await page.click('button:has-text("Andrey P.")')
|
||||
await page.click('text=Create')
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
await page.click('td:has-text("RVE-")')
|
||||
})
|
||||
|
||||
|
@ -35,6 +35,7 @@ test.describe('recruit tests', () => {
|
||||
await page.fill('[placeholder="Please\\ type\\ \\ title"]', 's1')
|
||||
// Click text=Create Skill s1 Please type description here Category Other Create Cancel >> button
|
||||
await page.click('form[id="tags:string:AddTag"] button:has-text("Create")')
|
||||
await page.waitForSelector('form[id="tags:string:AddTag"]', { state: 'detached' })
|
||||
await page.click('button:has-text("Other")')
|
||||
// Click text=s1
|
||||
// await page.click('text=s1')
|
||||
@ -45,6 +46,7 @@ test.describe('recruit tests', () => {
|
||||
await page.keyboard.press('Escape')
|
||||
// Click button:has-text("Create")
|
||||
await page.click('button:has-text("Create")')
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
})
|
||||
|
||||
test('create-tag-candidate', async ({ page }) => {
|
||||
@ -76,6 +78,7 @@ test.describe('recruit tests', () => {
|
||||
await page.fill('[placeholder="Please\\ type\\ skill\\ title"]', 'C++')
|
||||
// Click button:has-text("Create")
|
||||
await page.click('button:has-text("Create")')
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
// Click text=Talents
|
||||
await page.click('text=Talents')
|
||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/sanity-ws/recruit/talents`)
|
||||
@ -101,6 +104,7 @@ test.describe('recruit tests', () => {
|
||||
await page.fill('[placeholder="Appleseed"]', last)
|
||||
// Click button:has-text("Create")
|
||||
await page.click('button:has-text("Create")')
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
// Click text=q w
|
||||
await page.click(`tr > :has-text("${first} ${last}")`)
|
||||
// Click text=java
|
||||
|
@ -31,6 +31,7 @@ test.describe('project tests', () => {
|
||||
await page.click('form button:has-text("Project")')
|
||||
await page.click(`button:has-text("${prjId}")`)
|
||||
await page.click('button:has-text("Save issue")')
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
await page.click(`button:has-text("${prjId}")`)
|
||||
await page.click('button:has-text("No project")')
|
||||
})
|
||||
@ -47,6 +48,7 @@ test.describe('project tests', () => {
|
||||
await page.click('text=Backlog Lead Members Start date Target date >> button')
|
||||
await page.click('button:has-text("In progress")')
|
||||
await page.click('button:has-text("Create project")')
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
await page.click(`text=${prjId}`)
|
||||
await page.click('button:has-text("In progress")')
|
||||
await page.click('button:has-text("Completed")')
|
||||
|
@ -53,6 +53,7 @@ async function createIssue (page: Page, props: IssueProps): Promise<void> {
|
||||
await page.click('button:has-text("New issue")')
|
||||
await fillIssueForm(page, props)
|
||||
await page.click('button:has-text("Save issue")')
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
}
|
||||
|
||||
async function createSubissue (page: Page, props: IssueProps): Promise<void> {
|
||||
@ -70,7 +71,7 @@ async function createLabel (page: Page, { label }: LabelProps): Promise<void> {
|
||||
await page.click('.buttons-group >> button >> nth=-1')
|
||||
await page.fill('[id="tags:string:AddTag"] >> input >> nth=0', label)
|
||||
await page.click('[id="tags:string:AddTag"] >> button:has-text("Create")')
|
||||
await page.waitForTimeout(100)
|
||||
await page.waitForSelector('form.antiCard[id="tags:string:AddTag"]', { state: 'detached' })
|
||||
await page.keyboard.press('Escape')
|
||||
await page.waitForTimeout(100)
|
||||
await page.keyboard.press('Escape')
|
||||
|
Loading…
Reference in New Issue
Block a user