From 66581854f8c19c5b11d50efe64b025026656ca6b Mon Sep 17 00:00:00 2001 From: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com> Date: Sat, 19 Mar 2022 22:17:23 +0600 Subject: [PATCH] Vacancy card fix (#1177) Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com> --- .../src/components/CandidateCard.svelte | 5 ++-- .../src/components/VacancyCard.svelte | 27 ++++++++++++++++--- tests/sanity/tests/login.spec.ts | 5 ++++ tests/sanity/tests/recruit.spec.ts | 2 +- tests/sanity/tests/utils.ts | 5 ++++ 5 files changed, 37 insertions(+), 7 deletions(-) diff --git a/plugins/recruit-resources/src/components/CandidateCard.svelte b/plugins/recruit-resources/src/components/CandidateCard.svelte index 2f6806513a..8ebc745784 100644 --- a/plugins/recruit-resources/src/components/CandidateCard.svelte +++ b/plugins/recruit-resources/src/components/CandidateCard.svelte @@ -18,10 +18,11 @@ import { ChannelsView } from '@anticrm/contact-resources' import { Avatar, createQuery } from '@anticrm/presentation' import type { Candidate } from '@anticrm/recruit' - import { Component, showPanel } from '@anticrm/ui' + import { Component, Label, showPanel } from '@anticrm/ui' import view from '@anticrm/view' import chunter from '@anticrm/chunter' import attachment from '@anticrm/attachment' + import recruit from '../plugin' export let candidate: Candidate @@ -39,7 +40,7 @@
-
CANDIDATE
+
{#if candidate}
{ diff --git a/plugins/recruit-resources/src/components/VacancyCard.svelte b/plugins/recruit-resources/src/components/VacancyCard.svelte index ff70497585..31add52ad1 100644 --- a/plugins/recruit-resources/src/components/VacancyCard.svelte +++ b/plugins/recruit-resources/src/components/VacancyCard.svelte @@ -15,16 +15,32 @@
-
VACANCY
+
{#if vacancy}
{ @@ -36,6 +52,9 @@ loc.path.length = 3 navigate(loc) }}>{vacancy.name}
+ {#if company} + {company.name} + {/if}
{vacancy.description ?? ''}
{/if}
diff --git a/tests/sanity/tests/login.spec.ts b/tests/sanity/tests/login.spec.ts index 73655c9982..2675fa0d42 100644 --- a/tests/sanity/tests/login.spec.ts +++ b/tests/sanity/tests/login.spec.ts @@ -2,6 +2,11 @@ import { test, expect } from '@playwright/test' test.describe('login test', () => { test('check login', async ({ page }) => { + page.on('pageerror', exception => { + console.log('Uncaught exception:') + console.log(exception.message) + }) + // Create user and workspace await page.goto('http://localhost:8083/login%3Acomponent%3ALoginApp/login') diff --git a/tests/sanity/tests/recruit.spec.ts b/tests/sanity/tests/recruit.spec.ts index 5e3e7b0fea..eded5e3b0e 100644 --- a/tests/sanity/tests/recruit.spec.ts +++ b/tests/sanity/tests/recruit.spec.ts @@ -53,7 +53,7 @@ test.describe('recruit tests', () => { await page.click('text=Create Cancel >> button') await page.click('text=APP-4') - await page.click('text=Assigned recruiter Not selected >> span') + await page.click('text=Assigned recruiter Not selected') await page.click('button:has-text("Rosamund Chen")') }) diff --git a/tests/sanity/tests/utils.ts b/tests/sanity/tests/utils.ts index ad3d8d9763..2de11e1c42 100644 --- a/tests/sanity/tests/utils.ts +++ b/tests/sanity/tests/utils.ts @@ -1,6 +1,11 @@ import { Page } from '@playwright/test' export async function openWorkbench (page: Page): Promise { + page.on('pageerror', exception => { + console.log('Uncaught exception:') + console.log(exception.message) + }) + await page.goto('http://localhost:8083/login%3Acomponent%3ALoginApp/login') await page.evaluate(() => {