From c24ae539fb4e8a09eeee1eb312c1369ecebd764d Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Sat, 18 Feb 2023 01:13:07 +0700 Subject: [PATCH] TSK-678: Update First/Last names (#2652) Signed-off-by: Andrey Sobolev --- packages/ui/src/utils.ts | 4 +- plugins/contact-assets/lang/en.json | 6 +- plugins/contact-assets/lang/ru.json | 6 +- .../src/components/ChannelEditor.svelte | 1 + .../src/components/ChannelsDropdown.svelte | 4 +- .../src/components/QueryView.svelte | 93 ------------------- plugins/devmodel-resources/src/index.ts | 80 +++++++--------- plugins/recruit-assets/lang/en.json | 4 +- plugins/recruit-assets/lang/ru.json | 4 +- tests/sanity/storage-dev.json | 8 ++ tests/sanity/storage.json | 4 + tests/sanity/tests/contact.duplicate.spec.ts | 10 +- tests/sanity/tests/contacts.spec.ts | 16 ++-- tests/sanity/tests/org.members.spec.ts | 6 +- tests/sanity/tests/playwright.config.ts | 5 +- tests/sanity/tests/recruit.review.spec.ts | 2 +- tests/sanity/tests/recruit.spec.ts | 5 +- tests/sanity/tests/tags.spec.ts | 18 ++-- tests/sanity/tests/tracker.projects.spec.ts | 2 +- tests/sanity/tests/tracker.spec.ts | 42 +++++++-- tests/sanity/tests/tracker.utils.ts | 2 +- 21 files changed, 128 insertions(+), 194 deletions(-) delete mode 100644 plugins/devmodel-resources/src/components/QueryView.svelte diff --git a/packages/ui/src/utils.ts b/packages/ui/src/utils.ts index 66998dbe0f..6013ee71c4 100644 --- a/packages/ui/src/utils.ts +++ b/packages/ui/src/utils.ts @@ -16,7 +16,7 @@ import { generateId } from '@hcengineering/core' import type { Metadata } from '@hcengineering/platform' import { setMetadata } from '@hcengineering/platform' -import { Notification, notificationsStore, NotificationPosition, NotificationSeverity } from '.' +import { Notification, NotificationPosition, NotificationSeverity, notificationsStore } from '.' import { AnyComponent, AnySvelteComponent } from './types' export function setMetadataLocalStorage (id: Metadata, value: T | null): void { @@ -64,7 +64,7 @@ export function addNotification ( severity: NotificationSeverity.Success, position: NotificationPosition.BottomRight, component, - closeTimeout: 10000, + closeTimeout: parseInt(localStorage.getItem('#platform.notification.timeout') ?? '10000'), params } diff --git a/plugins/contact-assets/lang/en.json b/plugins/contact-assets/lang/en.json index 21e074e6b1..ad996bf8ac 100644 --- a/plugins/contact-assets/lang/en.json +++ b/plugins/contact-assets/lang/en.json @@ -7,10 +7,10 @@ "CreatePerson": "Create person", "CreatePersons": "Create persons folder", "CreateOrganization": "Create organization", - "OrganizationNamePlaceholder": "Apple", + "OrganizationNamePlaceholder": "Organization name", "OrganizationsNamePlaceholder": "Organizations", - "PersonFirstNamePlaceholder": "John", - "PersonLastNamePlaceholder": "Appleseed", + "PersonFirstNamePlaceholder": "First name", + "PersonLastNamePlaceholder": "Last name", "PersonLocationPlaceholder": "Location", "PersonsNamePlaceholder": "Folder", "CreateOrganizations": "Create organizations folder", diff --git a/plugins/contact-assets/lang/ru.json b/plugins/contact-assets/lang/ru.json index cf8c4f9caf..05769c6eb2 100644 --- a/plugins/contact-assets/lang/ru.json +++ b/plugins/contact-assets/lang/ru.json @@ -7,10 +7,10 @@ "CreatePerson": "Создать персону", "CreatePersons": "Создать папку для людей", "CreateOrganization": "Создать организацию", - "OrganizationNamePlaceholder": "Apple", + "OrganizationNamePlaceholder": "Имя организации", "OrganizationsNamePlaceholder": "Организации", - "PersonFirstNamePlaceholder": "John", - "PersonLastNamePlaceholder": "Appleseed", + "PersonFirstNamePlaceholder": "Имя", + "PersonLastNamePlaceholder": "Фамилия", "PersonLocationPlaceholder": "Местоположение", "PersonsNamePlaceholder": "Папка", "CreateOrganizations": "Создать папку для организаций", diff --git a/plugins/contact-resources/src/components/ChannelEditor.svelte b/plugins/contact-resources/src/components/ChannelEditor.svelte index 95cc397fe5..7ccb9d1618 100644 --- a/plugins/contact-resources/src/components/ChannelEditor.svelte +++ b/plugins/contact-resources/src/components/ChannelEditor.svelte @@ -146,6 +146,7 @@ {:else}
+ { value = filterUndefined(displayItems) - dispatch('change', value) updateMenu(displayItems) } @@ -206,6 +205,9 @@ displayItems = dropItem(n) } else { item.value = result + if (displayItems.find((it) => item.value === it.value) === undefined) { + displayItems = [...displayItems, item] + } } saveItems() focusManager?.setFocusPos(focusIndex + 1 + n) diff --git a/plugins/devmodel-resources/src/components/QueryView.svelte b/plugins/devmodel-resources/src/components/QueryView.svelte deleted file mode 100644 index 799e5a104f..0000000000 --- a/plugins/devmodel-resources/src/components/QueryView.svelte +++ /dev/null @@ -1,93 +0,0 @@ - - - - -
- - - - - - - - - - - - - - {#each queries as q} - - - - - - - - - - {/each} - -
IndexClassQueryOptionsResult CountResultActions
{queries.indexOf(q)}{q._class}{JSON.stringify(q.query)}{JSON.stringify(q.options ?? {})}{q.result.length} - - Results - - - {}} - /> -
-
-
- - diff --git a/plugins/devmodel-resources/src/index.ts b/plugins/devmodel-resources/src/index.ts index 53736a7304..76e55468bd 100644 --- a/plugins/devmodel-resources/src/index.ts +++ b/plugins/devmodel-resources/src/index.ts @@ -23,7 +23,6 @@ import core, { Hierarchy, ModelDb, Ref, - toFindResult, Tx, TxResult, WithLookup @@ -51,17 +50,16 @@ export interface QueryWithResult { } export const transactions: TxWitHResult[] = [] -export const notifications: Tx[] = [] -export const queries: QueryWithResult[] = [] class ModelClient implements Client { + notifyEnabled = true constructor (readonly client: Client) { + this.notifyEnabled = (localStorage.getItem('#platform.notification.logging') ?? 'true') === 'true' + client.notify = (tx) => { this.notify?.(tx) - console.info('devmodel# notify=>', tx, this.client.getModel(), getMetadata(devmodel.metadata.DevModel)) - notifications.push(tx) - if (notifications.length > 500) { - notifications.shift() + if (this.notifyEnabled) { + console.info('devmodel# notify=>', tx, this.client.getModel(), getMetadata(devmodel.metadata.DevModel)) } } } @@ -82,26 +80,18 @@ class ModelClient implements Client { options?: FindOptions ): Promise | undefined> { const result = await this.client.findOne(_class, query, options) - console.info( - 'devmodel# findOne=>', - _class, - query, - options, - 'result => ', - result, - ' =>model', - this.client.getModel(), - getMetadata(devmodel.metadata.DevModel) - ) - queries.push({ - _class, - query, - options: options as FindOptions, - result: toFindResult(result !== undefined ? [result] : []), - findOne: true - }) - if (queries.length > 100) { - queries.shift() + if (this.notifyEnabled) { + console.info( + 'devmodel# findOne=>', + _class, + query, + options, + 'result => ', + result, + ' =>model', + this.client.getModel(), + getMetadata(devmodel.metadata.DevModel) + ) } return result } @@ -112,27 +102,27 @@ class ModelClient implements Client { options?: FindOptions ): Promise> { const result = await this.client.findAll(_class, query, options) - console.info( - 'devmodel# findAll=>', - _class, - query, - options, - 'result => ', - result, - ' =>model', - this.client.getModel(), - getMetadata(devmodel.metadata.DevModel) - ) - queries.push({ _class, query, options: options as FindOptions, result, findOne: false }) - if (queries.length > 100) { - queries.shift() + if (this.notifyEnabled) { + console.info( + 'devmodel# findAll=>', + _class, + query, + options, + 'result => ', + result, + ' =>model', + this.client.getModel(), + getMetadata(devmodel.metadata.DevModel) + ) } return result } async tx (tx: Tx): Promise { const result = await this.client.tx(tx) - console.info('devmodel# tx=>', tx, result, getMetadata(devmodel.metadata.DevModel)) + if (this.notifyEnabled) { + console.info('devmodel# tx=>', tx, result, getMetadata(devmodel.metadata.DevModel)) + } transactions.push({ tx, result }) if (transactions.length > 100) { transactions.shift() @@ -166,12 +156,6 @@ export async function Hook (client: Client): Promise { icon: view.icon.Table, id: 'transactions', component: devmodel.component.ModelView - }, - { - label: 'Queries' as IntlString, - icon: view.icon.Table, - id: 'queries', - component: devmodel.component.QueryView } ] } diff --git a/plugins/recruit-assets/lang/en.json b/plugins/recruit-assets/lang/en.json index a10951bb44..ca41ee6aad 100644 --- a/plugins/recruit-assets/lang/en.json +++ b/plugins/recruit-assets/lang/en.json @@ -54,8 +54,8 @@ "Location": "Location", "Title": "Title", "Source": "Source", - "PersonFirstNamePlaceholder": "John", - "PersonLastNamePlaceholder": "Appleseed", + "PersonFirstNamePlaceholder": "First name", + "PersonLastNamePlaceholder": "Last name", "PersonLocationPlaceholder": "Location", "ManageVacancyStatuses": "Manage vacancy templates", "EditVacancy": "Edit", diff --git a/plugins/recruit-assets/lang/ru.json b/plugins/recruit-assets/lang/ru.json index 453107acaf..dcd445d8be 100644 --- a/plugins/recruit-assets/lang/ru.json +++ b/plugins/recruit-assets/lang/ru.json @@ -54,8 +54,8 @@ "Location": "Местоположение", "Title": "Заголовок", "Source": "Источник", - "PersonFirstNamePlaceholder": "John", - "PersonLastNamePlaceholder": "Appleseed", + "PersonFirstNamePlaceholder": "First name", + "PersonLastNamePlaceholder": "Last name", "PersonLocationPlaceholder": "Местоположение", "ManageVacancyStatuses": "Управление шаблонами вакансии", "EditVacancy": "Редактировать", diff --git a/tests/sanity/storage-dev.json b/tests/sanity/storage-dev.json index f5a27d1f51..c7263958de 100644 --- a/tests/sanity/storage-dev.json +++ b/tests/sanity/storage-dev.json @@ -15,6 +15,14 @@ { "name": "login:metadata:LoginEndpoint", "value": "ws://localhost:3333" + }, + { + "name": "#platform.notification.timeout", + "value": "1" + }, + { + "name": "#platform.notification.logging", + "value": "false" } ] } diff --git a/tests/sanity/storage.json b/tests/sanity/storage.json index fac0839a45..bfa7bf1790 100644 --- a/tests/sanity/storage.json +++ b/tests/sanity/storage.json @@ -15,6 +15,10 @@ { "name": "login:metadata:LoginEndpoint", "value": "ws://localhost:3334" + }, + { + "name": "#platform.notification.logging", + "value": "false" } ] } diff --git a/tests/sanity/tests/contact.duplicate.spec.ts b/tests/sanity/tests/contact.duplicate.spec.ts index 4ca2da7a21..50e9e299c1 100644 --- a/tests/sanity/tests/contact.duplicate.spec.ts +++ b/tests/sanity/tests/contact.duplicate.spec.ts @@ -8,7 +8,7 @@ test.use({ test.describe('duplicate-org-test', () => { test.beforeEach(async ({ page }) => { // Create user and workspace - await page.goto(`${PlatformURI}/workbench/sanity-ws`) + await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished() }) test('check-contact-exists', async ({ page }) => { await page.click('[id="app-lead\\:string\\:LeadApplication"]') @@ -26,11 +26,11 @@ test.describe('duplicate-org-test', () => { await page.click('button:has-text("Organization")') // Click [placeholder="Apple"] - await page.click('[placeholder="Apple"]') + await page.click('[placeholder="Organization name"]') const genId = 'Asoft-' + generateId(4) // Fill [placeholder="Apple"] - await page.fill('[placeholder="Apple"]', genId) + await page.fill('[placeholder="Organization name"]', genId) // Click button:has-text("Create") await page.click('button:has-text("Create")') @@ -47,10 +47,10 @@ test.describe('duplicate-org-test', () => { await page.click('button:has-text("Organization")') // Click [placeholder="Apple"] - await page.click('[placeholder="Apple"]') + await page.click('[placeholder="Organization name"]') // Fill [placeholder="Apple"] - await page.fill('[placeholder="Apple"]', genId) + await page.fill('[placeholder="Organization name"]', genId) // Click text=Person already exists... await page.click('text=Contact already exists...') diff --git a/tests/sanity/tests/contacts.spec.ts b/tests/sanity/tests/contacts.spec.ts index 58feec2bd0..963cecd1d4 100644 --- a/tests/sanity/tests/contacts.spec.ts +++ b/tests/sanity/tests/contacts.spec.ts @@ -8,7 +8,7 @@ test.use({ test.describe('contact tests', () => { test.beforeEach(async ({ page }) => { // Create user and workspace - await page.goto(`${PlatformURI}/workbench/sanity-ws`) + await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished() }) test('create-contact', async ({ page }) => { // Create a new context with the saved storage state. @@ -21,11 +21,11 @@ test.describe('contact tests', () => { const first = 'Elton-' + generateId(5) const last = 'John-' + generateId(5) - const firstName = page.locator('[placeholder="John"]') + const firstName = page.locator('[placeholder="First name"]') await firstName.click() await firstName.fill(first) - const lastName = page.locator('[placeholder="Appleseed"]') + const lastName = page.locator('[placeholder="Last name"]') await lastName.click() await lastName.fill(last) @@ -41,7 +41,7 @@ test.describe('contact tests', () => { const orgName = 'Organization' + generateId(5) - const firstName = page.locator('[placeholder="Apple"]') + const firstName = page.locator('[placeholder="Organization name"]') await firstName.click() await firstName.fill(orgName) @@ -59,7 +59,9 @@ test.describe('contact tests', () => { await searchBox.fill('Marina') await searchBox.press('Enter') - await expect(page.locator('.antiTable-body__row')).toHaveCount(1) + await expect(page.locator('.antiTable-body__row')).toHaveCount(1, { + timeout: 15000 + }) await searchBox.fill('') await searchBox.press('Enter') @@ -79,11 +81,11 @@ test.describe('contact tests', () => { const first = 'Elton-' + generateId(5) const last = 'John-' + generateId(5) - const firstName = page.locator('[placeholder="John"]') + const firstName = page.locator('[placeholder="First name"]') await firstName.click() await firstName.fill(first) - const lastName = page.locator('[placeholder="Appleseed"]') + const lastName = page.locator('[placeholder="Last name"]') await lastName.click() await lastName.fill(last) diff --git a/tests/sanity/tests/org.members.spec.ts b/tests/sanity/tests/org.members.spec.ts index 30b509350d..18fe6f5e2c 100644 --- a/tests/sanity/tests/org.members.spec.ts +++ b/tests/sanity/tests/org.members.spec.ts @@ -8,16 +8,16 @@ test.use({ test.describe('recruit tests', () => { test.beforeEach(async ({ page }) => { // Create user and workspace - await page.goto(`${PlatformURI}/workbench/sanity-ws`) + await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished() }) test('org-add-member', async ({ page }) => { await page.click('[id="app-contact\\:string\\:Contacts"]') await page.click('button:has-text("Contact")') await page.click('button:has-text("Organization")') - await page.click('[placeholder="Apple"]') + await page.click('[placeholder="Organization name"]') const orgId = 'Organiation-' + generateId() - await page.fill('[placeholder="Apple"]', orgId) + await page.fill('[placeholder="Organization name"]', orgId) await page.click('button:has-text("Create")') await page.waitForSelector('form.antiCard', { state: 'detached' }) await page.click(`text=${orgId}`) diff --git a/tests/sanity/tests/playwright.config.ts b/tests/sanity/tests/playwright.config.ts index f94b8ca5e2..b84b743aff 100644 --- a/tests/sanity/tests/playwright.config.ts +++ b/tests/sanity/tests/playwright.config.ts @@ -11,6 +11,9 @@ const config: PlaywrightTestConfig = { screenshots: true, sources: true } - } + }, + retries: 1, + timeout: 60000, + maxFailures: 5 } export default config diff --git a/tests/sanity/tests/recruit.review.spec.ts b/tests/sanity/tests/recruit.review.spec.ts index 5e79dfc0af..f20d49e9b9 100644 --- a/tests/sanity/tests/recruit.review.spec.ts +++ b/tests/sanity/tests/recruit.review.spec.ts @@ -8,7 +8,7 @@ test.use({ test.describe('recruit review tests', () => { test.beforeEach(async ({ page }) => { // Create user and workspace - await page.goto(`${PlatformURI}/workbench/sanity-ws`) + await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished() }) test('create-review', async ({ page, context }) => { await page.click('[id="app-recruit\\:string\\:RecruitApplication"]') diff --git a/tests/sanity/tests/recruit.spec.ts b/tests/sanity/tests/recruit.spec.ts index c25397df5e..55098bf1fc 100644 --- a/tests/sanity/tests/recruit.spec.ts +++ b/tests/sanity/tests/recruit.spec.ts @@ -22,11 +22,11 @@ test.describe('recruit tests', () => { const loc = 'Cupertino' const email = `ej-${generateId(4)}@test.com` - const firstName = page.locator('[placeholder="John"]') + const firstName = page.locator('[placeholder="First name"]') await firstName.click() await firstName.fill(first) - const lastName = page.locator('[placeholder="Appleseed"]') + const lastName = page.locator('[placeholder="Last name"]') await lastName.click() await lastName.fill(last) @@ -60,6 +60,7 @@ test.describe('recruit tests', () => { test('create-application', async ({ page }) => { await page.locator('[id="app-recruit\\:string\\:RecruitApplication"]').click() + await page.waitForLoadState('load') const vacancyId = 'My vacancy ' + generateId(4) diff --git a/tests/sanity/tests/tags.spec.ts b/tests/sanity/tests/tags.spec.ts index 89005e5e80..dbb8670149 100644 --- a/tests/sanity/tests/tags.spec.ts +++ b/tests/sanity/tests/tags.spec.ts @@ -8,9 +8,9 @@ test.use({ test.describe('recruit tests', () => { test.beforeEach(async ({ page }) => { // Create user and workspace - await page.goto(`${PlatformURI}/workbench/sanity-ws`) + await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished() }) - test('create-candidate-with-skill', async ({ page }) => { + test('create-skill-candidate-with-skill', async ({ page }) => { // Go to http://localhost:8083/workbench/sanity-ws await page.goto(`${PlatformURI}/workbench/sanity-ws`) // Click [id="app-recruit\:string\:RecruitApplication"] @@ -22,11 +22,11 @@ test.describe('recruit tests', () => { // Click button:has-text("Talent") await page.click('button:has-text("Talent")') // Fill [placeholder="John"] - await page.fill('[placeholder="John"]', 'Petr') + await page.fill('[placeholder="First name"]', 'Petr') // Click [placeholder="Appleseed"] - await page.click('[placeholder="Appleseed"]') + await page.click('[placeholder="Last name"]') // Fill [placeholder="Appleseed"] - await page.fill('[placeholder="Appleseed"]', 'Dooliutl') + await page.fill('[placeholder="Last name"]', 'Dooliutl') // Click .ml-4 .tooltip-trigger .flex-center await page.click('button:has-text("Skills")') // Click text=Add/Create Skill Suggested Cancel >> button @@ -93,15 +93,15 @@ test.describe('recruit tests', () => { // await page.click('button:has-text("Cancel")') await page.keyboard.press('Escape') // Click [placeholder="John"] - await page.click('[placeholder="John"]') + await page.click('[placeholder="First name"]') // Fill [placeholder="John"] const first = 'first-' + generateId(4) - await page.fill('[placeholder="John"]', first) + await page.fill('[placeholder="First name"]', first) // Click [placeholder="Appleseed"] - await page.click('[placeholder="Appleseed"]') + await page.click('[placeholder="Last name"]') // Fill [placeholder="Appleseed"] const last = 'last-' + generateId(4) - await page.fill('[placeholder="Appleseed"]', last) + await page.fill('[placeholder="Last name"]', last) // Click button:has-text("Create") await page.click('button:has-text("Create")') await page.waitForSelector('form.antiCard', { state: 'detached' }) diff --git a/tests/sanity/tests/tracker.projects.spec.ts b/tests/sanity/tests/tracker.projects.spec.ts index c8435bf2be..4aac0f43d0 100644 --- a/tests/sanity/tests/tracker.projects.spec.ts +++ b/tests/sanity/tests/tracker.projects.spec.ts @@ -9,7 +9,7 @@ test.use({ test.describe('project tests', () => { test.beforeEach(async ({ page }) => { // Create user and workspace - await page.goto(`${PlatformURI}/workbench/sanity-ws`) + await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished() }) test('create-project-issue', async ({ page }) => { await page.click('[id="app-tracker\\:string\\:TrackerApplication"]') diff --git a/tests/sanity/tests/tracker.spec.ts b/tests/sanity/tests/tracker.spec.ts index 43c4ff0e4d..2174fdbf52 100644 --- a/tests/sanity/tests/tracker.spec.ts +++ b/tests/sanity/tests/tracker.spec.ts @@ -30,6 +30,14 @@ test('create-issue-and-sub-issue', async ({ page }) => { } await createIssue(page, props) await page.click('text="Issues"') + + // Click [placeholder="Search"] + await page.locator('[placeholder="Search"]').click() + // Fill [placeholder="Search"] + await page.locator('[placeholder="Search"]').fill(props.name) + // Press Enter + await page.locator('[placeholder="Search"]').press('Enter') + await openIssue(page, props.name) await checkIssue(page, props) props.name = `sub${props.name}` @@ -40,12 +48,13 @@ test('create-issue-and-sub-issue', async ({ page }) => { const getIssueName = (postfix: string = generateId(5)): string => `issue-${postfix}` +const panelStatusMap = new Map([ + ['Issues', DEFAULT_STATUSES], + ['Active', ['Todo', 'In Progress']], + ['Backlog', ['Backlog']] +]) + test('issues-status-display', async ({ page }) => { - const panelStatusMap = new Map([ - ['Issues', DEFAULT_STATUSES], - ['Active', ['Todo', 'In Progress']], - ['Backlog', ['Backlog']] - ]) const locator = page.locator('.list-container') await navigate(page) for (const status of DEFAULT_STATUSES) { @@ -58,15 +67,19 @@ test('issues-status-display', async ({ page }) => { await expect(locator).toContainText(statuses) if (excluded.length > 0) await expect(locator).not.toContainText(excluded) await page.click(ViewletSelectors.Board) + if (excluded.length > 0) await expect(locator).not.toContainText(excluded) for (const status of statuses) { - await expect(page.locator(`.panel-container:has-text("${status}")`)).toContainText(getIssueName(status)) + await expect( + page.locator('.panel-container', { + has: page.locator(`.header:has-text("${status}")`) + }) + ).toContainText(getIssueName(status), { timeout: 15000 }) } } }) test('save-view-options', async ({ page }) => { - test.setTimeout(45000) const panels = ['Issues', 'Active', 'Backlog'] await navigate(page) for (const viewletSelector of [ViewletSelectors.Board, ViewletSelectors.Table]) { @@ -108,12 +121,11 @@ test('my-issues', async ({ page }) => { }) test('report-time-from-issue-card', async ({ page }) => { - test.setTimeout(45000) await navigate(page) const assignee = 'Chen Rosamund' const status = 'In Progress' const values = [0.25, 0.5, 0.75, 1] - for (let i = 0; i < 10; i++) { + for (let i = 0; i < 5; i++) { const random = Math.floor(Math.random() * values.length) const time = values[random] const name = getIssueName() @@ -151,14 +163,24 @@ test('report-time-from-main-view', async ({ page }) => { const name = getIssueName() await createIssue(page, { name, assignee, status }) + + // await page.click('.close-button > .button') + + // Click [placeholder="Search"] + await page.locator('[placeholder="Search"]').click() + // Fill [placeholder="Search"] + await page.locator('[placeholder="Search"]').fill(name) + // Press Enter + await page.locator('[placeholder="Search"]').press('Enter') + await page.waitForSelector(`text="${name}"`) - await page.click('.close-button > .button') let count = 0 for (let j = 0; j < 5; j++) { const random = Math.floor(Math.random() * values.length) const time = values[random] count += time + await page.locator('.estimation-container').first().click() await page.waitForSelector('text="Estimation"') diff --git a/tests/sanity/tests/tracker.utils.ts b/tests/sanity/tests/tracker.utils.ts index 972dbe4fd0..fe7e5abd0c 100644 --- a/tests/sanity/tests/tracker.utils.ts +++ b/tests/sanity/tests/tracker.utils.ts @@ -22,7 +22,7 @@ export const DEFAULT_STATUSES = ['Backlog', 'Todo', 'In Progress', 'Done', 'Canc export const DEFAULT_USER = 'Appleseed John' export async function navigate (page: Page): Promise { - await page.goto(`${PlatformURI}/workbench/sanity-ws`) + await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished() await page.click('[id="app-tracker\\:string\\:TrackerApplication"]') await expect(page).toHaveURL(`${PlatformURI}/workbench/sanity-ws/tracker`) }