-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d118094
commit d816ba8
Showing
22 changed files
with
272 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export const enum CollectionContentTableQa { | ||
Table = 'coll-content-table', | ||
CollectionLinkRow = 'coll-content-table-coll-link-row', | ||
WorkbookLinkRow = 'coll-content-table-workbook-link-row', | ||
CollectionTitleCell = 'coll-content-table-coll-title-cell', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
export {VisualizationsQa} from './visualization'; | ||
export * from './chart'; | ||
export * from './collections'; | ||
export * from './components'; | ||
export * from './connections'; | ||
export * from './chart'; | ||
export * from './editor'; | ||
export * from './datasets'; | ||
export * from './control'; | ||
export * from './dash'; | ||
export * from './datasets'; | ||
export * from './dl-navigation'; | ||
export * from './wizard'; | ||
export * from './control'; | ||
export * from './ql'; | ||
export * from './editor'; | ||
export * from './field-editor'; | ||
export {VisualizationsQa} from './visualization'; | ||
export * from './uikit'; | ||
export * from './ql'; | ||
export * from './settings'; | ||
export * from './uikit'; | ||
export * from './wizard'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export enum WorkbookPage { | ||
export enum WorkbookPageQa { | ||
ListItem = 'workbook-page-list-item', | ||
MenuDropDownBtn = 'workbook-page-list-item-menu-btn', | ||
MenuItemDuplicate = 'workbook-page-list-item-menu-item-duplicate', | ||
Filters = 'workbook-page-filters', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
tests/opensource-suites/collections/OpenCollectionsPage.test.tsx
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
tests/opensource-suites/collections/contentTableItemsLinks.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import {openTestPage} from '../../utils'; | ||
import datalensTest from '../../utils/playwright/globalTestDefinition'; | ||
import {CollectionsPagePO} from '../../page-objects/collections'; | ||
import {Workbook} from '../../page-objects/workbook/Workbook'; | ||
import {WorkbooksUrls, CollectionsUrls} from '../../constants/constants'; | ||
|
||
datalensTest.describe('Collections page', () => { | ||
datalensTest.describe('Content table', () => { | ||
datalensTest.beforeEach(async ({page}) => { | ||
await openTestPage(page, `/collections`); | ||
}); | ||
|
||
datalensTest('Workbook row link leads to workbook page', async ({page}) => { | ||
const {contentTable} = new CollectionsPagePO({page}); | ||
|
||
await contentTable.clickWorkbookRowLink(); | ||
|
||
await page.waitForURL(WorkbooksUrls.E2EWorkbook); | ||
|
||
const {filters} = new Workbook(page); | ||
|
||
await filters.waitForVisible(); | ||
}); | ||
|
||
datalensTest('Collection row link leads to collection page', async ({page}) => { | ||
const {contentTable, emptyState} = new CollectionsPagePO({page}); | ||
|
||
await contentTable.clickCollectionRowLink(); | ||
|
||
await page.waitForURL(CollectionsUrls.E2ECollection); | ||
|
||
await emptyState.waitForVisible(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import {BasePage} from '../BasePage'; | ||
import type {BasePageProps} from '../BasePage'; | ||
import {ContentTablePO} from './ContentTable'; | ||
import {EmptyStatePO} from './EmptyState'; | ||
|
||
type CollectionsPageProps = BasePageProps; | ||
|
||
export class CollectionsPagePO extends BasePage { | ||
private readonly root = '.dl-collections-navigation-layout'; | ||
|
||
constructor({page}: CollectionsPageProps) { | ||
super({page}); | ||
} | ||
|
||
get emptyState() { | ||
return new EmptyStatePO({ | ||
page: this.page, | ||
parent: this.root, | ||
}); | ||
} | ||
|
||
get contentTable() { | ||
return new ContentTablePO({ | ||
page: this.page, | ||
parent: this.root, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import {Page} from '@playwright/test'; | ||
import {CollectionContentTableQa} from '../../../src/shared'; | ||
import {slct} from '../../utils'; | ||
import {ElementPO} from '../common/abstract/ElementPO'; | ||
import {ContentTableRowPO} from './ContentTableRow'; | ||
|
||
type ContentTableProps = { | ||
page: Page; | ||
parent: string; | ||
}; | ||
|
||
export class ContentTablePO extends ElementPO { | ||
constructor({page, parent}: ContentTableProps) { | ||
super({ | ||
page, | ||
selectors: { | ||
root: slct(CollectionContentTableQa.Table), | ||
parent, | ||
}, | ||
}); | ||
} | ||
|
||
get collectionRow() { | ||
return new ContentTableRowPO({ | ||
page: this.page, | ||
selectors: { | ||
parent: this.getSelector(), | ||
root: slct(CollectionContentTableQa.CollectionLinkRow), | ||
}, | ||
}); | ||
} | ||
|
||
get workbookRow() { | ||
return new ContentTableRowPO({ | ||
page: this.page, | ||
selectors: { | ||
parent: this.getSelector(), | ||
root: slct(CollectionContentTableQa.WorkbookLinkRow), | ||
}, | ||
}); | ||
} | ||
|
||
async clickCollectionRowLink() { | ||
await this.collectionRow.clickRowLink(); | ||
} | ||
|
||
async clickWorkbookRowLink() { | ||
await this.workbookRow.clickRowLink(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import {CollectionContentTableQa} from '../../../src/shared'; | ||
import {ElementPO} from '../common/abstract/ElementPO'; | ||
import type {ElementPOProps} from '../common/abstract/types'; | ||
import {slct} from '../../utils'; | ||
|
||
type ContentTableRowProps = ElementPOProps; | ||
|
||
export class ContentTableRowPO extends ElementPO { | ||
constructor({page, selectors}: ContentTableRowProps) { | ||
super({page, selectors}); | ||
} | ||
|
||
get rowTitleCell() { | ||
return new ElementPO({ | ||
page: this.page, | ||
selectors: { | ||
parent: this.getSelector(), | ||
root: slct(CollectionContentTableQa.CollectionTitleCell), | ||
}, | ||
}); | ||
} | ||
|
||
async clickRowLink() { | ||
await this.rowTitleCell.click(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {Page} from '@playwright/test'; | ||
import {ElementPO} from '../common/abstract/ElementPO'; | ||
|
||
type EmptyStateProps = { | ||
page: Page; | ||
parent: string; | ||
}; | ||
|
||
export class EmptyStatePO extends ElementPO { | ||
constructor({page, parent}: EmptyStateProps) { | ||
super({ | ||
page, | ||
selectors: { | ||
root: '.dl-collection-content__empty-state', | ||
parent, | ||
}, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {CollectionsPagePO} from './CollectionsPage'; |
Oops, something went wrong.