mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-03 14:19:56 +00:00
feat(tests): updated flaky tests (#4218)
Signed-off-by: Alex Velichko <nestor_007@mail.ru>
This commit is contained in:
parent
1767fc6197
commit
a82ef5aa94
@ -40,7 +40,7 @@ test.describe('actions tests', () => {
|
|||||||
|
|
||||||
await page.click('div.actionsHeader input.actionsInput')
|
await page.click('div.actionsHeader input.actionsInput')
|
||||||
await page.fill('div.actionsHeader input.actionsInput', 'go to ')
|
await page.fill('div.actionsHeader input.actionsInput', 'go to ')
|
||||||
await page.waitForTimeout(500)
|
await page.waitForTimeout(1000)
|
||||||
|
|
||||||
expect(await page.locator('div.selectPopup div.list-item :text("Go To Vacancies")').count()).toBe(1)
|
expect(await page.locator('div.selectPopup div.list-item :text("Go To Vacancies")').count()).toBe(1)
|
||||||
await page.click('div.selectPopup div.list-item :text("Go To Vacancies")', { delay: 100 })
|
await page.click('div.selectPopup div.list-item :text("Go To Vacancies")', { delay: 100 })
|
||||||
@ -61,7 +61,8 @@ test.describe('actions tests', () => {
|
|||||||
|
|
||||||
await page.click('div.actionsHeader input.actionsInput')
|
await page.click('div.actionsHeader input.actionsInput')
|
||||||
await page.fill('div.actionsHeader input.actionsInput', 'go to ')
|
await page.fill('div.actionsHeader input.actionsInput', 'go to ')
|
||||||
await page.waitForTimeout(500)
|
await page.waitForTimeout(1000)
|
||||||
|
|
||||||
expect(await page.locator('div.selectPopup :text("Go To Applications")').count()).toBe(1)
|
expect(await page.locator('div.selectPopup :text("Go To Applications")').count()).toBe(1)
|
||||||
await page.click('div.selectPopup :text("Go To Applications")', { delay: 100 })
|
await page.click('div.selectPopup :text("Go To Applications")', { delay: 100 })
|
||||||
|
|
||||||
|
@ -122,6 +122,6 @@ export class IssuesDetailsPage extends CommonTrackerPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async openSubIssueByName (issueName: string): Promise<void> {
|
async openSubIssueByName (issueName: string): Promise<void> {
|
||||||
await this.page.locator('div.listGrid a', { hasText: issueName }).click()
|
await this.page.locator('div.main div.listGrid a', { hasText: issueName }).click()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,12 +12,13 @@ import {
|
|||||||
toTime
|
toTime
|
||||||
} from './tracker.utils'
|
} from './tracker.utils'
|
||||||
import { TrackerNavigationMenuPage } from '../model/tracker/tracker-navigation-menu-page'
|
import { TrackerNavigationMenuPage } from '../model/tracker/tracker-navigation-menu-page'
|
||||||
|
import { IssuesDetailsPage } from '../model/tracker/issues-details-page'
|
||||||
|
|
||||||
test.use({
|
test.use({
|
||||||
storageState: PlatformSetting
|
storageState: PlatformSetting
|
||||||
})
|
})
|
||||||
|
|
||||||
const getIssueName = (postfix: string = generateId(5)): string => `issue-${postfix}`
|
const getIssueName = (postfix: string = generateId()): string => `issue-${postfix}`
|
||||||
|
|
||||||
const panelStatusMap = new Map([
|
const panelStatusMap = new Map([
|
||||||
['Issues/All', DEFAULT_STATUSES],
|
['Issues/All', DEFAULT_STATUSES],
|
||||||
@ -100,8 +101,10 @@ test.describe('Tracker tests', () => {
|
|||||||
await page.click('[data-id="tab-assigned"]')
|
await page.click('[data-id="tab-assigned"]')
|
||||||
await expect(page.locator('.antiPanel-component')).not.toContainText(name)
|
await expect(page.locator('.antiPanel-component')).not.toContainText(name)
|
||||||
await page.click('[data-id="tab-created"]')
|
await page.click('[data-id="tab-created"]')
|
||||||
|
await page.waitForTimeout(3000)
|
||||||
await expect(page.locator('.antiPanel-component')).toContainText(name)
|
await expect(page.locator('.antiPanel-component')).toContainText(name)
|
||||||
await page.click('[data-id="tab-subscribed"]')
|
await page.click('[data-id="tab-subscribed"]')
|
||||||
|
await page.waitForTimeout(3000)
|
||||||
await expect(page.locator('.antiPanel-component')).toContainText(name)
|
await expect(page.locator('.antiPanel-component')).toContainText(name)
|
||||||
await openIssue(page, name)
|
await openIssue(page, name)
|
||||||
// click "Don't track"
|
// click "Don't track"
|
||||||
@ -219,7 +222,8 @@ test.describe('Tracker tests', () => {
|
|||||||
// We need to fait for indexer to complete indexing.
|
// We need to fait for indexer to complete indexing.
|
||||||
await fillSearch(page, name)
|
await fillSearch(page, name)
|
||||||
|
|
||||||
await page.waitForSelector(`text="${name}"`, { timeout: 15000 })
|
const issuesDetailsPage = new IssuesDetailsPage(page)
|
||||||
|
await issuesDetailsPage.waitDetailsOpened(name)
|
||||||
|
|
||||||
let count = 0
|
let count = 0
|
||||||
for (let j = 0; j < 5; j++) {
|
for (let j = 0; j < 5; j++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user