diff --git a/.github/workflows/testcafe_tests.yml b/.github/workflows/testcafe_tests.yml index 0c406502a973..2f2a5e439cea 100644 --- a/.github/workflows/testcafe_tests.yml +++ b/.github/workflows/testcafe_tests.yml @@ -240,9 +240,7 @@ jobs: { "componentFolder": "dataGrid", "name": "dataGrid (1/4)", "indices": "1/4", "cache": true, "concurrency": 5 }, { "componentFolder": "dataGrid", "name": "dataGrid (2/4)", "indices": "2/4", "cache": true, "concurrency": 5 }, { "componentFolder": "dataGrid", "name": "dataGrid (3/4)", "indices": "3/4", "cache": true, "concurrency": 5 }, - { "componentFolder": "dataGrid", "name": "dataGrid (4/4)", "indices": "4/4", "cache": true, "concurrency": 5 }, - - { "componentFolder": "navigation", "name": "navigation", "concurrency": 6 } + { "componentFolder": "dataGrid", "name": "dataGrid (4/4)", "indices": "4/4", "cache": true, "concurrency": 5 } ] JSON ) diff --git a/e2e/playwright/helpers/clickUtils.ts b/e2e/playwright/helpers/clickUtils.ts new file mode 100644 index 000000000000..f7269444a4b9 --- /dev/null +++ b/e2e/playwright/helpers/clickUtils.ts @@ -0,0 +1,15 @@ +import type { Locator, Page } from '@playwright/test'; +import { pointWithin } from './dragUtils'; + +// TestCafe's "t.click(target, { offsetX, offsetY })" clicked the point even when it lay outside the +// target ("body" with offsetY: 400 on a shorter page), so this clicks the page point with the mouse +// instead of asking the target to receive the click. +export const clickWithOffset = async ( + page: Page, + target: Locator, + { offsetX, offsetY }: { offsetX?: number; offsetY?: number } = {}, +): Promise => { + const { x, y } = await pointWithin(target, offsetX, offsetY); + + await page.mouse.click(x, y); +}; diff --git a/e2e/playwright/helpers/domUtils.ts b/e2e/playwright/helpers/domUtils.ts index fc2c7ada802e..84eb7e2b102c 100644 --- a/e2e/playwright/helpers/domUtils.ts +++ b/e2e/playwright/helpers/domUtils.ts @@ -1,4 +1,5 @@ import type { Locator, Page } from '@playwright/test'; +import { expect } from '../fixtures'; const STYLESHEET_RULES_ID = 'stylesheetRules'; @@ -166,3 +167,11 @@ export const addFocusableElementAfter = async ( }, { selector: targetSelector, id: elementId }, ); + +export const expectImagesLoaded = async (container: Locator, count: number): Promise => { + const images = container.locator('img'); + + await expect(images).toHaveCount(count); + await expect.poll(() => images.evaluateAll((elements: HTMLImageElement[]) => elements + .every((image) => image.complete && image.naturalWidth > 0))).toBe(true); +}; diff --git a/e2e/playwright/helpers/dragUtils.ts b/e2e/playwright/helpers/dragUtils.ts index 68ad1e70c55f..58a88cfc5b9d 100644 --- a/e2e/playwright/helpers/dragUtils.ts +++ b/e2e/playwright/helpers/dragUtils.ts @@ -148,7 +148,7 @@ export const scrollIntoView = ( } }, { maxMargin: MAX_SCROLL_MARGIN, offsetX, offsetY }); -const pointWithin = async ( +export const pointWithin = async ( element: Locator, offsetX?: number, offsetY?: number, diff --git a/e2e/playwright/models/button.ts b/e2e/playwright/models/button.ts index 7b549bbb3232..828b211ff5ae 100644 --- a/e2e/playwright/models/button.ts +++ b/e2e/playwright/models/button.ts @@ -20,4 +20,8 @@ export default class Button extends Widget { public expectSelected(present = true): Promise { return this.expectClass(CLASS.selected, present); } + + public expectItemSelected(present = true): Promise { + return this.expectClass(CLASS.itemSelected, present); + } } diff --git a/e2e/playwright/models/buttonGroup.ts b/e2e/playwright/models/buttonGroup.ts new file mode 100644 index 000000000000..8fdd4f510285 --- /dev/null +++ b/e2e/playwright/models/buttonGroup.ts @@ -0,0 +1,24 @@ +import type { Locator, Page } from '@playwright/test'; +import type { WidgetName } from './types'; +import Widget from './internal/widget'; +import Button from './button'; + +const CLASS = { + item: 'dx-button', +}; + +export default class ButtonGroup extends Widget { + name: WidgetName = 'dxButtonGroup'; + + public readonly items: Locator; + + constructor(page: Page, selector: Locator | string) { + super(page, selector); + + this.items = this.element.locator(`.${CLASS.item}`); + } + + public getItem(index = 0): Button { + return new Button(this.page, this.items.nth(index)); + } +} diff --git a/e2e/playwright/models/gallery/index.ts b/e2e/playwright/models/gallery/index.ts new file mode 100644 index 000000000000..d2ef9a1548b9 --- /dev/null +++ b/e2e/playwright/models/gallery/index.ts @@ -0,0 +1,15 @@ +import type { WidgetName } from '../types'; +import Widget from '../internal/widget'; +import GalleryIndicatorItem from './indicatorItem'; + +const CLASS = { + indicatorItem: 'dx-gallery-indicator-item', +}; + +export default class Gallery extends Widget { + name: WidgetName = 'dxGallery'; + + public getIndicatorItem(index = 0): GalleryIndicatorItem { + return new GalleryIndicatorItem(this.element.locator(`.${CLASS.indicatorItem}`).nth(index)); + } +} diff --git a/e2e/playwright/models/gallery/indicatorItem.ts b/e2e/playwright/models/gallery/indicatorItem.ts new file mode 100644 index 000000000000..92e55050bd7f --- /dev/null +++ b/e2e/playwright/models/gallery/indicatorItem.ts @@ -0,0 +1,18 @@ +import type { Locator } from '@playwright/test'; +import { expectClass } from '../internal/classMatcher'; + +const CLASS = { + selected: 'dx-gallery-indicator-item-selected', +}; + +export default class GalleryIndicatorItem { + public readonly element: Locator; + + constructor(element: Locator) { + this.element = element; + } + + public expectSelected(present = true): Promise { + return expectClass(this.element, CLASS.selected, present); + } +} diff --git a/e2e/playwright/models/multiView.ts b/e2e/playwright/models/multiView.ts new file mode 100644 index 000000000000..689f2ee7685e --- /dev/null +++ b/e2e/playwright/models/multiView.ts @@ -0,0 +1,15 @@ +import type { WidgetName } from './types'; +import Widget from './internal/widget'; +import FocusableElement from './internal/focusable'; + +const CLASS = { + item: 'dx-multiview-item', +}; + +export default class MultiView extends Widget { + name: WidgetName = 'dxMultiView'; + + public getItem(index = 0): FocusableElement { + return new FocusableElement(this.element.locator(`.${CLASS.item}`).nth(index)); + } +} diff --git a/e2e/playwright/models/stepper.ts b/e2e/playwright/models/stepper.ts new file mode 100644 index 000000000000..614db9b826e1 --- /dev/null +++ b/e2e/playwright/models/stepper.ts @@ -0,0 +1,15 @@ +import type { Locator } from '@playwright/test'; +import type { WidgetName } from './types'; +import Widget from './internal/widget'; + +const CLASS = { + item: 'dx-step', +}; + +export default class Stepper extends Widget { + name: WidgetName = 'dxStepper'; + + public getItem(index = 0): Locator { + return this.element.locator(`.${CLASS.item}`).nth(index); + } +} diff --git a/e2e/playwright/models/tabPanel.ts b/e2e/playwright/models/tabPanel.ts index 01db5bfee732..fe7085239760 100644 --- a/e2e/playwright/models/tabPanel.ts +++ b/e2e/playwright/models/tabPanel.ts @@ -1,14 +1,30 @@ -import type { Locator } from '@playwright/test'; +import type { Locator, Page } from '@playwright/test'; import type { WidgetName } from './types'; import Widget from './internal/widget'; +import MultiView from './multiView'; +import Tabs from './tabs'; const CLASS = { tab: 'dx-tab', + tabsContainer: 'dx-tabpanel-tabs', + tabs: 'dx-tabs', }; export default class TabPanel extends Widget { name: WidgetName = 'dxTabPanel'; + public readonly tabs: Tabs; + + public readonly multiView: MultiView; + + constructor(page: Page, selector: Locator | string) { + super(page, selector); + + this.tabs = new Tabs(page, this.element.locator(`:scope > .${CLASS.tabsContainer} > .${CLASS.tabs}`)); + // TabPanel extends MultiView: its own element is the MultiView. + this.multiView = new MultiView(page, this.element); + } + public getTab(index = 0): Locator { return this.element.locator(`.${CLASS.tab}`).nth(index); } diff --git a/e2e/playwright/models/tabs.ts b/e2e/playwright/models/tabs.ts new file mode 100644 index 000000000000..4d519b6ebdaa --- /dev/null +++ b/e2e/playwright/models/tabs.ts @@ -0,0 +1,15 @@ +import type { WidgetName } from './types'; +import Widget from './internal/widget'; +import FocusableElement from './internal/focusable'; + +const CLASS = { + item: 'dx-tab', +}; + +export default class Tabs extends Widget { + name: WidgetName = 'dxTabs'; + + public getItem(index = 0): FocusableElement { + return new FocusableElement(this.element.locator(`.${CLASS.item}`).nth(index)); + } +} diff --git a/e2e/playwright/tests/editors/chat/avatar.spec.ts b/e2e/playwright/tests/editors/chat/avatar.spec.ts index 83f297d0ed10..406fa4c46072 100644 --- a/e2e/playwright/tests/editors/chat/avatar.spec.ts +++ b/e2e/playwright/tests/editors/chat/avatar.spec.ts @@ -1,10 +1,9 @@ import { test } from '../../../fixtures'; import { createWidget } from '../../../helpers/createWidget'; -import { appendElementTo } from '../../../helpers/domUtils'; +import { appendElementTo, expectImagesLoaded } from '../../../helpers/domUtils'; import { testScreenshot } from '../../../helpers/screenshots'; import Chat from '../../../models/chat'; import { avatarUrl, createUser, generateMessages } from './data'; -import { expectImagesLoaded } from './utils'; test.describe('ChatAvatar', () => { test('Chat: avatar', async ({ page }) => { diff --git a/e2e/playwright/tests/editors/chat/messageBubble.spec.ts b/e2e/playwright/tests/editors/chat/messageBubble.spec.ts index a7d472785ba5..336cd3200428 100644 --- a/e2e/playwright/tests/editors/chat/messageBubble.spec.ts +++ b/e2e/playwright/tests/editors/chat/messageBubble.spec.ts @@ -1,6 +1,6 @@ import { test } from '../../../fixtures'; import { createWidget } from '../../../helpers/createWidget'; -import { appendElementTo } from '../../../helpers/domUtils'; +import { appendElementTo, expectImagesLoaded } from '../../../helpers/domUtils'; import { testScreenshot } from '../../../helpers/screenshots'; import Chat from '../../../models/chat'; import { @@ -10,7 +10,6 @@ import { generateImageMessage, generateMessages, } from './data'; -import { expectImagesLoaded } from './utils'; test.describe('ChatMessageBubble', () => { test('Chat: messagebubble', async ({ page }) => { diff --git a/e2e/playwright/tests/editors/chat/utils.ts b/e2e/playwright/tests/editors/chat/utils.ts deleted file mode 100644 index a0981e5806ac..000000000000 --- a/e2e/playwright/tests/editors/chat/utils.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Locator } from '@playwright/test'; -import { expect } from '../../../fixtures'; - -export const expectImagesLoaded = async (container: Locator, count: number): Promise => { - const images = container.locator('img'); - - await expect(images).toHaveCount(count); - await expect.poll(() => images.evaluateAll((elements: HTMLImageElement[]) => elements - .every((image) => image.complete && image.naturalWidth > 0))).toBe(true); -}; diff --git a/e2e/playwright/tests/navigation/accordion/common.spec.ts b/e2e/playwright/tests/navigation/accordion/common.spec.ts new file mode 100644 index 000000000000..a7c972a5b38a --- /dev/null +++ b/e2e/playwright/tests/navigation/accordion/common.spec.ts @@ -0,0 +1,36 @@ +import type { Item } from 'devextreme/ui/accordion'; +import { test } from '../../../fixtures'; +import { createWidget } from '../../../helpers/createWidget'; +import { appendElementTo, setAttribute } from '../../../helpers/domUtils'; +import { testScreenshot } from '../../../helpers/screenshots'; + +test.describe('Accordion_common', () => { + test('Accordion items render (T865742)', async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'accordion'); + await appendElementTo(page, '#container', 'div', 'accordion2'); + + await setAttribute(page, '#container', 'style', 'display: flex; gap: 50px;'); + + const items: Item[] = [ + { title: 'Some text 1', icon: 'coffee' }, + { title: 'Some text 2' }, + { title: 'Some text 3' }, + ]; + + await createWidget(page, 'dxAccordion', { items, width: 500 }, '#accordion'); + await createWidget(page, 'dxAccordion', { items, rtlEnabled: true, width: 500 }, '#accordion2'); + + await testScreenshot(page, 'Accordion items render.png', { element: '#container' }); + }); + + test('Icon-only button should be rendered correctly (T851081)', async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'accordion'); + + await createWidget(page, 'dxAccordion', () => ({ + dataSource: [{}], + itemTitleTemplate: () => ($('
') as any).dxButton({ icon: 'coffee' }), + }), '#accordion'); + + await testScreenshot(page, 'Accordion with icon-only button.png', { element: '#container' }); + }); +}); diff --git a/e2e/playwright/tests/navigation/accordion/etalons/Accordion items render (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/accordion/etalons/Accordion items render (fluent-next.blue.light).png new file mode 100644 index 000000000000..877a546dba60 Binary files /dev/null and b/e2e/playwright/tests/navigation/accordion/etalons/Accordion items render (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/accordion/etalons/Accordion items render (fluent.blue.light).png b/e2e/playwright/tests/navigation/accordion/etalons/Accordion items render (fluent.blue.light).png new file mode 100644 index 000000000000..fb6f6cea1562 Binary files /dev/null and b/e2e/playwright/tests/navigation/accordion/etalons/Accordion items render (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/accordion/etalons/Accordion with icon-only button (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/accordion/etalons/Accordion with icon-only button (fluent-next.blue.light).png new file mode 100644 index 000000000000..b23c6de89b03 Binary files /dev/null and b/e2e/playwright/tests/navigation/accordion/etalons/Accordion with icon-only button (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/accordion/etalons/Accordion with icon-only button (fluent.blue.light).png b/e2e/playwright/tests/navigation/accordion/etalons/Accordion with icon-only button (fluent.blue.light).png new file mode 100644 index 000000000000..af9d7d86e9a2 Binary files /dev/null and b/e2e/playwright/tests/navigation/accordion/etalons/Accordion with icon-only button (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/common.spec.ts b/e2e/playwright/tests/navigation/button/common.spec.ts new file mode 100644 index 000000000000..9d1762dba81c --- /dev/null +++ b/e2e/playwright/tests/navigation/button/common.spec.ts @@ -0,0 +1,122 @@ +import type { ButtonType } from 'devextreme/common'; +import { test } from '../../../fixtures'; +import { createWidget } from '../../../helpers/createWidget'; +import { + addCaptionTo, + appendElementTo, + insertStylesheetRulesToPage, + setAttribute, + setClassAttribute, + setStyleAttribute, +} from '../../../helpers/domUtils'; +import { testScreenshot } from '../../../helpers/screenshots'; + +test.describe('Button', () => { + ['text', 'outlined', 'contained'].forEach((stylingMode) => { + const testName = `Buttons, stylingMode=${stylingMode}`; + + test(testName, async ({ page }) => { + const typedButtons = ['danger', 'default', 'normal', 'success'].map((type: ButtonType) => ({ + type, + text: `${type[0].toUpperCase()}${type.slice(1)}`, + })); + const iconButtons = [ + { icon: 'find', text: 'Find' }, + { icon: 'find' }, + { + icon: ` + + `, + }, + ]; + const buttons = [ + ...typedButtons, + ...iconButtons, + ]; + + await setAttribute(page, '#container', 'class', 'dx-theme-generic-typography'); + await setAttribute(page, '#container', 'style', 'width: fit-content; padding: 8px;'); + + const states = ['default', 'focused', 'hover', 'active', 'selected', 'disabled']; + + for (const state of states) { + await appendElementTo(page, '#container', 'div', `mode${state}`); + await setAttribute(page, `#mode${state}`, 'style', 'display: flex; gap: 8px; margin-bottom: 16px;'); + await addCaptionTo(page, `#mode${state}`, state); + + await Promise.all(buttons.map( + (_, index) => appendElementTo(page, `#mode${state}`, 'div', `button-${state}-${index}`), + )); + + await Promise.all(buttons.map( + (defaultConfig, index) => createWidget(page, 'dxButton', { + ...defaultConfig, + stylingMode, + disabled: state === 'disabled', + }, `#button-${state}-${index}`), + )); + + if (state !== 'default' && state !== 'disabled') { + await Promise.all( + buttons.map((_, index) => setClassAttribute(page, `#button-${state}-${index}`, `dx-state-${state}`)), + ); + } + } + + await testScreenshot(page, `${testName}.png`, { element: '#container' }); + }); + }); + + test('Button in rtl modes', async ({ page }) => { + await setAttribute(page, '#container', 'style', 'width: fit-content; padding: 8px; display: grid; grid-template-columns: repeat(3, auto); grid-gap: 16px;'); + + const buttons = [ + { icon: 'find', text: 'Button text' }, + { icon: 'find', text: 'Long button text' }, + { icon: 'find', text: 'Long button text', width: 150 }, + { icon: 'find', text: 'Button text', rtlEnabled: true }, + { icon: 'find', text: 'Long button text', rtlEnabled: true }, + { + icon: 'find', text: 'Long button text', width: 150, rtlEnabled: true, + }, + ]; + + await Promise.all(buttons.map( + (_, index) => appendElementTo(page, '#container', 'div', `button-${index}`), + )); + + await Promise.all(buttons.map( + (config, index) => createWidget(page, 'dxButton', { + ...config, + }, `#button-${index}`), + )); + + await testScreenshot(page, 'Button in rtl modes.png', { element: '#container' }); + }); + + test('Button: svg icon as background should be fit within icon element (T1178813)', async ({ page }) => { + await insertStylesheetRulesToPage(page, '.dx-icon-custom { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAB4klEQVR4nO3WTYiPURQG8N/M+ByEjQUxRQpJKSkhFigLo8jGQqGURDZY2CMpliI2PhZslLKxJBaUCCkUMxELja8pwoxuncW7mZn3fe9fb2meuqt7n+c8995z7zmMojVox1G81RDOYhBvmgi+LIKncakJA5cj+ABWNGHgQxg4pyG8xxmM/VcBVuMCXuIbenELe9GFiViH47iLd+jHq0jOBXUDT8a1QoINNX6OMP8Lx+KplkYnHoTARxyOnUzCHOzATXzHHzzHSWzATEzHRtwuGEnzpXExSA8xY5h1bZgwzHwHHodWStZSWBy76sMseTgQwb9gVVnSqSCle8vBuLi+pLWtCvFRkJZnGlgTOk+qEj8FcWqmgd2hc74q8UcQx2ca2BU66Q+phN4gzs40sDJ0XlT9A+4FcX2mgY4oz0nrSBXiiTofxxDYElVyIOpF+shGxNow0IMxLTCxJ37MpHm6DKENz4KwXWtwJ/T2lyXsLJzClMzg3YWaUlqrHfeDeCVOpQ464xUknX1VyYvwtXB3lZ5SrL8a/Kd1G5Zu/A6RVFqXxjFujl4w7e4zXkfvsBXTMA83gpeakyUysClEBmuM/uiWstEVPUJPXEvKj0NYGDVjPg5GtvdF+b2Oua0IPor/G38BnW+XcSzQwtUAAAAASUVORK5CYII="); }'); + + await setStyleAttribute(page, '#container', 'width: 300px; height: 200px;'); + await appendElementTo(page, '#container', 'div', 'button'); + await appendElementTo(page, '#container', 'div', 'fixedWidthButton'); + await appendElementTo(page, '#container', 'div', 'iconOnlyButton'); + + await createWidget(page, 'dxButton', { + text: 'svg icon', + icon: 'custom', + }, '#button'); + + await createWidget(page, 'dxButton', { + text: 'fixed width + svg icon', + icon: 'custom', + width: 200, + }, '#fixedWidthButton'); + + await createWidget(page, 'dxButton', { + icon: 'custom', + }, '#iconOnlyButton'); + + await testScreenshot(page, 'Button with svg icon as background.png', { element: '#container' }); + }); +}); diff --git a/e2e/playwright/tests/navigation/button/etalons/Button in rtl modes (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/Button in rtl modes (fluent-next.blue.light).png new file mode 100644 index 000000000000..ad09f4a3dd6f Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/Button in rtl modes (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/Button in rtl modes (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/Button in rtl modes (fluent.blue.light).png new file mode 100644 index 000000000000..516b1afe19a7 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/Button in rtl modes (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/Button with svg icon as background (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/Button with svg icon as background (fluent-next.blue.light).png new file mode 100644 index 000000000000..f8d6a44d5064 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/Button with svg icon as background (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/Button with svg icon as background (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/Button with svg icon as background (fluent.blue.light).png new file mode 100644 index 000000000000..fed4584e94c2 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/Button with svg icon as background (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=contained (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=contained (fluent-next.blue.light).png new file mode 100644 index 000000000000..b386a7505753 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=contained (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=contained (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=contained (fluent.blue.light).png new file mode 100644 index 000000000000..93d42b6bdc2d Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=contained (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=outlined (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=outlined (fluent-next.blue.light).png new file mode 100644 index 000000000000..b84e3e5b7f76 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=outlined (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=outlined (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=outlined (fluent.blue.light).png new file mode 100644 index 000000000000..124eedb7c2eb Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=outlined (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=text (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=text (fluent-next.blue.light).png new file mode 100644 index 000000000000..9a751d1d64da Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=text (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=text (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=text (fluent.blue.light).png new file mode 100644 index 000000000000..6bc093bb1499 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/Buttons, stylingMode=text (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='' (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='' (fluent-next.blue.light).png new file mode 100644 index 000000000000..030cd807d5d7 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='' (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='' (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='' (fluent.blue.light).png new file mode 100644 index 000000000000..058252e945f5 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='' (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='home' (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='home' (fluent-next.blue.light).png new file mode 100644 index 000000000000..b46f041938fe Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='home' (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='home' (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='home' (fluent.blue.light).png new file mode 100644 index 000000000000..bffa279bb214 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='home' (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='' (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='' (fluent-next.blue.light).png new file mode 100644 index 000000000000..f8c656ffbeef Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='' (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='' (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='' (fluent.blue.light).png new file mode 100644 index 000000000000..a960f2bec9cd Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='' (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='home' (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='home' (fluent-next.blue.light).png new file mode 100644 index 000000000000..e95a8f42e8e5 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='home' (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='home' (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='home' (fluent.blue.light).png new file mode 100644 index 000000000000..7afbf591eec6 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='home' (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is #grid, after scrolling (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is #grid, after scrolling (fluent-next.blue.light).png new file mode 100644 index 000000000000..88d18dd9ec78 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is #grid, after scrolling (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is #grid, after scrolling (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is #grid, after scrolling (fluent.blue.light).png new file mode 100644 index 000000000000..dc28edea4567 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is #grid, after scrolling (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is #grid, before scrolling (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is #grid, before scrolling (fluent-next.blue.light).png new file mode 100644 index 000000000000..1cb1d7759a24 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is #grid, before scrolling (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is #grid, before scrolling (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is #grid, before scrolling (fluent.blue.light).png new file mode 100644 index 000000000000..c105326090bc Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is #grid, before scrolling (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is undefined, after scrolling (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is undefined, after scrolling (fluent-next.blue.light).png new file mode 100644 index 000000000000..e796453935ea Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is undefined, after scrolling (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is undefined, after scrolling (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is undefined, after scrolling (fluent.blue.light).png new file mode 100644 index 000000000000..8329b765d0a0 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is undefined, after scrolling (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is undefined, before scrolling (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is undefined, before scrolling (fluent-next.blue.light).png new file mode 100644 index 000000000000..4050a4afbf05 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is undefined, before scrolling (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is undefined, before scrolling (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is undefined, before scrolling (fluent.blue.light).png new file mode 100644 index 000000000000..62b743b78f6c Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with grid, position.of is undefined, before scrolling (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='' (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='' (fluent-next.blue.light).png new file mode 100644 index 000000000000..5a8580c8bf20 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='' (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='' (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='' (fluent.blue.light).png new file mode 100644 index 000000000000..291564d6860b Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='' (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='home' (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='home' (fluent-next.blue.light).png new file mode 100644 index 000000000000..c2d49f9e9512 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='home' (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='home' (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='home' (fluent.blue.light).png new file mode 100644 index 000000000000..703dca622c46 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='home' (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='' (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='' (fluent-next.blue.light).png new file mode 100644 index 000000000000..681b05c03a67 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='' (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='' (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='' (fluent.blue.light).png new file mode 100644 index 000000000000..8e5e666004c6 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='' (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='home' (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='home' (fluent-next.blue.light).png new file mode 100644 index 000000000000..8b5141042ae0 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='home' (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='home' (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='home' (fluent.blue.light).png new file mode 100644 index 000000000000..3562bddaa094 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='home' (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with two speed dial action buttons (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with two speed dial action buttons (fluent-next.blue.light).png new file mode 100644 index 000000000000..5af41561de25 Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with two speed dial action buttons (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/etalons/FAB with two speed dial action buttons (fluent.blue.light).png b/e2e/playwright/tests/navigation/button/etalons/FAB with two speed dial action buttons (fluent.blue.light).png new file mode 100644 index 000000000000..94272e1f098f Binary files /dev/null and b/e2e/playwright/tests/navigation/button/etalons/FAB with two speed dial action buttons (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/button/floatingAction.spec.ts b/e2e/playwright/tests/navigation/button/floatingAction.spec.ts new file mode 100644 index 000000000000..56425d23227c --- /dev/null +++ b/e2e/playwright/tests/navigation/button/floatingAction.spec.ts @@ -0,0 +1,110 @@ +import type { Page } from '@playwright/test'; +import { test } from '../../../fixtures'; +import { createWidget } from '../../../helpers/createWidget'; +import { appendElementTo, insertStylesheetRulesToPage, setStyleAttribute } from '../../../helpers/domUtils'; +import { testScreenshot } from '../../../helpers/screenshots'; +import { isMaterial } from '../../../helpers/themeUtils'; + +const OVERLAY_CONTENT_CLASS = 'dx-overlay-content'; +const FA_MAIN_BUTTON_CLASS = 'dx-fa-button-main'; + +const setGlobalConfig = (page: Page): Promise => page.evaluate(() => { + (window as any).DevExpress.config({ + floatingActionButtonConfig: { + icon: 'edit', + shading: false, + position: { + of: '#container', + my: 'right bottom', + at: 'right bottom', + offset: '-16 -16', + }, + }, + }); +}); + +test.describe('FloatingAction - default theme', () => { + for (const label of ['Add Row', '']) { + for (const icon of ['home', '']) { + test(`FAB with two speed dial action buttons after opening, label: ${label}, icon: ${icon}`, async ({ page, theme }) => { + await setStyleAttribute(page, '#container', 'width: 300px; height: 300px;'); + await appendElementTo(page, '#container', 'div', 'speed-dial-action'); + await appendElementTo(page, '#container', 'div', 'speed-dial-action-trash'); + + await setGlobalConfig(page); + if (isMaterial(theme)) { + await insertStylesheetRulesToPage(page, '.dx-overlay-wrapper { font-family: sans-serif !important; }'); + } + + await createWidget(page, 'dxSpeedDialAction', { + label, + icon, + index: 1, + visible: true, + }, '#speed-dial-action'); + + await createWidget(page, 'dxSpeedDialAction', { + label: 'Remove Row', + icon: 'trash', + index: 2, + visible: true, + }, '#speed-dial-action-trash'); + + await page.locator('body').click(); + await page.locator(`.${FA_MAIN_BUTTON_CLASS} .${OVERLAY_CONTENT_CLASS}`).click(); + + await testScreenshot(page, `FAB is opened with two speed dial actions,label='${label}',icon='${icon}'.png`, { + element: '#container', + }); + }); + + test(`FAB with one speed dial action button, label: ${label}, icon: ${icon}`, async ({ page, theme }) => { + await setStyleAttribute(page, '#container', 'width: 300px; height: 300px;'); + if (isMaterial(theme)) { + await insertStylesheetRulesToPage(page, '.dx-overlay-wrapper { font-family: sans-serif !important; }'); + } + await appendElementTo(page, '#container', 'div', 'speed-dial-action'); + + await setGlobalConfig(page); + + await createWidget(page, 'dxSpeedDialAction', { + label, + icon, + visible: true, + }, '#speed-dial-action'); + + await testScreenshot(page, `FAB with one speed dial action button,label='${label}',icon='${icon}'.png`, { element: '#container' }); + }); + } + } + + test('FAB with two speed dial action buttons', async ({ page, theme }) => { + await setStyleAttribute(page, '#container', 'width: 300px; height: 300px;'); + if (isMaterial(theme)) { + await insertStylesheetRulesToPage(page, '.dx-overlay-wrapper { font-family: sans-serif !important; }'); + } + + await appendElementTo(page, '#container', 'div', 'speed-dial-action'); + await appendElementTo(page, '#container', 'div', 'speed-dial-action-trash'); + + await setGlobalConfig(page); + + await createWidget(page, 'dxSpeedDialAction', { + label: 'Add row', + icon: 'plus', + index: 1, + visible: true, + }, '#speed-dial-action'); + + await createWidget(page, 'dxSpeedDialAction', { + label: 'Remove Row', + icon: 'trash', + index: 2, + visible: true, + }, '#speed-dial-action-trash'); + + await testScreenshot(page, 'FAB with two speed dial action buttons.png', { + element: '#container', + }); + }); +}); diff --git a/e2e/playwright/tests/navigation/button/floatingActionInGrid.spec.ts b/e2e/playwright/tests/navigation/button/floatingActionInGrid.spec.ts new file mode 100644 index 000000000000..9ad5cbc584f4 --- /dev/null +++ b/e2e/playwright/tests/navigation/button/floatingActionInGrid.spec.ts @@ -0,0 +1,68 @@ +import type { Page } from '@playwright/test'; +import { expect, test } from '../../../fixtures'; +import { createWidget } from '../../../helpers/createWidget'; +import { appendElementTo } from '../../../helpers/domUtils'; +import { testScreenshot } from '../../../helpers/screenshots'; +import DataGrid from '../../../models/dataGrid'; + +const scrollWindowTo = (page: Page, position: ScrollToOptions): Promise => page.evaluate( + (scrollPosition) => { window.scroll(scrollPosition); }, + position, +); + +const generateData = (count: number): Record[] => { + const items: Record[] = []; + + for (let i = 0; i < count; i += 1) { + items.push({ + ID: i, + NAME: 'Name', + Full_Name: 'Full name', + }); + } + + return items; +}; + +test.describe('FloatingAction with Grid', () => { + test.use({ browserSize: [1000, 400] }); + + [undefined, '#grid'].forEach((positionOf) => { + test(`FAB with grid, position.of is ${positionOf}`, async ({ page }) => { + await page.evaluate(() => { + $('#container').wrap('
'); + }); + + await appendElementTo(page, '#container', 'div', 'grid'); + await appendElementTo(page, '#container', 'div', 'speed-dial-action'); + + await createWidget(page, 'dxDataGrid', { + dataSource: generateData(20), + }, '#grid'); + + await createWidget(page, 'dxSpeedDialAction', { + label: 'Add row', + icon: 'plus', + position: { + of: positionOf, + }, + }, '#speed-dial-action'); + + const dataGrid = new DataGrid(page, '#grid'); + + await expect.poll(() => dataGrid.isReady()).toBe(true); + + await page.evaluate(() => { + (window as any).DevExpress.ui.repaintFloatingActionButton(); + }); + + await testScreenshot(page, `FAB with grid, position.of is ${positionOf}, before scrolling.png`); + + await scrollWindowTo(page, { top: 10000000 }); + + await expect.poll(() => dataGrid.isReady()).toBe(true); + + await testScreenshot(page, `FAB with grid, position.of is ${positionOf}, after scrolling.png`); + }); + }); +}); diff --git a/e2e/playwright/tests/navigation/button/floatingActionViewport.spec.ts b/e2e/playwright/tests/navigation/button/floatingActionViewport.spec.ts new file mode 100644 index 000000000000..92a20bfbcd07 --- /dev/null +++ b/e2e/playwright/tests/navigation/button/floatingActionViewport.spec.ts @@ -0,0 +1,64 @@ +import type { Locator, Page } from '@playwright/test'; +import { expect, test } from '../../../fixtures'; +import { createWidget } from '../../../helpers/createWidget'; +import { appendElementTo } from '../../../helpers/domUtils'; + +const OVERLAY_CONTENT_CLASS = 'dx-overlay-content'; +const FA_MAIN_BUTTON_CLASS = 'dx-fa-button-main'; +const FAB_OFFSET = 16; + +const getViewportClientSize = (page: Page): Promise<{ width: number; height: number }> => page + .evaluate(() => ({ + width: document.documentElement.clientWidth, + height: document.documentElement.clientHeight, + })); + +const rectEdge = (element: Locator, edge: 'right' | 'bottom'): Promise => element + .evaluate((node, side) => node.getBoundingClientRect()[side], edge); + +const expectWithin = async ( + value: () => Promise, + from: number, + to: number, +): Promise => { + await expect.poll(value).toBeGreaterThanOrEqual(from); + await expect.poll(value).toBeLessThanOrEqual(to); +}; + +test.describe('FloatingAction - visible area', () => { + test('FAB should keep its offset from the visible area edges after scrollbars appear (T1334663)', async ({ page }) => { + await createWidget(page, 'dxSpeedDialAction', { + icon: 'add', + visible: true, + }); + + const fabContent = page.locator(`.${FA_MAIN_BUTTON_CLASS} .${OVERLAY_CONTENT_CLASS}`); + const initialSize = await getViewportClientSize(page); + + await expectWithin( + () => rectEdge(fabContent, 'right'), + initialSize.width - FAB_OFFSET - 1, + initialSize.width - FAB_OFFSET + 1, + ); + await expectWithin( + () => rectEdge(fabContent, 'bottom'), + initialSize.height - FAB_OFFSET - 1, + initialSize.height - FAB_OFFSET + 1, + ); + + await appendElementTo(page, '#container', 'div', 'tall-content', { width: '3000px', height: '3000px' }); + + const sizeWithScrollbars = await getViewportClientSize(page); + + await expectWithin( + () => rectEdge(fabContent, 'right'), + sizeWithScrollbars.width - FAB_OFFSET - 1, + sizeWithScrollbars.width - FAB_OFFSET + 1, + ); + await expectWithin( + () => rectEdge(fabContent, 'bottom'), + sizeWithScrollbars.height - FAB_OFFSET - 1, + sizeWithScrollbars.height - FAB_OFFSET + 1, + ); + }); +}); diff --git a/e2e/playwright/tests/navigation/buttonGroup/common.spec.ts b/e2e/playwright/tests/navigation/buttonGroup/common.spec.ts new file mode 100644 index 000000000000..77dc21a2cdb7 --- /dev/null +++ b/e2e/playwright/tests/navigation/buttonGroup/common.spec.ts @@ -0,0 +1,33 @@ +import type { ButtonType, Item } from 'devextreme/ui/button_group'; +import { test } from '../../../fixtures'; +import { createWidget } from '../../../helpers/createWidget'; +import { appendElementTo, setAttribute, setStyleAttribute } from '../../../helpers/domUtils'; +import { testScreenshot } from '../../../helpers/screenshots'; + +const typedItems: Item[] = ['danger', 'default', 'normal', 'success'].map((type: ButtonType) => ({ type, text: type })); +const iconItems: Item[] = [ + { icon: 'find', text: 'find' }, + { icon: 'find' }, +]; +const items: Item[] = [ + ...typedItems, + ...iconItems, +]; + +test.describe('ButtonGroup', () => { + test('ButtonGroup styling', async ({ page }) => { + await setStyleAttribute(page, '#container', 'width: fit-content; padding: 8px; display: flex; gap: 16px; flex-direction: column;'); + await setAttribute(page, '#container', 'class', 'dx-theme-generic-typography'); + + const stylingModes = ['text', 'outlined', 'contained']; + + await Promise.all(stylingModes.map((mode) => appendElementTo(page, '#container', 'div', `buttongroup-${mode}`))); + await Promise.all(stylingModes.map((stylingMode) => createWidget(page, 'dxButtonGroup', { + items, + stylingMode, + selectionMode: 'none', + }, `#buttongroup-${stylingMode}`))); + + await testScreenshot(page, 'ButtonGroup styling.png', { element: '#container' }); + }); +}); diff --git a/e2e/playwright/tests/navigation/buttonGroup/etalons/ButtonGroup styling (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/buttonGroup/etalons/ButtonGroup styling (fluent-next.blue.light).png new file mode 100644 index 000000000000..089d9b07b9b6 Binary files /dev/null and b/e2e/playwright/tests/navigation/buttonGroup/etalons/ButtonGroup styling (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/buttonGroup/etalons/ButtonGroup styling (fluent.blue.light).png b/e2e/playwright/tests/navigation/buttonGroup/etalons/ButtonGroup styling (fluent.blue.light).png new file mode 100644 index 000000000000..2a4a65b805ab Binary files /dev/null and b/e2e/playwright/tests/navigation/buttonGroup/etalons/ButtonGroup styling (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/buttonGroup/selection.spec.ts b/e2e/playwright/tests/navigation/buttonGroup/selection.spec.ts new file mode 100644 index 000000000000..61aa020a6051 --- /dev/null +++ b/e2e/playwright/tests/navigation/buttonGroup/selection.spec.ts @@ -0,0 +1,60 @@ +import { test } from '../../../fixtures'; +import { createWidget } from '../../../helpers/createWidget'; +import ButtonGroup from '../../../models/buttonGroup'; + +test.describe('ButtonGroup_Selection', () => { + test('selected class should not be added to the button after hovering (T1222079)', async ({ page }) => { + await createWidget(page, 'dxButtonGroup', { + items: [ + { text: 'Button_1' }, + { text: 'Button_2' }, + ], + selectedItemKeys: ['Button_1'], + disabled: true, + }); + + const buttonGroup = new ButtonGroup(page, '#container'); + + await buttonGroup.option('disabled', false); + + await buttonGroup.getItem(1).element.click(); + + await buttonGroup.getItem(1).expectSelected(); + await buttonGroup.getItem(1).expectItemSelected(); + + await buttonGroup.getItem(0).element.hover(); + + await buttonGroup.getItem(0).expectSelected(false); + await buttonGroup.getItem(0).expectItemSelected(false); + }); + + test('selected class should be set after reenabling (T1308601)', async ({ page }) => { + await createWidget(page, 'dxButtonGroup', { + items: [ + { text: 'Button_1' }, + { text: 'Button_2' }, + ], + selectedItemKeys: ['Button_1'], + }); + + const buttonGroup = new ButtonGroup(page, '#container'); + + await buttonGroup.option('disabled', true); + await buttonGroup.option('disabled', false); + + await buttonGroup.getItem(1).element.click(); + + await buttonGroup.option('disabled', true); + await buttonGroup.option('disabled', false); + + await buttonGroup.getItem(0).element.click(); + + await buttonGroup.getItem(0).expectSelected(); + await buttonGroup.getItem(0).expectItemSelected(); + + await buttonGroup.getItem(1).element.hover(); + + await buttonGroup.getItem(0).expectSelected(); + await buttonGroup.getItem(0).expectItemSelected(); + }); +}); diff --git a/e2e/playwright/tests/navigation/drawer/common.spec.ts b/e2e/playwright/tests/navigation/drawer/common.spec.ts new file mode 100644 index 000000000000..dd7a1d136544 --- /dev/null +++ b/e2e/playwright/tests/navigation/drawer/common.spec.ts @@ -0,0 +1,103 @@ +import type { Position } from 'devextreme/common'; +import type { OpenedStateMode } from 'devextreme/ui/drawer'; +import { test } from '../../../fixtures'; +import { testScreenshot } from '../../../helpers/screenshots'; +import { createDrawer } from './drawer.helpers'; + +test.describe('Drawer', () => { + test.use({ browserSize: [600, 600] }); + + ['overlap', 'shrink', 'push'].forEach((openedStateMode: OpenedStateMode) => { + const testName = `Drawer, openedStateMode=${openedStateMode}, shading=true`; + + test(testName, async ({ page }) => { + await createDrawer(page, { + options: { openedStateMode }, + }); + + await testScreenshot(page, `${testName}.png`); + }); + }); + + ['top', 'bottom', 'left', 'right'].forEach((position: Position) => { + const testName = `Drawer, position=${position}, shading=true`; + + test(testName, async ({ page }) => { + await createDrawer(page, { + options: { position }, + }); + + await testScreenshot(page, `${testName}.png`); + }); + }); + + test('Drawer hidden', async ({ page }) => { + await createDrawer(page, { + createOuterContent: () => ($container) => { + ($('
').appendTo($container) as any).dxButton({ + text: 'Hide Drawer', + onClick: () => ($(`#${$container.attr('id')} #drawer`) as any).dxDrawer('instance').hide(), + }); + }, + }); + + await page.locator('#container #hideDrawerBtn').click(); + + await testScreenshot(page, 'Drawer hidden.png'); + }); + + [{ + testCase: 'Menu inside drawer', + selector: '.dx-menu-item', + createDrawerContent: () => ($container: JQuery) => { + ($('
').appendTo($container) as any).dxMenu({ + dataSource: [{ text: 'item1 very long text wider than panel', items: [{ text: 'item1/item1 very long text wider than panel' }, { text: 'item1/item2' }] }], + }); + }, + }, { + testCase: 'SelectBox inside drawer', + selector: '.dx-texteditor-container', + createDrawerContent: () => ($container: JQuery) => { + ($('
').appendTo($container) as any).dxSelectBox({ + dataSource: ['item1 very long text wider than panel', 'item2'], + }); + }, + }, { + testCase: 'Menu outside drawer', + selector: '.dx-menu-item', + createOuterContent: () => ($container: JQuery) => { + ($('
').appendTo($container) as any).dxMenu({ + dataSource: [{ text: 'item1 very long text wider than panel', items: [{ text: 'item1/item1 very long text wider than panel' }, { text: 'item1/item2' }] }], + }); + }, + }, { + testCase: 'SelectBox outside drawer', + selector: '.dx-texteditor-container', + createOuterContent: () => ($container: JQuery) => { + ($('
').appendTo($container) as any).dxSelectBox({ + dataSource: ['item1 very long text wider than panel', 'item2'], + }); + }, + }].forEach(({ + testCase, createDrawerContent, createOuterContent, selector, + }) => { + const testName = `Drawer z-index, ${testCase}, shading=true`; + + test(testName, async ({ page }) => { + await createDrawer(page, { + createDrawerContent, + createOuterContent, + testInPopup: true, + }); + + await page.locator(`#container #content ${selector}`).click(); + + await testScreenshot(page, `${testName}_container.png`); + + await page.locator('#showPopupBtn').click(); + await page.locator(`#popup1_template #content ${selector}`).click(); + + await testScreenshot(page, `${testName}_popup.png`); + }); + }); +}); diff --git a/e2e/playwright/tests/navigation/drawer/drawer.helpers.ts b/e2e/playwright/tests/navigation/drawer/drawer.helpers.ts new file mode 100644 index 000000000000..ac8086ba0d66 --- /dev/null +++ b/e2e/playwright/tests/navigation/drawer/drawer.helpers.ts @@ -0,0 +1,104 @@ +import type { JSHandle, Page } from '@playwright/test'; +import type { Properties } from 'devextreme/ui/drawer'; + +type ContentRenderer = ($container: JQuery) => void; + +// "page.evaluate" does not pass functions, so a content renderer comes as a factory that runs in +// the page and gives back the renderer; its handle then reaches the page as the function itself. +type ContentRendererFactory = () => ContentRenderer; + +interface CreateDrawerConfig { + options?: Properties; + createDrawerContent?: ContentRendererFactory; + createOuterContent?: ContentRendererFactory; + testInPopup?: boolean; +} + +const toHandle = ( + page: Page, + factory: ContentRendererFactory | undefined, +): Promise | undefined> => ( + factory ? page.evaluateHandle(factory) : Promise.resolve(undefined) +); + +export const createDrawer = async (page: Page, { + options = {}, + createDrawerContent, + createOuterContent, + testInPopup = false, +}: CreateDrawerConfig): Promise => { + const drawerContentHandle = await toHandle(page, createDrawerContent); + const outerContentHandle = await toHandle(page, createOuterContent); + + await page.evaluate(({ + drawerOptions, drawerContent, outerContent, inPopup, + }) => { + const createDrawerInt = ($container: JQuery): void => { + if (outerContent) { + outerContent($container); + } + + const $drawer = $('
'); + const $templateView = $('
').appendTo($drawer); + + $('
') + .text('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Penatibus et magnis dis parturient. Eget dolor morbi non arcu risus. Tristique magna sit amet purus gravida quis blandit. Auctor urna nunc id cursus metus aliquam eleifend mi in.') + .appendTo($templateView); + + ($drawer.appendTo($container) as any).dxDrawer({ + opened: true, + shading: true, + height: 400, + template: () => { + const isTopOrBottom = drawerOptions.position === 'top' || drawerOptions.position === 'bottom'; + const cssSizeProperty = isTopOrBottom ? 'width' : 'height'; + + const $result = $('
') + .css('background-color', 'aqua') + .css(cssSizeProperty, '100%'); + + if (isTopOrBottom) { + $result.height('100px'); + } else { + $result.width('200px'); + } + + if (drawerContent) { + drawerContent($result); + } else { + $('
').text('Drawer Content').appendTo($result); + } + + return $result; + }, + ...drawerOptions, + }); + }; + + if (inPopup) { + ($('
').appendTo($('#container')) as any).dxButton({ + text: 'Show Popup', + onClick: () => ($('#popup1') as any).dxPopup('instance').show(), + }); + + ($('
').appendTo($('#container')) as any).dxPopup({ + position: 'top', + height: 600, + showTitle: false, + contentTemplate: () => { + const $popupTemplate = $('
').css('background-color', 'blanchedalmond').css('height', '100%'); + createDrawerInt($popupTemplate); + return $popupTemplate; + }, + }); + } + + createDrawerInt($('#container')); + }, { + // The full Properties type is too deep for the argument typing of "page.evaluate". + drawerOptions: options as Record, + drawerContent: drawerContentHandle, + outerContent: outerContentHandle, + inPopup: testInPopup, + }); +}; diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer hidden (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer hidden (fluent-next.blue.light).png new file mode 100644 index 000000000000..5cf7400f62eb Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer hidden (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer hidden (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer hidden (fluent.blue.light).png new file mode 100644 index 000000000000..c34b31b9af7e Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer hidden (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_container (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_container (fluent-next.blue.light).png new file mode 100644 index 000000000000..4d3c969d10be Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_container (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_container (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_container (fluent.blue.light).png new file mode 100644 index 000000000000..2152718f5504 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_container (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_popup (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_popup (fluent-next.blue.light).png new file mode 100644 index 000000000000..7bcad38ae515 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_popup (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_popup (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_popup (fluent.blue.light).png new file mode 100644 index 000000000000..3a7ed0a2a9db Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_popup (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_container (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_container (fluent-next.blue.light).png new file mode 100644 index 000000000000..56702bb6b547 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_container (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_container (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_container (fluent.blue.light).png new file mode 100644 index 000000000000..27c70a076cf3 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_container (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_popup (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_popup (fluent-next.blue.light).png new file mode 100644 index 000000000000..aceb369d1cbb Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_popup (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_popup (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_popup (fluent.blue.light).png new file mode 100644 index 000000000000..1191f1ccf70b Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_popup (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_container (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_container (fluent-next.blue.light).png new file mode 100644 index 000000000000..4c14e96bf101 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_container (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_container (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_container (fluent.blue.light).png new file mode 100644 index 000000000000..d8b9e84e6327 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_container (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_popup (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_popup (fluent-next.blue.light).png new file mode 100644 index 000000000000..679f18e8c233 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_popup (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_popup (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_popup (fluent.blue.light).png new file mode 100644 index 000000000000..34e9a0696ef2 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_popup (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_container (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_container (fluent-next.blue.light).png new file mode 100644 index 000000000000..3688abf8df39 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_container (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_container (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_container (fluent.blue.light).png new file mode 100644 index 000000000000..8a30fec9e317 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_container (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_popup (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_popup (fluent-next.blue.light).png new file mode 100644 index 000000000000..58ae7e9a3079 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_popup (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_popup (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_popup (fluent.blue.light).png new file mode 100644 index 000000000000..6ff9bb61a78c Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_popup (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=overlap, shading=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=overlap, shading=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..0c5ec002844d Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=overlap, shading=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=overlap, shading=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=overlap, shading=true (fluent.blue.light).png new file mode 100644 index 000000000000..5c55945e5fde Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=overlap, shading=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=push, shading=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=push, shading=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..a4bf47c59362 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=push, shading=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=push, shading=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=push, shading=true (fluent.blue.light).png new file mode 100644 index 000000000000..0481ff62fc03 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=push, shading=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=shrink, shading=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=shrink, shading=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..53c3c0b8f8b8 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=shrink, shading=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=shrink, shading=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=shrink, shading=true (fluent.blue.light).png new file mode 100644 index 000000000000..88a4390d4dc7 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, openedStateMode=shrink, shading=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=bottom, shading=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=bottom, shading=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..68ebfde52ac8 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=bottom, shading=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=bottom, shading=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=bottom, shading=true (fluent.blue.light).png new file mode 100644 index 000000000000..d8e0aefdddfa Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=bottom, shading=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=left, shading=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=left, shading=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..53c3c0b8f8b8 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=left, shading=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=left, shading=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=left, shading=true (fluent.blue.light).png new file mode 100644 index 000000000000..88a4390d4dc7 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=left, shading=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=right, shading=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=right, shading=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..6d28987cb407 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=right, shading=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=right, shading=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=right, shading=true (fluent.blue.light).png new file mode 100644 index 000000000000..6243895af3fb Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=right, shading=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=top, shading=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=top, shading=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..f67bc55db402 Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=top, shading=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=top, shading=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=top, shading=true (fluent.blue.light).png new file mode 100644 index 000000000000..8d30a42d154b Binary files /dev/null and b/e2e/playwright/tests/navigation/drawer/etalons/Drawer, position=top, shading=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/gallery/common.spec.ts b/e2e/playwright/tests/navigation/gallery/common.spec.ts new file mode 100644 index 000000000000..033254f86f96 --- /dev/null +++ b/e2e/playwright/tests/navigation/gallery/common.spec.ts @@ -0,0 +1,54 @@ +import { test } from '../../../fixtures'; +import { createWidget } from '../../../helpers/createWidget'; +import { expectImagesLoaded, setAttribute } from '../../../helpers/domUtils'; +import { testScreenshot } from '../../../helpers/screenshots'; +import Gallery from '../../../models/gallery'; + +const YELLOW_PIXEL = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAMSURBVBhXYzi8wA8AA9sBsq0bEHsAAAAASUVORK5CYII='; +const BLACK_PIXEL = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAMSURBVBhXY1hSWg4AA1EBkakDs38AAAAASUVORK5CYII='; +const RED_PIXEL = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAMSURBVBhXY/i5aQsABQcCYPaWuk8AAAAASUVORK5CYII='; + +test.describe('Click on indicator', () => { + test('click on indicator item should change selected item', async ({ page }) => { + await createWidget(page, 'dxGallery', { + height: 300, + showIndicator: true, + items: [BLACK_PIXEL, RED_PIXEL, YELLOW_PIXEL], + }); + + const gallery = new Gallery(page, '#container'); + const secondIndicatorItem = gallery.getIndicatorItem(1); + + await secondIndicatorItem.element.click(); + await secondIndicatorItem.expectSelected(); + }); + + [true, false].forEach((showIndicator) => { + test(`Gallery. Check normal and focus state. showIndicator=${showIndicator}`, async ({ page }) => { + await createWidget(page, 'dxGallery', (options: { showIndicator: boolean; items: string[] }) => ({ + height: 110, + ...options, + itemTemplate(item: string) { + const result = $('
'); + + $('') + .attr({ src: item }) + .height(100) + .width(100) + .appendTo(result); + + return result; + }, + }), '#container', { arg: { showIndicator, items: [BLACK_PIXEL, RED_PIXEL, YELLOW_PIXEL] } }); + + await setAttribute(page, '#container', 'style', 'width: 120px; height: 120px;'); + + await expectImagesLoaded(page.locator('#container'), 3); + await testScreenshot(page, `Gallery. showIndicator=${showIndicator}.png`, { element: '#container' }); + + await page.locator('#container').click(); + + await testScreenshot(page, `Focused gallery. showIndicator=${showIndicator}.png`, { element: '#container' }); + }); + }); +}); diff --git a/e2e/playwright/tests/navigation/gallery/etalons/Focused gallery. showIndicator=false (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/gallery/etalons/Focused gallery. showIndicator=false (fluent-next.blue.light).png new file mode 100644 index 000000000000..95de1c4cf043 Binary files /dev/null and b/e2e/playwright/tests/navigation/gallery/etalons/Focused gallery. showIndicator=false (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/gallery/etalons/Focused gallery. showIndicator=false (fluent.blue.light).png b/e2e/playwright/tests/navigation/gallery/etalons/Focused gallery. showIndicator=false (fluent.blue.light).png new file mode 100644 index 000000000000..95de1c4cf043 Binary files /dev/null and b/e2e/playwright/tests/navigation/gallery/etalons/Focused gallery. showIndicator=false (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/gallery/etalons/Focused gallery. showIndicator=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/gallery/etalons/Focused gallery. showIndicator=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..d6e100493b41 Binary files /dev/null and b/e2e/playwright/tests/navigation/gallery/etalons/Focused gallery. showIndicator=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/gallery/etalons/Focused gallery. showIndicator=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/gallery/etalons/Focused gallery. showIndicator=true (fluent.blue.light).png new file mode 100644 index 000000000000..7862afd40ab7 Binary files /dev/null and b/e2e/playwright/tests/navigation/gallery/etalons/Focused gallery. showIndicator=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/gallery/etalons/Gallery. showIndicator=false (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/gallery/etalons/Gallery. showIndicator=false (fluent-next.blue.light).png new file mode 100644 index 000000000000..dd64b0f4b0c0 Binary files /dev/null and b/e2e/playwright/tests/navigation/gallery/etalons/Gallery. showIndicator=false (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/gallery/etalons/Gallery. showIndicator=false (fluent.blue.light).png b/e2e/playwright/tests/navigation/gallery/etalons/Gallery. showIndicator=false (fluent.blue.light).png new file mode 100644 index 000000000000..dd64b0f4b0c0 Binary files /dev/null and b/e2e/playwright/tests/navigation/gallery/etalons/Gallery. showIndicator=false (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/gallery/etalons/Gallery. showIndicator=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/gallery/etalons/Gallery. showIndicator=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..d6e100493b41 Binary files /dev/null and b/e2e/playwright/tests/navigation/gallery/etalons/Gallery. showIndicator=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/gallery/etalons/Gallery. showIndicator=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/gallery/etalons/Gallery. showIndicator=true (fluent.blue.light).png new file mode 100644 index 000000000000..7862afd40ab7 Binary files /dev/null and b/e2e/playwright/tests/navigation/gallery/etalons/Gallery. showIndicator=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/common.spec.ts b/e2e/playwright/tests/navigation/stepper/common.spec.ts new file mode 100644 index 000000000000..87d39e922479 --- /dev/null +++ b/e2e/playwright/tests/navigation/stepper/common.spec.ts @@ -0,0 +1,165 @@ +import type { Item } from 'devextreme/ui/stepper'; +import { test } from '../../../fixtures'; +import { createWidget } from '../../../helpers/createWidget'; +import { appendElementTo, setAttribute } from '../../../helpers/domUtils'; +import { testScreenshot } from '../../../helpers/screenshots'; +import Stepper from '../../../models/stepper'; + +const commonItems: Item[] = [ + { icon: 'cart', label: 'Cart' }, + { icon: 'clipboardtasklist', label: 'Shipping Info' }, + { icon: 'gift', label: 'Promo Code', optional: true }, + { icon: 'packagebox', label: 'Checkout' }, + { icon: 'checkmarkcircle', label: 'Ordered' }, +]; + +test.describe('Stepper_common', () => { + ['horizontal', 'vertical'].forEach((orientation) => { + test(`Stepper common properties (orientation=${orientation})`, async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'stepper'); + await appendElementTo(page, '#container', 'div', 'stepper2'); + + const containerStyle = orientation === 'horizontal' ? 'width: 800px; flex-direction: column;' : 'height: 600px; width: 400px'; + await setAttribute(page, '#container', 'style', `display: flex; gap: 40px; ${containerStyle}`); + + const stepperOptions = { + selectedIndex: 4, + orientation, + dataSource: commonItems, + }; + + const stepperRTLOptions = { + ...stepperOptions, + rtlEnabled: true, + }; + + await createWidget(page, 'dxStepper', stepperOptions, '#stepper'); + await createWidget(page, 'dxStepper', stepperRTLOptions, '#stepper2'); + + await testScreenshot(page, `Stepper orient=${orientation}.png`, { + element: '#container', + }); + }); + }); + + test('Stepper text overflow in horizontal orientation', async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'stepper'); + await setAttribute(page, '#container', 'style', 'width: 200px; height: 150px; overflow: auto;'); + + await appendElementTo(page, '#otherContainer', 'div', 'stepper2'); + await setAttribute(page, '#otherContainer', 'style', 'width: 400px; height: 150px; overflow: auto;'); + + await setAttribute(page, '#parentContainer', 'style', 'width: 400px;'); + + const stepperOptions = { + dataSource: commonItems, + }; + + await createWidget(page, 'dxStepper', stepperOptions, '#stepper'); + await createWidget(page, 'dxStepper', stepperOptions, '#stepper2'); + + await testScreenshot(page, 'Stepper text overflow orient=horizontal.png', { element: '#parentContainer' }); + }); + + test('Stepper text overflow in vertical orientation', async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'stepper'); + await appendElementTo(page, '#container', 'div', 'stepper2'); + await setAttribute(page, '#container', 'style', 'display: flex; gap: 40px; width: 400px'); + + const stepperOptions = { + dataSource: commonItems, + width: 120, + height: 400, + orientation: 'vertical', + }; + + const stepperRTLOptions = { + ...stepperOptions, + rtlEnabled: true, + }; + + await createWidget(page, 'dxStepper', stepperOptions, '#stepper'); + await createWidget(page, 'dxStepper', stepperRTLOptions, '#stepper2'); + + await testScreenshot(page, 'Stepper text overflow orient=vertical.png', { element: '#container' }); + }); + + [true, false].forEach((selectOnFocus) => { + test(`Stepper item states (selectOnFocus=${selectOnFocus})`, async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'stepper'); + await setAttribute(page, '#container', 'style', 'width: 800px; height: 150px;'); + + const dataSource: Item[] = [ + { label: 'Default' }, + { label: 'Valid', isValid: true, optional: true }, + { label: 'Invalid', isValid: false, optional: true }, + { + label: 'Disabled', icon: 'packagebox', disabled: true, optional: true, + }, + { label: 'Disabled Valid', disabled: true, isValid: true }, + { label: 'Disabled Invalid', disabled: true, isValid: false }, + { label: 'With Text', text: 'T', optional: true }, + ]; + + await createWidget(page, 'dxStepper', { + selectOnFocus, + dataSource, + }, '#stepper'); + + const state = selectOnFocus ? 'selected' : 'focused'; + + await page.keyboard.press('Tab'); + + await testScreenshot(page, `Stepper 1st step selected,selectOnFocus=${selectOnFocus}.png`, { element: '#stepper' }); + + await page.keyboard.press('ArrowRight'); + await testScreenshot(page, `Stepper valid step ${state},selectOnFocus=${selectOnFocus}.png`, { element: '#stepper' }); + + await page.keyboard.press('ArrowRight'); + await testScreenshot(page, `Stepper invalid step ${state},selectOnFocus=${selectOnFocus}.png`, { element: '#stepper' }); + + await page.keyboard.press('ArrowRight'); + await testScreenshot(page, `Stepper disabled step focused,selectOnFocus=${selectOnFocus}.png`, { element: '#stepper' }); + + await page.keyboard.press('ArrowRight'); + await testScreenshot(page, `Stepper disabled valid step focused,selectOnFocus=${selectOnFocus}.png`, { element: '#stepper' }); + + await page.keyboard.press('ArrowRight'); + await testScreenshot(page, `Stepper disabled invalid step focused,selectOnFocus=${selectOnFocus}.png`, { element: '#stepper' }); + + await page.keyboard.press('ArrowRight'); + await testScreenshot(page, `Stepper last step ${state},selectOnFocus=${selectOnFocus}.png`, { element: '#stepper' }); + }); + }); + + test('Stepper completed item states', async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'stepper'); + await setAttribute(page, '#container', 'style', 'width: 800px; height: 150px;'); + + const dataSource: Item[] = [ + { label: 'Default' }, + { label: 'Valid', isValid: true, optional: true }, + { label: 'Invalid', isValid: false, optional: true }, + { label: 'With Text', text: 'T', optional: true }, + ]; + + await createWidget(page, 'dxStepper', { + selectOnFocus: false, + dataSource, + selectedIndex: 3, + }, '#stepper'); + + const stepper = new Stepper(page, '#container'); + + await stepper.getItem(3).click(); + + await page.keyboard.press('ArrowLeft'); + await testScreenshot(page, 'Completed invalid step focused.png', { element: '#stepper' }); + + await page.keyboard.press('ArrowLeft'); + await testScreenshot(page, 'Completed valid step focused.png', { element: '#stepper' }); + + await page.keyboard.press('ArrowLeft'); + await testScreenshot(page, 'Completed step focused.png', { element: '#stepper' }); + }); +}); diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Completed invalid step focused (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Completed invalid step focused (fluent-next.blue.light).png new file mode 100644 index 000000000000..e7952acb7ef5 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Completed invalid step focused (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Completed invalid step focused (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Completed invalid step focused (fluent.blue.light).png new file mode 100644 index 000000000000..cad519912c7b Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Completed invalid step focused (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Completed step focused (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Completed step focused (fluent-next.blue.light).png new file mode 100644 index 000000000000..3ec81216c63b Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Completed step focused (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Completed step focused (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Completed step focused (fluent.blue.light).png new file mode 100644 index 000000000000..664c6d62bd2a Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Completed step focused (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Completed valid step focused (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Completed valid step focused (fluent-next.blue.light).png new file mode 100644 index 000000000000..d6ff50ebbe45 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Completed valid step focused (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Completed valid step focused (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Completed valid step focused (fluent.blue.light).png new file mode 100644 index 000000000000..17d279984fd1 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Completed valid step focused (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=false (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=false (fluent-next.blue.light).png new file mode 100644 index 000000000000..4e52aa713dd9 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=false (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=false (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=false (fluent.blue.light).png new file mode 100644 index 000000000000..6e41446a1782 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=false (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..4e52aa713dd9 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=true (fluent.blue.light).png new file mode 100644 index 000000000000..6e41446a1782 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=false (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=false (fluent-next.blue.light).png new file mode 100644 index 000000000000..186ed25d7d65 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=false (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=false (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=false (fluent.blue.light).png new file mode 100644 index 000000000000..6a7fe20a27d4 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=false (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..7979e07c9bd6 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=true (fluent.blue.light).png new file mode 100644 index 000000000000..d422cb00c78d Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=false (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=false (fluent-next.blue.light).png new file mode 100644 index 000000000000..e496e1d9e9f3 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=false (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=false (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=false (fluent.blue.light).png new file mode 100644 index 000000000000..c824e4b07a8a Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=false (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..44d6da0af83f Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=true (fluent.blue.light).png new file mode 100644 index 000000000000..70cb0e8f5701 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=false (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=false (fluent-next.blue.light).png new file mode 100644 index 000000000000..383e448218f7 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=false (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=false (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=false (fluent.blue.light).png new file mode 100644 index 000000000000..84fcb1f6eee7 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=false (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..6c9f2e49cbb1 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=true (fluent.blue.light).png new file mode 100644 index 000000000000..a709f7677312 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper invalid step focused,selectOnFocus=false (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper invalid step focused,selectOnFocus=false (fluent-next.blue.light).png new file mode 100644 index 000000000000..fb6b2c6c943c Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper invalid step focused,selectOnFocus=false (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper invalid step focused,selectOnFocus=false (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper invalid step focused,selectOnFocus=false (fluent.blue.light).png new file mode 100644 index 000000000000..e756d59627c7 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper invalid step focused,selectOnFocus=false (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper invalid step selected,selectOnFocus=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper invalid step selected,selectOnFocus=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..fb62c7d48598 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper invalid step selected,selectOnFocus=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper invalid step selected,selectOnFocus=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper invalid step selected,selectOnFocus=true (fluent.blue.light).png new file mode 100644 index 000000000000..a7a55549e7e2 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper invalid step selected,selectOnFocus=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper last step focused,selectOnFocus=false (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper last step focused,selectOnFocus=false (fluent-next.blue.light).png new file mode 100644 index 000000000000..ec930da58eb4 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper last step focused,selectOnFocus=false (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper last step focused,selectOnFocus=false (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper last step focused,selectOnFocus=false (fluent.blue.light).png new file mode 100644 index 000000000000..a092791f33e3 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper last step focused,selectOnFocus=false (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper last step selected,selectOnFocus=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper last step selected,selectOnFocus=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..0ace050043a0 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper last step selected,selectOnFocus=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper last step selected,selectOnFocus=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper last step selected,selectOnFocus=true (fluent.blue.light).png new file mode 100644 index 000000000000..068b0d145398 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper last step selected,selectOnFocus=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper orient=horizontal (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper orient=horizontal (fluent-next.blue.light).png new file mode 100644 index 000000000000..61be5ccc76c8 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper orient=horizontal (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper orient=horizontal (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper orient=horizontal (fluent.blue.light).png new file mode 100644 index 000000000000..9b43b016a6ed Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper orient=horizontal (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper orient=vertical (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper orient=vertical (fluent-next.blue.light).png new file mode 100644 index 000000000000..658f6327752b Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper orient=vertical (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper orient=vertical (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper orient=vertical (fluent.blue.light).png new file mode 100644 index 000000000000..c395448bb58a Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper orient=vertical (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper text overflow orient=horizontal (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper text overflow orient=horizontal (fluent-next.blue.light).png new file mode 100644 index 000000000000..093f674cd081 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper text overflow orient=horizontal (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper text overflow orient=horizontal (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper text overflow orient=horizontal (fluent.blue.light).png new file mode 100644 index 000000000000..db20554e54e2 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper text overflow orient=horizontal (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper text overflow orient=vertical (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper text overflow orient=vertical (fluent-next.blue.light).png new file mode 100644 index 000000000000..207a64d9c075 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper text overflow orient=vertical (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper text overflow orient=vertical (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper text overflow orient=vertical (fluent.blue.light).png new file mode 100644 index 000000000000..9116afdce60d Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper text overflow orient=vertical (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper valid step focused,selectOnFocus=false (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper valid step focused,selectOnFocus=false (fluent-next.blue.light).png new file mode 100644 index 000000000000..374f1bdf3c96 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper valid step focused,selectOnFocus=false (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper valid step focused,selectOnFocus=false (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper valid step focused,selectOnFocus=false (fluent.blue.light).png new file mode 100644 index 000000000000..b601d472fda6 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper valid step focused,selectOnFocus=false (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper valid step selected,selectOnFocus=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper valid step selected,selectOnFocus=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..76d5ecd90ce8 Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper valid step selected,selectOnFocus=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/stepper/etalons/Stepper valid step selected,selectOnFocus=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/stepper/etalons/Stepper valid step selected,selectOnFocus=true (fluent.blue.light).png new file mode 100644 index 000000000000..96f78acb167b Binary files /dev/null and b/e2e/playwright/tests/navigation/stepper/etalons/Stepper valid step selected,selectOnFocus=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/common.spec.ts b/e2e/playwright/tests/navigation/tabPanel/common.spec.ts new file mode 100644 index 000000000000..758ae63259ad --- /dev/null +++ b/e2e/playwright/tests/navigation/tabPanel/common.spec.ts @@ -0,0 +1,330 @@ +import type { Item } from 'devextreme/ui/tab_panel'; +import { test } from '../../../fixtures'; +import { createWidget } from '../../../helpers/createWidget'; +import { appendElementTo, insertStylesheetRulesToPage, setAttribute } from '../../../helpers/domUtils'; +import { testScreenshot } from '../../../helpers/screenshots'; +import TabPanel from '../../../models/tabPanel'; + +const TABS_RIGHT_NAV_BUTTON_CLASS = 'dx-tabs-nav-button-right'; +const TABS_LEFT_NAV_BUTTON_CLASS = 'dx-tabs-nav-button-left'; + +test.describe('TabPanel_common', () => { + ['with scrolling', 'without scrolling'].forEach((mode) => { + const testName = `TabPanel borders ${mode}`; + + test(testName, async ({ page }) => { + const dataSource: Item[] = [ + { + title: 'John Heart', + text: 'John Heart', + }, { + title: 'Olivia Peyton', + text: 'Olivia Peyton', + }, { + title: 'Robert Reagan', + text: 'Robert Reagan', + }, { + title: 'Greta Sims', + text: 'Greta Sims', + }, { + title: 'Olivia Peyton', + text: 'Olivia Peyton', + }, + ]; + + await createWidget(page, 'dxTabPanel', (options: { dataSource: Item[]; width: number }) => ({ + ...options, + itemTemplate: (_, __, itemElement) => { + ($('
').css('marginTop', '10px') as any) + .dxTabs({ + items: [ + { + title: 'John Heart', + text: 'John Heart', + }, { + title: 'Olivia Peyton', + text: 'Olivia Peyton', + }, { + title: 'Robert Reagan', + text: 'Robert Reagan', + }, { + title: 'Greta Sims', + text: 'Greta Sims', + }, { + title: 'Olivia Peyton', + text: 'Olivia Peyton', + }, + ], + width: 300, + showNavButtons: true, + }) + .appendTo(itemElement); + }, + height: 120, + showNavButtons: true, + }), '#container', { arg: { dataSource, width: mode === 'with scrolling' ? 300 : 900 } }); + + await testScreenshot(page, `${testName}.png`, { element: '#container' }); + }); + }); + + test('TabPanel text-overflow with tabsPosition left', async ({ page }) => { + const dataSource: Item[] = [ + { icon: 'user', text: 'John Heart', title: 'John Heart' }, + { icon: 'user', text: 'Marina Elizabeth Thomas Grace Sophia', title: 'Mariya Elizabeth Thomas Grace Sophia' }, + { icon: 'user', text: 'Robert Reagan', title: 'Robert Reagan' }, + { icon: 'user', text: 'Greta Sims', title: 'Greta Sims' }, + ]; + + await createWidget(page, 'dxTabPanel', { + dataSource, + width: 600, + height: 250, + tabsPosition: 'left', + showNavButtons: true, + }); + + await testScreenshot(page, 'TabPanel text-overflow when tabsPosition is left.png', { element: '#container' }); + + await setAttribute(page, '.dx-tabs-wrapper', 'style', 'max-width: 130px;'); + + await testScreenshot(page, 'TabPanel text-overflow when tabs wrapper width is limited.png', { element: '#container' }); + }); + + test('TabPanel focus borders after change selectedIndex in runtime', async ({ page }) => { + const dataSource: Item[] = [ + { + title: 'John Heart', + text: 'John Heart', + }, { + title: 'Olivia Peyton', + text: 'Olivia Peyton', + }, { + title: 'Robert Reagan', + text: 'Robert Reagan', + }, { + title: 'Greta Sims', + text: 'Greta Sims', + }, { + title: 'Olivia Peyton', + text: 'Olivia Peyton', + }, + ]; + + await createWidget(page, 'dxTabPanel', { + dataSource, + height: 120, + width: 300, + }); + + const tabPanel = new TabPanel(page, '#container'); + await tabPanel.option('selectedIndex', 1); + + await testScreenshot(page, 'TabPanel focus borders.png', { element: '#container' }); + }); + + test('TabPanel navigation buttons hover', async ({ page }) => { + const dataSource: Item[] = [ + { + title: 'John Heart', + text: 'John Heart', + }, { + title: 'Olivia Peyton', + text: 'Olivia Peyton', + }, { + title: 'Robert Reagan', + text: 'Robert Reagan', + }, { + title: 'Greta Sims', + text: 'Greta Sims', + }, { + title: 'Olivia Peyton', + text: 'Olivia Peyton', + }, + ]; + + await createWidget(page, 'dxTabPanel', { + dataSource, + height: 120, + width: 400, + showNavButtons: true, + selectedIndex: 2, + useInkRipple: false, + }); + + const rightNavButton = page.locator(`.${TABS_RIGHT_NAV_BUTTON_CLASS}`); + await rightNavButton.click(); + await rightNavButton.hover(); + + await testScreenshot(page, 'TabPanel right navigation button hovered.png', { element: '#container' }); + + const leftNavButton = page.locator(`.${TABS_LEFT_NAV_BUTTON_CLASS}`); + await leftNavButton.hover(); + + await testScreenshot(page, 'TabPanel left navigation button hovered.png', { element: '#container' }); + }); + + ['top', 'right', 'bottom', 'left'].forEach((tabsPosition) => { + const testName = `TabPanel without focus,tabsPosition=${tabsPosition}`; + + test(testName, async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'tabpanel'); + await appendElementTo(page, '#container', 'div', 'tabpanel-rtl'); + await setAttribute(page, '#container', 'style', 'display: flex; gap: 40px; flex-direction: column; width: fit-content;'); + + const dataSource: Item[] = [ + { + title: 'John Heart', + text: 'John Heart', + }, { + title: 'Olivia Peyton', + text: 'Olivia Peyton', + }, { + title: 'Robert Reagan', + text: 'Robert Reagan', + }, { + title: 'Greta Sims', + text: 'Greta Sims', + }, { + title: 'Olivia Peyton', + text: 'Olivia Peyton', + }, + ]; + + const tabPanelOptions = { + dataSource, + height: 250, + width: 450, + tabsPosition, + useInkRipple: false, + }; + + await createWidget(page, 'dxTabPanel', tabPanelOptions, '#tabpanel'); + await createWidget(page, 'dxTabPanel', { ...tabPanelOptions, rtlEnabled: true }, '#tabpanel-rtl'); + + await testScreenshot(page, `${testName}.png`, { element: '#container' }); + }); + }); + + test('TabPanel item focus when clicking on multiview', async ({ page }) => { + const dataSource: Item[] = [ + { + title: 'John Heart', + text: 'John Heart', + }, { + title: 'Olivia Peyton', + text: 'Olivia Peyton', + }, { + title: 'Robert Reagan', + text: 'Robert Reagan', + }, { + title: 'Greta Sims', + text: 'Greta Sims', + }, { + title: 'Olivia Peyton', + text: 'Olivia Peyton', + }, + ]; + + await createWidget(page, 'dxTabPanel', { + dataSource, + height: 250, + width: 450, + useInkRipple: false, + }); + + const tabPanel = new TabPanel(page, '#container'); + await tabPanel.multiView.element.click(); + await testScreenshot(page, 'TabPanel item focus when clicking on multiview.png', { element: '#container' }); + }); + + const positions = ['top', 'left', 'right', 'bottom']; + + positions.forEach((tabsPosition) => { + test(`TabPanel border appearance when it placed inside the content of TabPanel with=${tabsPosition}`, async ({ page }) => { + await insertStylesheetRulesToPage(page, '.dx-tabpanel { margin: 10px }'); + + const dataSource: Item[] = [ + { + title: 'John Heart', + text: 'John Heart', + }, { + title: 'Olivia Peyton', + text: 'Olivia Peyton', + }, + ]; + + await createWidget(page, 'dxTabPanel', (arg: { + dataSource: Item[]; + tabsPosition: string; + positions: string[]; + }) => ({ + dataSource: arg.dataSource, + height: 700, + width: 500, + tabsPosition: arg.tabsPosition, + selectedIndex: 1, + deferRendering: true, + itemTemplate: () => { + const $container = $('
'); + + arg.positions.forEach((position) => { + const $tabPanel = ($('
') as any).dxTabPanel({ + height: 120, + tabsPosition: position, + dataSource: arg.dataSource, + }); + + $container.append($tabPanel); + + $container.append($('
')); + }); + + return $container; + }, + }), '#container', { arg: { dataSource, tabsPosition, positions } }); + + await testScreenshot(page, `Nested TabPanel borders appearance,tabsPos=${tabsPosition}.png`, { element: '#container' }); + }); + }); + + test('TabPanel tabs min-width', async ({ page }) => { + const dataSource: Item[] = [ + { text: 'ok', title: 'ok' }, + { icon: 'comment' }, + { icon: 'user' }, + { icon: 'money' }, + { text: 'ok', title: 'ok', icon: 'search' }, + { text: 'alignright', title: 'alignright', icon: 'alignright' }, + ]; + + await createWidget(page, 'dxTabPanel', { + dataSource, + height: 250, + width: 900, + useInkRipple: false, + }); + + await testScreenshot(page, 'TabPanel tabs min-width.png', { element: '#container' }); + }); + + ['left', 'right'].forEach((tabsPosition) => { + test(`TabPanel should be shown correctly even if there is only one tab (tabsPosition=${tabsPosition})`, async ({ page }) => { + const dataSource: Item[] = [ + { + title: 'John Heart', + text: 'John Heart', + }, + ]; + + await createWidget(page, 'dxTabPanel', { + dataSource, + height: 120, + width: 300, + tabsPosition, + }); + + await testScreenshot(page, `TabPanel with single tab, tabPosition=${tabsPosition}.png`, { element: '#container' }); + }); + }); +}); diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=bottom (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=bottom (fluent-next.blue.light).png new file mode 100644 index 000000000000..49d48be49566 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=bottom (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=bottom (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=bottom (fluent.blue.light).png new file mode 100644 index 000000000000..0888926896cf Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=bottom (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=left (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=left (fluent-next.blue.light).png new file mode 100644 index 000000000000..c74c14c25cc3 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=left (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=left (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=left (fluent.blue.light).png new file mode 100644 index 000000000000..74399b50a0e0 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=left (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=right (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=right (fluent-next.blue.light).png new file mode 100644 index 000000000000..488d8d59c797 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=right (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=right (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=right (fluent.blue.light).png new file mode 100644 index 000000000000..2e6b4b0046f7 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=right (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=top (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=top (fluent-next.blue.light).png new file mode 100644 index 000000000000..12e732ae228e Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=top (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=top (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=top (fluent.blue.light).png new file mode 100644 index 000000000000..a113bfe7e722 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=top (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel borders with scrolling (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel borders with scrolling (fluent-next.blue.light).png new file mode 100644 index 000000000000..47e098709f52 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel borders with scrolling (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel borders with scrolling (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel borders with scrolling (fluent.blue.light).png new file mode 100644 index 000000000000..7093dd48775d Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel borders with scrolling (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel borders without scrolling (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel borders without scrolling (fluent-next.blue.light).png new file mode 100644 index 000000000000..a011ca2be0e9 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel borders without scrolling (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel borders without scrolling (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel borders without scrolling (fluent.blue.light).png new file mode 100644 index 000000000000..64d87b4b9335 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel borders without scrolling (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel focus borders (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel focus borders (fluent-next.blue.light).png new file mode 100644 index 000000000000..834f33507afd Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel focus borders (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel focus borders (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel focus borders (fluent.blue.light).png new file mode 100644 index 000000000000..0b065f817819 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel focus borders (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel item focus when clicking on multiview (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel item focus when clicking on multiview (fluent-next.blue.light).png new file mode 100644 index 000000000000..c3fd8f5a246a Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel item focus when clicking on multiview (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel item focus when clicking on multiview (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel item focus when clicking on multiview (fluent.blue.light).png new file mode 100644 index 000000000000..bfd53f84e389 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel item focus when clicking on multiview (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel left navigation button hovered (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel left navigation button hovered (fluent-next.blue.light).png new file mode 100644 index 000000000000..3b6d7294d1cf Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel left navigation button hovered (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel left navigation button hovered (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel left navigation button hovered (fluent.blue.light).png new file mode 100644 index 000000000000..424b967157c9 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel left navigation button hovered (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel right navigation button hovered (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel right navigation button hovered (fluent-next.blue.light).png new file mode 100644 index 000000000000..e5ab91e4233f Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel right navigation button hovered (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel right navigation button hovered (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel right navigation button hovered (fluent.blue.light).png new file mode 100644 index 000000000000..8dfd06829f80 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel right navigation button hovered (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel tabs min-width (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel tabs min-width (fluent-next.blue.light).png new file mode 100644 index 000000000000..4c495770ca7b Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel tabs min-width (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel tabs min-width (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel tabs min-width (fluent.blue.light).png new file mode 100644 index 000000000000..107c6c521da1 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel tabs min-width (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabs wrapper width is limited (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabs wrapper width is limited (fluent-next.blue.light).png new file mode 100644 index 000000000000..37fad3df3299 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabs wrapper width is limited (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabs wrapper width is limited (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabs wrapper width is limited (fluent.blue.light).png new file mode 100644 index 000000000000..119e87626d80 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabs wrapper width is limited (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabsPosition is left (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabsPosition is left (fluent-next.blue.light).png new file mode 100644 index 000000000000..2f79f75932f7 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabsPosition is left (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabsPosition is left (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabsPosition is left (fluent.blue.light).png new file mode 100644 index 000000000000..302a1986bd4d Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabsPosition is left (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=left (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=left (fluent-next.blue.light).png new file mode 100644 index 000000000000..d24107d2c2a7 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=left (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=left (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=left (fluent.blue.light).png new file mode 100644 index 000000000000..d6371593a92e Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=left (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=right (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=right (fluent-next.blue.light).png new file mode 100644 index 000000000000..05f9fc8d113e Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=right (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=right (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=right (fluent.blue.light).png new file mode 100644 index 000000000000..127044ebb7a4 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=right (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=bottom (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=bottom (fluent-next.blue.light).png new file mode 100644 index 000000000000..159fb6d45598 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=bottom (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=bottom (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=bottom (fluent.blue.light).png new file mode 100644 index 000000000000..11a4b3fdf9fc Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=bottom (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=left (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=left (fluent-next.blue.light).png new file mode 100644 index 000000000000..aa46c564e7ba Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=left (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=left (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=left (fluent.blue.light).png new file mode 100644 index 000000000000..59e6030ab731 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=left (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=right (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=right (fluent-next.blue.light).png new file mode 100644 index 000000000000..e5aedbf1a7a5 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=right (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=right (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=right (fluent.blue.light).png new file mode 100644 index 000000000000..1226162e4517 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=right (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=top (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=top (fluent-next.blue.light).png new file mode 100644 index 000000000000..b05b40c31254 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=top (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=top (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=top (fluent.blue.light).png new file mode 100644 index 000000000000..a9403422fa2a Binary files /dev/null and b/e2e/playwright/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=top (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabPanel/focus.spec.ts b/e2e/playwright/tests/navigation/tabPanel/focus.spec.ts new file mode 100644 index 000000000000..94a09f242a2c --- /dev/null +++ b/e2e/playwright/tests/navigation/tabPanel/focus.spec.ts @@ -0,0 +1,179 @@ +import { test } from '../../../fixtures'; +import { clickWithOffset } from '../../../helpers/clickUtils'; +import { createWidget } from '../../../helpers/createWidget'; +import { appendElementTo } from '../../../helpers/domUtils'; +import TabPanel from '../../../models/tabPanel'; + +test.describe('TabPanel', () => { + // T821726 + test('[{0: selected}, {1}] -> click to tabs[1] -> click to external button', async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'tabPanel'); + + await createWidget(page, 'dxTabPanel', { + items: ['Item 1', 'Item 2'], + }, '#tabPanel'); + + const tabPanel = new TabPanel(page, '#tabPanel'); + + await tabPanel.tabs.getItem(1).element.click(); + await tabPanel.expectFocused(); + await tabPanel.tabs.expectFocused(); + await tabPanel.tabs.getItem(0).expectFocusedState(false); + await tabPanel.tabs.getItem(1).expectFocusedState(); + await tabPanel.multiView.getItem(0).expectFocusedState(false); + await tabPanel.multiView.getItem(1).expectFocusedState(); + + await clickWithOffset(page, page.locator('body'), { offsetY: 400 }); + await tabPanel.expectFocused(false); + await tabPanel.tabs.expectFocused(false); + await tabPanel.tabs.getItem(0).expectFocusedState(false); + await tabPanel.tabs.getItem(1).expectFocusedState(false); + await tabPanel.multiView.getItem(1).expectFocusedState(false); + await tabPanel.multiView.getItem(0).expectFocusedState(false); + }); + + test('[{0: selected}] -> click to multiView -> click to external button', async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'tabPanel'); + + await createWidget(page, 'dxTabPanel', { + items: ['Item 1'], + }, '#tabPanel'); + + const tabPanel = new TabPanel(page, '#tabPanel'); + + await tabPanel.multiView.getItem(0).element.click(); + await tabPanel.expectFocused(); + await tabPanel.tabs.expectFocused(); + await tabPanel.tabs.getItem(0).expectFocusedState(); + await tabPanel.multiView.getItem(0).expectFocusedState(); + + await clickWithOffset(page, page.locator('body'), { offsetY: 400 }); + await tabPanel.expectFocused(false); + await tabPanel.tabs.expectFocused(false); + await tabPanel.tabs.getItem(0).expectFocusedState(false); + await tabPanel.multiView.getItem(0).expectFocusedState(false); + }); + + test('[{0: selected}, {1}, {2}] -> click to tabs[1] -> navigate to tabs[2] -> click to external button', async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'tabPanel'); + + await createWidget(page, 'dxTabPanel', { + items: ['Item 1', 'Item 2', 'Item 3'], + }, '#tabPanel'); + + const tabPanel = new TabPanel(page, '#tabPanel'); + + await tabPanel.tabs.getItem(1).element.click(); + await tabPanel.expectFocused(); + await tabPanel.tabs.expectFocused(); + await tabPanel.tabs.getItem(0).expectFocusedState(false); + await tabPanel.tabs.getItem(1).expectFocusedState(); + await tabPanel.tabs.getItem(2).expectFocusedState(false); + await tabPanel.multiView.getItem(0).expectFocusedState(false); + await tabPanel.multiView.getItem(1).expectFocusedState(); + await tabPanel.multiView.getItem(2).expectFocusedState(false); + + await page.keyboard.press('ArrowRight'); + await tabPanel.expectFocused(); + await tabPanel.tabs.expectFocused(); + await tabPanel.tabs.getItem(0).expectFocusedState(false); + await tabPanel.tabs.getItem(1).expectFocusedState(false); + await tabPanel.tabs.getItem(2).expectFocusedState(); + await tabPanel.multiView.getItem(0).expectFocusedState(false); + await tabPanel.multiView.getItem(1).expectFocusedState(false); + await tabPanel.multiView.getItem(2).expectFocusedState(); + + await clickWithOffset(page, page.locator('body'), { offsetY: 400 }); + await tabPanel.expectFocused(false); + await tabPanel.tabs.expectFocused(false); + await tabPanel.tabs.getItem(0).expectFocusedState(false); + await tabPanel.tabs.getItem(1).expectFocusedState(false); + await tabPanel.tabs.getItem(2).expectFocusedState(false); + await tabPanel.multiView.getItem(0).expectFocusedState(false); + await tabPanel.multiView.getItem(1).expectFocusedState(false); + await tabPanel.multiView.getItem(2).expectFocusedState(false); + }); + + test('[{0: selected}, {1}] -> click to multiView -> navigate to tabs[1] -> click to external button', async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'tabPanel'); + + await createWidget(page, 'dxTabPanel', { + items: ['Item 1', 'Item 2'], + }, '#tabPanel'); + + const tabPanel = new TabPanel(page, '#tabPanel'); + + await tabPanel.multiView.getItem(0).element.click(); + await tabPanel.expectFocused(); + await tabPanel.tabs.expectFocused(); + await tabPanel.tabs.getItem(0).expectFocusedState(); + await tabPanel.tabs.getItem(1).expectFocusedState(false); + await tabPanel.multiView.getItem(0).expectFocusedState(); + await tabPanel.multiView.getItem(1).expectFocusedState(false); + + await page.keyboard.press('ArrowRight'); + await tabPanel.expectFocused(); + await tabPanel.tabs.expectFocused(); + await tabPanel.tabs.getItem(0).expectFocusedState(false); + await tabPanel.tabs.getItem(1).expectFocusedState(); + await tabPanel.multiView.getItem(0).expectFocusedState(false); + await tabPanel.multiView.getItem(1).expectFocusedState(); + + await clickWithOffset(page, page.locator('body'), { offsetY: 400 }); + await tabPanel.expectFocused(false); + await tabPanel.tabs.expectFocused(false); + await tabPanel.tabs.getItem(0).expectFocusedState(false); + await tabPanel.tabs.getItem(1).expectFocusedState(false); + await tabPanel.multiView.getItem(0).expectFocusedState(false); + await tabPanel.multiView.getItem(1).expectFocusedState(false); + }); + + test('[{0: selected}] -> click to multiView -> press "tab" -> press "tab"', async ({ page }) => { + await createWidget(page, 'dxTabPanel', { + items: ['Item 1'], + }); + + const tabPanel = new TabPanel(page, '#container'); + + await tabPanel.multiView.getItem(0).element.click(); + await tabPanel.expectFocused(); + await tabPanel.tabs.expectFocused(); + await tabPanel.tabs.getItem(0).expectFocusedState(); + await tabPanel.multiView.getItem(0).expectFocusedState(); + + await page.keyboard.press('Tab'); + await tabPanel.expectFocused(); + await tabPanel.tabs.expectFocused(); + await tabPanel.tabs.getItem(0).expectFocusedState(); + await tabPanel.multiView.getItem(0).expectFocusedState(false); + + await page.keyboard.press('Tab'); + await tabPanel.expectFocused(false); + await tabPanel.tabs.expectFocused(false); + await tabPanel.tabs.getItem(0).expectFocusedState(false); + await tabPanel.multiView.getItem(0).expectFocusedState(false); + }); + + test('[{0: selected}] -> focusin by press "tab" -> press "tab"', async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'tabPanel'); + + await createWidget(page, 'dxTabPanel', { + items: ['Item 1'], + }, '#tabPanel'); + + const tabPanel = new TabPanel(page, '#tabPanel'); + + await clickWithOffset(page, page.locator('body'), { offsetY: 400 }); + await page.keyboard.press('Tab'); + await tabPanel.expectFocused(); + await tabPanel.tabs.expectFocused(); + await tabPanel.tabs.getItem(0).expectFocusedState(); + await tabPanel.multiView.getItem(0).expectFocusedState(); + + await page.keyboard.press('Tab'); + await tabPanel.expectFocused(false); + await tabPanel.tabs.expectFocused(false); + await tabPanel.tabs.getItem(0).expectFocusedState(false); + await tabPanel.multiView.getItem(0).expectFocusedState(false); + }); +}); diff --git a/e2e/playwright/tests/navigation/tabs/common.spec.ts b/e2e/playwright/tests/navigation/tabs/common.spec.ts new file mode 100644 index 000000000000..4bde13cb0865 --- /dev/null +++ b/e2e/playwright/tests/navigation/tabs/common.spec.ts @@ -0,0 +1,177 @@ +import type { Item } from 'devextreme/ui/tabs'; +import { test } from '../../../fixtures'; +import { clickWithOffset } from '../../../helpers/clickUtils'; +import { createWidget } from '../../../helpers/createWidget'; +import { appendElementTo, setAttribute } from '../../../helpers/domUtils'; +import { testScreenshot } from '../../../helpers/screenshots'; + +const TAB_CLASS = 'dx-tab'; + +test.describe('Tabs_common', () => { + test('Tabs background color', async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'tabs'); + await setAttribute(page, '#container', 'style', 'width: 400px; background: #fff000 !important;'); + + const dataSource: Item[] = [ + { text: 'John Heart' }, + { text: 'Marina Thomas' }, + { text: 'Robert Reagan' }, + { text: 'Greta Sims' }, + ]; + + await createWidget(page, 'dxTabs', { dataSource }, '#tabs'); + + await testScreenshot(page, 'Tabs background color.png', { element: '#container' }); + }); + + test('Tabs text-overflow with vertical orientation', async ({ page }) => { + await setAttribute(page, '#container', 'style', 'display: flex; gap: 40px; width: fit-content;'); + + const iconPositions = ['start', 'end', 'top']; + const dataSource: Item[] = [ + { icon: 'user', text: 'John Heart' }, + { icon: 'user', text: 'Marina Elizabeth Thomas Grace Sophia Alexander Benjamin Olivia Nicholas Victoria Michael Emily' }, + { icon: 'user', text: 'Robert Reagan' }, + { icon: 'user', text: 'Greta Sims' }, + ]; + + await Promise.all(iconPositions.map((iconPosition) => appendElementTo(page, '#container', 'div', `tabs-${iconPosition}`))); + await Promise.all(iconPositions.map((iconPosition) => createWidget(page, 'dxTabs', { + dataSource, + iconPosition, + width: 130, + orientation: 'vertical', + }, `#tabs-${iconPosition}`))); + + await testScreenshot(page, 'Tabs text-overflow.png', { element: '#container' }); + }); + + [true, false].forEach((rtlEnabled) => { + test(`Tabs icon position (rtl=${rtlEnabled})`, async ({ page }) => { + await setAttribute(page, '#container', 'style', 'display: flex; flex-direction: column; gap: 20px; width: 800px'); + + const iconPositions = ['start', 'end', 'top', 'bottom']; + const dataSource: Item[] = [ + { text: 'user', badge: '1' }, + { text: 'comment', icon: 'comment', badge: 'text' }, + { icon: 'user' }, + { icon: 'money' }, + ]; + + await Promise.all(iconPositions.map((iconPosition) => appendElementTo(page, '#container', 'div', `tabs-${iconPosition}`))); + await Promise.all(iconPositions.map((iconPosition) => createWidget(page, 'dxTabs', { + dataSource, + iconPosition, + rtlEnabled, + }, `#tabs-${iconPosition}`))); + + await testScreenshot(page, `Tabs icon position,rtl=${rtlEnabled}.png`, { element: '#container' }); + }); + }); + + test('Tabs with width: auto in flex container', async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'tabs'); + await setAttribute(page, '#container', 'style', 'display: flex; width: 800px;'); + + const dataSource: Item[] = [ + { text: 'ok' }, + { icon: 'comment' }, + { icon: 'user' }, + { icon: 'money' }, + { text: 'ok', icon: 'search' }, + { text: 'alignright', icon: 'alignright' }, + ]; + + await createWidget(page, 'dxTabs', { dataSource, width: 'auto' }, '#tabs'); + + await testScreenshot(page, 'Tabs with width auto.png', { element: '#tabs' }); + }); + + ['primary', 'secondary'].forEach((stylingMode) => { + ['horizontal', 'vertical'].forEach((orientation) => { + test(`Tabs item selected states (orientation=${orientation}, stylingMode=${stylingMode})`, async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'tabs'); + await appendElementTo(page, '#container', 'div', 'tabs-rtl'); + await setAttribute(page, '#container', 'style', `display: flex; gap: 40px; flex-direction: ${orientation === 'horizontal' ? 'column' : 'row'}; width: fit-content;`); + + const dataSource: Item[] = [ + { text: 'John Heart' }, + { text: 'Marina Thomas', disabled: true }, + { text: 'Robert Reagan' }, + { text: 'Greta Sims' }, + { text: 'Olivia Peyton' }, + { text: 'Ed Holmes' }, + { text: 'Wally Hobbs' }, + { text: 'Brad Jameson' }, + ]; + + const tabsOptions = { + dataSource, + orientation, + stylingMode, + width: orientation === 'horizontal' ? 450 : 'auto', + height: orientation === 'horizontal' ? 'auto' : 250, + selectedItem: dataSource[2], + showNavButtons: true, + }; + + await createWidget(page, 'dxTabs', tabsOptions, '#tabs'); + await createWidget(page, 'dxTabs', { ...tabsOptions, rtlEnabled: true }, '#tabs-rtl'); + + await testScreenshot(page, `Tabs item selected, orientation=${orientation}, stylingMode=${stylingMode}.png`, { element: '#container' }); + }); + }); + }); + + test('Tabs item states', async ({ page }) => { + await appendElementTo(page, '#container', 'div', 'tabs'); + + const dataSource: Item[] = [ + { text: 'John Heart' }, + { text: 'Marina Thomas', disabled: true }, + { text: 'Robert Reagan' }, + { text: 'Greta Sims' }, + { text: 'Olivia Peyton' }, + { text: 'Ed Holmes' }, + { text: 'Wally Hobbs' }, + { text: 'Brad Jameson' }, + ]; + + await createWidget(page, 'dxTabs', { + dataSource, + selectOnFocus: false, + showNavButtons: true, + width: 600, + useInkRipple: false, + }, '#tabs'); + + await testScreenshot(page, 'Tabs without focus.png', { element: '#tabs' }); + + await page.keyboard.press('Tab'); + await testScreenshot(page, 'Tabs item focused.png', { element: '#tabs' }); + + await page.keyboard.press('ArrowRight'); + await testScreenshot(page, 'Tabs disabled item focused.png', { element: '#tabs' }); + + const thirdItem = page.locator(`.${TAB_CLASS}:nth-child(3)`); + const fourthItem = page.locator(`.${TAB_CLASS}:nth-child(4)`); + + await page.keyboard.press('ArrowRight'); + await thirdItem.dispatchEvent('mousedown'); + await testScreenshot(page, 'Tabs item active.png', { element: '#tabs' }); + await thirdItem.dispatchEvent('mouseup'); + + await thirdItem.click(); + await fourthItem.hover(); + await testScreenshot(page, 'Tabs item hovered.png', { element: '#tabs' }); + + await clickWithOffset(page, page.locator('body'), { offsetX: -10, offsetY: -10 }); + + await thirdItem.hover(); + await testScreenshot(page, 'Tabs selected item hovered.png', { element: '#tabs' }); + + await thirdItem.dispatchEvent('mousedown'); + await testScreenshot(page, 'Tabs selected item active.png', { element: '#tabs' }); + await thirdItem.dispatchEvent('mouseup'); + }); +}); diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs background color (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs background color (fluent-next.blue.light).png new file mode 100644 index 000000000000..67691036cea8 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs background color (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs background color (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs background color (fluent.blue.light).png new file mode 100644 index 000000000000..e12cdf4a8b35 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs background color (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs disabled item focused (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs disabled item focused (fluent-next.blue.light).png new file mode 100644 index 000000000000..d3fa23e817a7 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs disabled item focused (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs disabled item focused (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs disabled item focused (fluent.blue.light).png new file mode 100644 index 000000000000..bf5c9f22958c Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs disabled item focused (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs icon position,rtl=false (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs icon position,rtl=false (fluent-next.blue.light).png new file mode 100644 index 000000000000..b76e8fbfa27c Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs icon position,rtl=false (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs icon position,rtl=false (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs icon position,rtl=false (fluent.blue.light).png new file mode 100644 index 000000000000..fc4d9304dd0b Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs icon position,rtl=false (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs icon position,rtl=true (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs icon position,rtl=true (fluent-next.blue.light).png new file mode 100644 index 000000000000..8a1abccea18e Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs icon position,rtl=true (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs icon position,rtl=true (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs icon position,rtl=true (fluent.blue.light).png new file mode 100644 index 000000000000..1234536f96d2 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs icon position,rtl=true (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs item active (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item active (fluent-next.blue.light).png new file mode 100644 index 000000000000..95a61d4abb9b Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item active (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs item active (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item active (fluent.blue.light).png new file mode 100644 index 000000000000..66878f38e710 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item active (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs item focused (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item focused (fluent-next.blue.light).png new file mode 100644 index 000000000000..7da30a363cc3 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item focused (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs item focused (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item focused (fluent.blue.light).png new file mode 100644 index 000000000000..2df65add9a0d Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item focused (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs item hovered (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item hovered (fluent-next.blue.light).png new file mode 100644 index 000000000000..ec2249ff3cb0 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item hovered (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs item hovered (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item hovered (fluent.blue.light).png new file mode 100644 index 000000000000..cd61fc19848b Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item hovered (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=primary (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=primary (fluent-next.blue.light).png new file mode 100644 index 000000000000..17277ece9216 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=primary (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=primary (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=primary (fluent.blue.light).png new file mode 100644 index 000000000000..7d7ce7e64b7c Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=primary (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=secondary (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=secondary (fluent-next.blue.light).png new file mode 100644 index 000000000000..1e7ba9f59b27 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=secondary (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=secondary (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=secondary (fluent.blue.light).png new file mode 100644 index 000000000000..6f5ca33e59dc Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=secondary (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=primary (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=primary (fluent-next.blue.light).png new file mode 100644 index 000000000000..4fc76cd10860 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=primary (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=primary (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=primary (fluent.blue.light).png new file mode 100644 index 000000000000..9280ff47eefa Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=primary (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=secondary (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=secondary (fluent-next.blue.light).png new file mode 100644 index 000000000000..3003a87b49d2 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=secondary (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=secondary (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=secondary (fluent.blue.light).png new file mode 100644 index 000000000000..880715454c65 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=secondary (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs selected item active (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs selected item active (fluent-next.blue.light).png new file mode 100644 index 000000000000..c52b30aad9f4 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs selected item active (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs selected item active (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs selected item active (fluent.blue.light).png new file mode 100644 index 000000000000..582e5168b4bf Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs selected item active (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs selected item hovered (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs selected item hovered (fluent-next.blue.light).png new file mode 100644 index 000000000000..ff0ae91dede5 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs selected item hovered (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs selected item hovered (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs selected item hovered (fluent.blue.light).png new file mode 100644 index 000000000000..c9e9e1a0dedf Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs selected item hovered (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs text-overflow (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs text-overflow (fluent-next.blue.light).png new file mode 100644 index 000000000000..6ca997368d33 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs text-overflow (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs text-overflow (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs text-overflow (fluent.blue.light).png new file mode 100644 index 000000000000..36876a65a4c5 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs text-overflow (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs with width auto (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs with width auto (fluent-next.blue.light).png new file mode 100644 index 000000000000..e4d5a60015bb Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs with width auto (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs with width auto (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs with width auto (fluent.blue.light).png new file mode 100644 index 000000000000..8044287d538d Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs with width auto (fluent.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs without focus (fluent-next.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs without focus (fluent-next.blue.light).png new file mode 100644 index 000000000000..8a0a66fe1836 Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs without focus (fluent-next.blue.light).png differ diff --git a/e2e/playwright/tests/navigation/tabs/etalons/Tabs without focus (fluent.blue.light).png b/e2e/playwright/tests/navigation/tabs/etalons/Tabs without focus (fluent.blue.light).png new file mode 100644 index 000000000000..51f2ef2ff17e Binary files /dev/null and b/e2e/playwright/tests/navigation/tabs/etalons/Tabs without focus (fluent.blue.light).png differ diff --git a/e2e/testcafe-devextreme/tests/navigation/accordion/common.ts b/e2e/testcafe-devextreme/tests/navigation/accordion/common.ts deleted file mode 100644 index 2e49e6e5e5e6..000000000000 --- a/e2e/testcafe-devextreme/tests/navigation/accordion/common.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; -import { Item } from 'devextreme/ui/accordion.d'; -import { testScreenshot } from '../../../helpers/themeUtils'; -import url from '../../../helpers/getPageUrl'; -import { createWidget } from '../../../helpers/createWidget'; -import { appendElementTo, setAttribute } from '../../../helpers/domUtils'; - -fixture.disablePageReloads`Accordion_common` - .page(url(__dirname, '../../container.html')); - -test('Accordion items render (T865742)', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - const screenshotName = 'Accordion items render.png'; - - await testScreenshot(t, takeScreenshot, screenshotName, { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - await appendElementTo('#container', 'div', 'accordion'); - await appendElementTo('#container', 'div', 'accordion2'); - - await setAttribute('#container', 'style', 'display: flex; gap: 50px;'); - - const items: Item[] = [ - { title: 'Some text 1', icon: 'coffee' }, - { title: 'Some text 2' }, - { title: 'Some text 3' }, - ]; - - await createWidget('dxAccordion', { items, width: 500 }, '#accordion'); - return createWidget('dxAccordion', { items, rtlEnabled: true, width: 500 }, '#accordion2'); -}); - -test('Icon-only button should be rendered correctly (T851081)', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - const screenshotName = 'Accordion with icon-only button.png'; - - await testScreenshot(t, takeScreenshot, screenshotName, { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - await appendElementTo('#container', 'div', 'accordion'); - - const itemTitleTemplate = () => ($('
') as any).dxButton({ icon: 'coffee' }); - - await createWidget('dxAccordion', { dataSource: [{}], itemTitleTemplate }, '#accordion'); -}); diff --git a/e2e/testcafe-devextreme/tests/navigation/accordion/etalons/Accordion items render (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/accordion/etalons/Accordion items render (fluent-next.blue.light).png deleted file mode 100644 index f61989d4c67a..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/accordion/etalons/Accordion items render (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/accordion/etalons/Accordion items render (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/accordion/etalons/Accordion items render (fluent.blue.light).png deleted file mode 100644 index f52fcf6ba325..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/accordion/etalons/Accordion items render (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/accordion/etalons/Accordion with icon-only button (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/accordion/etalons/Accordion with icon-only button (fluent-next.blue.light).png deleted file mode 100644 index a01747d689e4..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/accordion/etalons/Accordion with icon-only button (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/accordion/etalons/Accordion with icon-only button (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/accordion/etalons/Accordion with icon-only button (fluent.blue.light).png deleted file mode 100644 index 7bf464910054..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/accordion/etalons/Accordion with icon-only button (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/common.ts b/e2e/testcafe-devextreme/tests/navigation/button/common.ts deleted file mode 100644 index 40fdfd1a1fa6..000000000000 --- a/e2e/testcafe-devextreme/tests/navigation/button/common.ts +++ /dev/null @@ -1,147 +0,0 @@ -import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; -import { ButtonType } from 'devextreme/common'; -import { Selector } from 'testcafe'; -import { testScreenshot } from '../../../helpers/themeUtils'; -import { - addCaptionTo, - appendElementTo, - insertStylesheetRulesToPage, - setAttribute, - setClassAttribute, - setStyleAttribute, -} from '../../../helpers/domUtils'; -import { createWidget } from '../../../helpers/createWidget'; -import url from '../../../helpers/getPageUrl'; - -fixture.disablePageReloads`Button` - .page(url(__dirname, '../../container.html')); - -['text', 'outlined', 'contained'].forEach((stylingMode) => { - const testName = `Buttons, stylingMode=${stylingMode}`; - test(testName, async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, `${testName}.png`, { - element: '#container', - }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async () => { - const typedButtons = ['danger', 'default', 'normal', 'success'].map((type: ButtonType) => ({ - type, - text: `${type[0].toUpperCase()}${type.slice(1)}`, - })); - const iconButtons = [ - { icon: 'find', text: 'Find' }, - { icon: 'find' }, - { - icon: ` - - `, - }, - ]; - const buttons = [ - ...typedButtons, - ...iconButtons, - ]; - - await setAttribute('#container', 'class', 'dx-theme-generic-typography'); - await setAttribute('#container', 'style', 'width: fit-content; padding: 8px;'); - - const states = ['default', 'focused', 'hover', 'active', 'selected', 'disabled']; - - // eslint-disable-next-line no-restricted-syntax - for (const state of states) { - await appendElementTo('#container', 'div', `mode${state}`, {}); - await setAttribute(`#mode${state}`, 'style', 'display: flex; gap: 8px; margin-bottom: 16px;'); - await addCaptionTo(`#mode${state}`, state); - - await Promise.all(buttons.map( - (_, index) => appendElementTo(`#mode${state}`, 'div', `button-${state}-${index}`, {}), - )); - - await Promise.all(buttons.map( - (defaultConfig, index) => createWidget('dxButton', { - ...defaultConfig, - stylingMode, - disabled: state === 'disabled', - }, `#button-${state}-${index}`), - )); - - if (state !== 'default' && state !== 'disabled') { - await Promise.all( - buttons.map((_, index) => setClassAttribute(Selector(`#button-${state}-${index}`), `dx-state-${state}`)), - ); - } - } - }); -}); - -test('Button in rtl modes', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, 'Button in rtl modes.png', { - element: '#container', - }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - await setAttribute('#container', 'style', 'width: fit-content; padding: 8px; display: grid; grid-template-columns: repeat(3, auto); grid-gap: 16px;'); - - const buttons = [ - { icon: 'find', text: 'Button text' }, - { icon: 'find', text: 'Long button text' }, - { icon: 'find', text: 'Long button text', width: 150 }, - { icon: 'find', text: 'Button text', rtlEnabled: true }, - { icon: 'find', text: 'Long button text', rtlEnabled: true }, - { - icon: 'find', text: 'Long button text', width: 150, rtlEnabled: true, - }, - ]; - - await Promise.all(buttons.map( - (_, index) => appendElementTo('#container', 'div', `button-${index}`, {}), - )); - - await Promise.all(buttons.map( - (config, index) => createWidget('dxButton', { - ...config, - }, `#button-${index}`), - )); -}); - -test('Button: svg icon as background should be fit within icon element (T1178813)', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, 'Button with svg icon as background.png', { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - await insertStylesheetRulesToPage('.dx-icon-custom { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAB4klEQVR4nO3WTYiPURQG8N/M+ByEjQUxRQpJKSkhFigLo8jGQqGURDZY2CMpliI2PhZslLKxJBaUCCkUMxELja8pwoxuncW7mZn3fe9fb2meuqt7n+c8995z7zmMojVox1G81RDOYhBvmgi+LIKncakJA5cj+ABWNGHgQxg4pyG8xxmM/VcBVuMCXuIbenELe9GFiViH47iLd+jHq0jOBXUDT8a1QoINNX6OMP8Lx+KplkYnHoTARxyOnUzCHOzATXzHHzzHSWzATEzHRtwuGEnzpXExSA8xY5h1bZgwzHwHHodWStZSWBy76sMseTgQwb9gVVnSqSCle8vBuLi+pLWtCvFRkJZnGlgTOk+qEj8FcWqmgd2hc74q8UcQx2ca2BU66Q+phN4gzs40sDJ0XlT9A+4FcX2mgY4oz0nrSBXiiTofxxDYElVyIOpF+shGxNow0IMxLTCxJ37MpHm6DKENz4KwXWtwJ/T2lyXsLJzClMzg3YWaUlqrHfeDeCVOpQ464xUknX1VyYvwtXB3lZ5SrL8a/Kd1G5Zu/A6RVFqXxjFujl4w7e4zXkfvsBXTMA83gpeakyUysClEBmuM/uiWstEVPUJPXEvKj0NYGDVjPg5GtvdF+b2Oua0IPor/G38BnW+XcSzQwtUAAAAASUVORK5CYII="); }'); - - await setStyleAttribute(Selector('#container'), 'width: 300px; height: 200px;'); - await appendElementTo('#container', 'div', 'button'); - await appendElementTo('#container', 'div', 'fixedWidthButton'); - await appendElementTo('#container', 'div', 'iconOnlyButton'); - - await createWidget('dxButton', { - text: 'svg icon', - icon: 'custom', - }, '#button'); - - await createWidget('dxButton', { - text: 'fixed width + svg icon', - icon: 'custom', - width: 200, - }, '#fixedWidthButton'); - - await createWidget('dxButton', { - icon: 'custom', - }, '#iconOnlyButton'); -}); diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Button in rtl modes (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/Button in rtl modes (fluent-next.blue.light).png deleted file mode 100644 index a929989befc5..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Button in rtl modes (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Button in rtl modes (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/Button in rtl modes (fluent.blue.light).png deleted file mode 100644 index c489fa64d70f..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Button in rtl modes (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Button with svg icon as background (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/Button with svg icon as background (fluent-next.blue.light).png deleted file mode 100644 index ff7f833a6ebc..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Button with svg icon as background (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Button with svg icon as background (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/Button with svg icon as background (fluent.blue.light).png deleted file mode 100644 index 66f52c52b650..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Button with svg icon as background (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=contained (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=contained (fluent-next.blue.light).png deleted file mode 100644 index 0651072f4cb1..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=contained (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=contained (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=contained (fluent.blue.light).png deleted file mode 100644 index 811d2c1fb1f3..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=contained (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=outlined (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=outlined (fluent-next.blue.light).png deleted file mode 100644 index bec004f6ec22..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=outlined (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=outlined (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=outlined (fluent.blue.light).png deleted file mode 100644 index 35341d2ab1aa..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=outlined (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=text (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=text (fluent-next.blue.light).png deleted file mode 100644 index 8f4b06e3013c..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=text (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=text (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=text (fluent.blue.light).png deleted file mode 100644 index 3c0f34a6c5de..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/Buttons, stylingMode=text (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='' (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='' (fluent-next.blue.light).png deleted file mode 100644 index 601c1dba6e8c..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='' (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='' (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='' (fluent.blue.light).png deleted file mode 100644 index eed335ee6746..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='' (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='home' (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='home' (fluent-next.blue.light).png deleted file mode 100644 index 2e3245aeaaf0..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='home' (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='home' (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='home' (fluent.blue.light).png deleted file mode 100644 index e3375475b03e..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='',icon='home' (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='' (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='' (fluent-next.blue.light).png deleted file mode 100644 index 17b3b180260e..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='' (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='' (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='' (fluent.blue.light).png deleted file mode 100644 index 34ede4ffa949..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='' (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='home' (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='home' (fluent-next.blue.light).png deleted file mode 100644 index eea611272981..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='home' (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='home' (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='home' (fluent.blue.light).png deleted file mode 100644 index a7f3711168ca..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB is opened with two speed dial actions,label='Add Row',icon='home' (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is #grid, after scrolling (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is #grid, after scrolling (fluent-next.blue.light).png deleted file mode 100644 index 4d2fc5d3a47c..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is #grid, after scrolling (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is #grid, after scrolling (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is #grid, after scrolling (fluent.blue.light).png deleted file mode 100644 index 348294d50cb1..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is #grid, after scrolling (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is #grid, before scrolling (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is #grid, before scrolling (fluent-next.blue.light).png deleted file mode 100644 index 7c7b7d8f5907..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is #grid, before scrolling (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is #grid, before scrolling (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is #grid, before scrolling (fluent.blue.light).png deleted file mode 100644 index 70ad6a42da60..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is #grid, before scrolling (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is undefined, after scrolling (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is undefined, after scrolling (fluent-next.blue.light).png deleted file mode 100644 index 7715b66d085d..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is undefined, after scrolling (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is undefined, after scrolling (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is undefined, after scrolling (fluent.blue.light).png deleted file mode 100644 index 15199a888128..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is undefined, after scrolling (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is undefined, before scrolling (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is undefined, before scrolling (fluent-next.blue.light).png deleted file mode 100644 index 60d144087db0..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is undefined, before scrolling (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is undefined, before scrolling (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is undefined, before scrolling (fluent.blue.light).png deleted file mode 100644 index 997db0165629..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with grid, position.of is undefined, before scrolling (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='' (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='' (fluent-next.blue.light).png deleted file mode 100644 index cb0d09aee9a5..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='' (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='' (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='' (fluent.blue.light).png deleted file mode 100644 index 55056eb377ac..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='' (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='home' (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='home' (fluent-next.blue.light).png deleted file mode 100644 index 32b586075af5..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='home' (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='home' (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='home' (fluent.blue.light).png deleted file mode 100644 index 449d756d6e2c..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='',icon='home' (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='' (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='' (fluent-next.blue.light).png deleted file mode 100644 index 53cc09753d03..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='' (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='' (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='' (fluent.blue.light).png deleted file mode 100644 index 8ca805a8d361..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='' (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='home' (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='home' (fluent-next.blue.light).png deleted file mode 100644 index c7126c9aa8f0..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='home' (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='home' (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='home' (fluent.blue.light).png deleted file mode 100644 index 76d4a9df71e0..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with one speed dial action button,label='Add Row',icon='home' (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with two speed dial action buttons (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with two speed dial action buttons (fluent-next.blue.light).png deleted file mode 100644 index 3573ec942a0f..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with two speed dial action buttons (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with two speed dial action buttons (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with two speed dial action buttons (fluent.blue.light).png deleted file mode 100644 index f90479b15e6f..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/button/etalons/FAB with two speed dial action buttons (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/button/floatingAction.ts b/e2e/testcafe-devextreme/tests/navigation/button/floatingAction.ts deleted file mode 100644 index a92cb3b6ec54..000000000000 --- a/e2e/testcafe-devextreme/tests/navigation/button/floatingAction.ts +++ /dev/null @@ -1,131 +0,0 @@ -/* eslint-disable no-restricted-syntax */ -import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; -import { ClientFunction, Selector } from 'testcafe'; -import { isMaterial, testScreenshot } from '../../../helpers/themeUtils'; -import url from '../../../helpers/getPageUrl'; -import { createWidget } from '../../../helpers/createWidget'; -import { appendElementTo, insertStylesheetRulesToPage, setStyleAttribute } from '../../../helpers/domUtils'; - -const OVERLAY_CONTENT_CLASS = 'dx-overlay-content'; -const FA_MAIN_BUTTON_CLASS = 'dx-fa-button-main'; - -const setGlobalConfig = ClientFunction(() => { - (window as any).DevExpress.config({ - floatingActionButtonConfig: { - icon: 'edit', - shading: false, - position: { - of: '#container', - my: 'right bottom', - at: 'right bottom', - offset: '-16 -16', - }, - }, - }); -}); - -fixture.disablePageReloads`FloatingAction - default theme` - .page(url(__dirname, '../../container.html')); - -for (const label of ['Add Row', '']) { - for (const icon of ['home', '']) { - test(`FAB with two speed dial action buttons after opening, label: ${label}, icon: ${icon}`, async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await t - .click(Selector('body')) - .click(Selector(`.${FA_MAIN_BUTTON_CLASS} .${OVERLAY_CONTENT_CLASS}`)); - - await testScreenshot(t, takeScreenshot, `FAB is opened with two speed dial actions,label='${label}',icon='${icon}'.png`, { - element: '#container', - }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async () => { - await setStyleAttribute(Selector('#container'), 'width: 300px; height: 300px;'); - await appendElementTo('#container', 'div', 'speed-dial-action'); - await appendElementTo('#container', 'div', 'speed-dial-action-trash'); - - await setGlobalConfig(); - if (isMaterial()) { - await insertStylesheetRulesToPage('.dx-overlay-wrapper { font-family: sans-serif !important; }'); - } - - await createWidget('dxSpeedDialAction', { - label, - icon, - index: 1, - visible: true, - }, '#speed-dial-action'); - - await createWidget('dxSpeedDialAction', { - label: 'Remove Row', - icon: 'trash', - index: 2, - visible: true, - }, '#speed-dial-action-trash'); - }); - - test(`FAB with one speed dial action button, label: ${label}, icon: ${icon}`, async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, `FAB with one speed dial action button,label='${label}',icon='${icon}'.png`, { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async () => { - await setStyleAttribute(Selector('#container'), 'width: 300px; height: 300px;'); - if (isMaterial()) { - await insertStylesheetRulesToPage('.dx-overlay-wrapper { font-family: sans-serif !important; }'); - } - await appendElementTo('#container', 'div', 'speed-dial-action'); - - await setGlobalConfig(); - - await createWidget('dxSpeedDialAction', { - label, - icon, - visible: true, - }, '#speed-dial-action'); - }); - } -} - -test('FAB with two speed dial action buttons', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, 'FAB with two speed dial action buttons.png', { - element: '#container', - }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - await setStyleAttribute(Selector('#container'), 'width: 300px; height: 300px;'); - if (isMaterial()) { - await insertStylesheetRulesToPage('.dx-overlay-wrapper { font-family: sans-serif !important; }'); - } - - await appendElementTo('#container', 'div', 'speed-dial-action'); - await appendElementTo('#container', 'div', 'speed-dial-action-trash'); - - await setGlobalConfig(); - - await createWidget('dxSpeedDialAction', { - label: 'Add row', - icon: 'plus', - index: 1, - visible: true, - }, '#speed-dial-action'); - - await createWidget('dxSpeedDialAction', { - label: 'Remove Row', - icon: 'trash', - index: 2, - visible: true, - }, '#speed-dial-action-trash'); -}); diff --git a/e2e/testcafe-devextreme/tests/navigation/button/floatingActionInGrid.ts b/e2e/testcafe-devextreme/tests/navigation/button/floatingActionInGrid.ts deleted file mode 100644 index 236c151d8a9b..000000000000 --- a/e2e/testcafe-devextreme/tests/navigation/button/floatingActionInGrid.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; -import { ClientFunction } from 'testcafe'; -import DataGrid from 'devextreme-testcafe-models/dataGrid'; -import { createWidget } from '../../../helpers/createWidget'; -import url from '../../../helpers/getPageUrl'; -import { appendElementTo } from '../../../helpers/domUtils'; -import { testScreenshot } from '../../../helpers/themeUtils'; - -const scrollWindowTo = async (position: object) => { - await ClientFunction( - () => { - (window as any).scroll(position); - }, - { - dependencies: { - position, - }, - }, - )(); -}; - -const generateData = (count) => { - const items: Record[] = []; - - for (let i = 0; i < count; i += 1) { - items.push({ - ID: i, - NAME: 'Name', - Full_Name: 'Full name', - }); - } - - return items; -}; - -fixture`FloatingAction with Grid` - .page(url(__dirname, '../../container.html')); - -[undefined, '#grid'].forEach((positionOf) => { - test(`FAB with grid, position.of is ${positionOf}`, async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - const dataGrid = new DataGrid('#grid'); - - await t - .expect(dataGrid.isReady()) - .ok(); - - await ClientFunction(() => { - (window as any).DevExpress.ui.repaintFloatingActionButton(); - })(); - - await testScreenshot(t, takeScreenshot, `FAB with grid, position.of is ${positionOf}, before scrolling.png`); - - await scrollWindowTo({ top: 10000000 }); - - await t - .expect(dataGrid.isReady()) - .ok(); - - await testScreenshot(t, takeScreenshot, `FAB with grid, position.of is ${positionOf}, after scrolling.png`); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async (t) => { - await ClientFunction(() => { - $('#container').wrap('
'); - })(); - - await t.resizeWindow(1000, 400); - - await appendElementTo('#container', 'div', 'grid'); - await appendElementTo('#container', 'div', 'speed-dial-action'); - - await createWidget('dxDataGrid', { - dataSource: generateData(20), - }, '#grid'); - - await createWidget('dxSpeedDialAction', { - label: 'Add row', - icon: 'plus', - position: { - of: positionOf, - }, - }, '#speed-dial-action'); - }).after(async () => { - await ClientFunction(() => { - $('#container').unwrap(); - })(); - }); -}); diff --git a/e2e/testcafe-devextreme/tests/navigation/button/floatingActionViewport.ts b/e2e/testcafe-devextreme/tests/navigation/button/floatingActionViewport.ts deleted file mode 100644 index a9eb89df1ac8..000000000000 --- a/e2e/testcafe-devextreme/tests/navigation/button/floatingActionViewport.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { ClientFunction, Selector } from 'testcafe'; -import url from '../../../helpers/getPageUrl'; -import { createWidget } from '../../../helpers/createWidget'; -import { appendElementTo } from '../../../helpers/domUtils'; - -const OVERLAY_CONTENT_CLASS = 'dx-overlay-content'; -const FA_MAIN_BUTTON_CLASS = 'dx-fa-button-main'; -const FAB_OFFSET = 16; - -const getViewportClientSize = ClientFunction(() => ({ - width: document.documentElement.clientWidth, - height: document.documentElement.clientHeight, -})); - -fixture`FloatingAction - visible area` - .page(url(__dirname, '../../container.html')); - -test('FAB should keep its offset from the visible area edges after scrollbars appear (T1334663)', async (t) => { - const fabContent = Selector(`.${FA_MAIN_BUTTON_CLASS} .${OVERLAY_CONTENT_CLASS}`); - const initialSize = await getViewportClientSize(); - - await t - .expect(fabContent.getBoundingClientRectProperty('right')) - .within(initialSize.width - FAB_OFFSET - 1, initialSize.width - FAB_OFFSET + 1) - .expect(fabContent.getBoundingClientRectProperty('bottom')) - .within(initialSize.height - FAB_OFFSET - 1, initialSize.height - FAB_OFFSET + 1); - - await appendElementTo('#container', 'div', 'tall-content', { width: '3000px', height: '3000px' }); - - const sizeWithScrollbars = await getViewportClientSize(); - - await t - .expect(fabContent.getBoundingClientRectProperty('right')) - .within(sizeWithScrollbars.width - FAB_OFFSET - 1, sizeWithScrollbars.width - FAB_OFFSET + 1) - .expect(fabContent.getBoundingClientRectProperty('bottom')) - .within(sizeWithScrollbars.height - FAB_OFFSET - 1, sizeWithScrollbars.height - FAB_OFFSET + 1); -}).before(async () => createWidget('dxSpeedDialAction', { - icon: 'add', - visible: true, -})); diff --git a/e2e/testcafe-devextreme/tests/navigation/buttonGroup/common.ts b/e2e/testcafe-devextreme/tests/navigation/buttonGroup/common.ts deleted file mode 100644 index e532a9de9f5c..000000000000 --- a/e2e/testcafe-devextreme/tests/navigation/buttonGroup/common.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Selector } from 'testcafe'; -import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; -import { Item, ButtonType } from 'devextreme/ui/button_group.d'; -import { - setStyleAttribute, - appendElementTo, - setAttribute, -} from '../../../helpers/domUtils'; -import { testScreenshot } from '../../../helpers/themeUtils'; -import url from '../../../helpers/getPageUrl'; -import { createWidget } from '../../../helpers/createWidget'; - -const typedItems: Item[] = ['danger', 'default', 'normal', 'success'].map((type: ButtonType) => ({ type, text: type })); -const iconItems: Item[] = [ - { icon: 'find', text: 'find' }, - { icon: 'find' }, -]; -const items: Item[] = [ - ...typedItems, - ...iconItems, -]; - -fixture.disablePageReloads`ButtonGroup` - .page(url(__dirname, '../../container.html')); - -test('ButtonGroup styling', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, 'ButtonGroup styling.png', { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - await setStyleAttribute(Selector('#container'), 'width: fit-content; padding: 8px; display: flex; gap: 16px; flex-direction: column;'); - await setAttribute('#container', 'class', 'dx-theme-generic-typography'); - - const stylingModes = ['text', 'outlined', 'contained']; - - await Promise.all(stylingModes.map((mode) => appendElementTo('#container', 'div', `buttongroup-${mode}`, {}))); - await Promise.all(stylingModes.map((stylingMode) => createWidget('dxButtonGroup', { - items, - stylingMode, - selectionMode: 'none', - }, `#buttongroup-${stylingMode}`))); -}); diff --git a/e2e/testcafe-devextreme/tests/navigation/buttonGroup/etalons/ButtonGroup styling (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/buttonGroup/etalons/ButtonGroup styling (fluent-next.blue.light).png deleted file mode 100644 index 9e725e443469..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/buttonGroup/etalons/ButtonGroup styling (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/buttonGroup/etalons/ButtonGroup styling (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/buttonGroup/etalons/ButtonGroup styling (fluent.blue.light).png deleted file mode 100644 index 9597e68a8802..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/buttonGroup/etalons/ButtonGroup styling (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/buttonGroup/selection.ts b/e2e/testcafe-devextreme/tests/navigation/buttonGroup/selection.ts deleted file mode 100644 index 36bb0223e87e..000000000000 --- a/e2e/testcafe-devextreme/tests/navigation/buttonGroup/selection.ts +++ /dev/null @@ -1,73 +0,0 @@ -import ButtonGroup from 'devextreme-testcafe-models/buttonGroup'; -import url from '../../../helpers/getPageUrl'; -import { createWidget } from '../../../helpers/createWidget'; - -fixture.disablePageReloads`ButtonGroup_Selection` - .page(url(__dirname, '../../container.html')); - -test('selected class should not be added to the button after hovering (T1222079)', async (t) => { - const buttonGroup = new ButtonGroup('#container'); - - await buttonGroup.option('disabled', false); - - await t - .click(buttonGroup.getItem(1).element); - - await t - .expect(buttonGroup.getItem(1).isSelected) - .ok() - .expect(buttonGroup.isItemSelected(1)) - .ok(); - - await t - .hover(buttonGroup.getItem(0).element); - - await t - .expect(buttonGroup.getItem(0).isSelected) - .notOk() - .expect(buttonGroup.isItemSelected(0)) - .notOk(); -}).before(async () => createWidget('dxButtonGroup', { - items: [ - { text: 'Button_1' }, - { text: 'Button_2' }, - ], - selectedItemKeys: ['Button_1'], - disabled: true, -})); -test('selected class should be set after reenabling (T1308601)', async (t) => { - const buttonGroup = new ButtonGroup('#container'); - - await buttonGroup.option('disabled', true); - await buttonGroup.option('disabled', false); - - await t - .click(buttonGroup.getItem(1).element); - - await buttonGroup.option('disabled', true); - await buttonGroup.option('disabled', false); - - await t - .click(buttonGroup.getItem(0).element); - - await t - .expect(buttonGroup.getItem(0).isSelected) - .ok() - .expect(buttonGroup.isItemSelected(0)) - .ok(); - - await t - .hover(buttonGroup.getItem(1).element); - - await t - .expect(buttonGroup.getItem(0).isSelected) - .ok() - .expect(buttonGroup.isItemSelected(0)) - .ok(); -}).before(async () => createWidget('dxButtonGroup', { - items: [ - { text: 'Button_1' }, - { text: 'Button_2' }, - ], - selectedItemKeys: ['Button_1'], -})); diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/common.ts b/e2e/testcafe-devextreme/tests/navigation/drawer/common.ts deleted file mode 100644 index 468003381c9b..000000000000 --- a/e2e/testcafe-devextreme/tests/navigation/drawer/common.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { Selector } from 'testcafe'; -import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; -import { OpenedStateMode } from 'devextreme/ui/drawer'; -import { Position } from 'devextreme/common'; -import url from '../../../helpers/getPageUrl'; -import { createDrawer } from './drawer.helpers'; -import { testScreenshot } from '../../../helpers/themeUtils'; - -fixture.disablePageReloads`Drawer` - .page(url(__dirname, '../../container.html')); - -['overlap', 'shrink', 'push'].forEach((openedStateMode: OpenedStateMode) => { - const testName = `Drawer, openedStateMode=${openedStateMode}, shading=true`; - test.meta({ browserSize: [600, 600] })(testName, async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, `${testName}.png`); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async () => { - await createDrawer({ - options: { openedStateMode }, - }); - }); -}); - -['top', 'bottom', 'left', 'right'].forEach((position: Position) => { - const testName = `Drawer, position=${position}, shading=true`; - test.meta({ browserSize: [600, 600] })(testName, async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, `${testName}.png`); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async () => { - await createDrawer({ - options: { position }, - }); - }); -}); - -test.meta({ browserSize: [600, 600] })('Drawer hidden', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await t.click(Selector('#container #hideDrawerBtn')); - - await testScreenshot(t, takeScreenshot, 'Drawer hidden.png'); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - await createDrawer({ - createOuterContent: ($container) => { - ($('
').appendTo($container) as any).dxButton({ - text: 'Hide Drawer', - onClick: () => ($(`#${$container.attr('id')} #drawer`) as any).dxDrawer('instance').hide(), - }); - }, - }); -}); - -[{ - testCase: 'Menu inside drawer', - selector: '.dx-menu-item', - createDrawerContent: ($container: JQuery) => { - ($('
').appendTo($container) as any).dxMenu({ - dataSource: [{ text: 'item1 very long text wider than panel', items: [{ text: 'item1/item1 very long text wider than panel' }, { text: 'item1/item2' }] }], - }); - }, -}, { - testCase: 'SelectBox inside drawer', - selector: '.dx-texteditor-container', - createDrawerContent: ($container: JQuery) => { - ($('
').appendTo($container) as any).dxSelectBox({ - dataSource: ['item1 very long text wider than panel', 'item2'], - }); - }, -}, { - testCase: 'Menu outside drawer', - selector: '.dx-menu-item', - createOuterContent: ($container: JQuery) => { - ($('
').appendTo($container) as any).dxMenu({ - dataSource: [{ text: 'item1 very long text wider than panel', items: [{ text: 'item1/item1 very long text wider than panel' }, { text: 'item1/item2' }] }], - }); - }, -}, { - testCase: 'SelectBox outside drawer', - selector: '.dx-texteditor-container', - createOuterContent: ($container: JQuery) => { - ($('
').appendTo($container) as any).dxSelectBox({ - dataSource: ['item1 very long text wider than panel', 'item2'], - }); - }, -}].forEach(({ - testCase, createDrawerContent, createOuterContent, selector, -}) => { - const testName = `Drawer z-index, ${testCase}, shading=true`; - test.meta({ browserSize: [600, 600] })(testName, async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await t.click(`#container #content ${selector}`); - - await testScreenshot(t, takeScreenshot, `${testName}_container.png`); - - await t.click(Selector('#showPopupBtn')); - await t.click(`#popup1_template #content ${selector}`); - - await testScreenshot(t, takeScreenshot, `${testName}_popup.png`); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async () => { - await createDrawer({ - createDrawerContent, - createOuterContent, - testInPopup: true, - }); - }); -}); diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/drawer.helpers.ts b/e2e/testcafe-devextreme/tests/navigation/drawer/drawer.helpers.ts deleted file mode 100644 index cabeea8697d6..000000000000 --- a/e2e/testcafe-devextreme/tests/navigation/drawer/drawer.helpers.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { ClientFunction } from 'testcafe'; -import { Properties } from 'devextreme/ui/drawer'; - -interface CreateDrawerConfig { - options?: Properties; - createDrawerContent?: ($drawerContent: JQuery) => void; - createOuterContent?: ($container: JQuery) => void; - testInPopup?: boolean; -} - -export const createDrawer = ClientFunction(({ - options = {}, - createDrawerContent, - createOuterContent, - testInPopup = false, -}: CreateDrawerConfig) => { - const createDrawerInt = ($container: JQuery) => { - if (createOuterContent) { - createOuterContent($container); - } - - const $drawer = $('
'); - const $templateView = $('
').appendTo($drawer); - - $('
') - .text('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Penatibus et magnis dis parturient. Eget dolor morbi non arcu risus. Tristique magna sit amet purus gravida quis blandit. Auctor urna nunc id cursus metus aliquam eleifend mi in.') - .appendTo($templateView); - - ($drawer.appendTo($container) as any).dxDrawer({ - opened: true, - shading: true, - height: 400, - template: () => { - const isTopOrBottom = options.position === 'top' || options.position === 'bottom'; - const cssSizeProperty = isTopOrBottom ? 'width' : 'height'; - - const $result = $('
') - .css('background-color', 'aqua') - .css(cssSizeProperty, '100%'); - - if (isTopOrBottom) { - $result.height('100px'); - } else { - $result.width('200px'); - } - - if (createDrawerContent) { - createDrawerContent($result); - } else { - $('
').text('Drawer Content').appendTo($result); - } - - return $result; - }, - ...options, - }); - }; - - if (testInPopup) { - ($('
').appendTo($('#container')) as any).dxButton({ - text: 'Show Popup', - onClick: () => ($('#popup1') as any).dxPopup('instance').show(), - }); - - ($('
').appendTo($('#container')) as any).dxPopup({ - position: 'top', - height: 600, - showTitle: false, - contentTemplate: () => { - const $popupTemplate = $('
').css('background-color', 'blanchedalmond').css('height', '100%'); - createDrawerInt($popupTemplate); - return $popupTemplate; - }, - }); - } - - createDrawerInt($('#container')); -}); diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer hidden (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer hidden (fluent-next.blue.light).png deleted file mode 100644 index 72f995dff4f2..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer hidden (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer hidden (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer hidden (fluent.blue.light).png deleted file mode 100644 index 13895fbb1cfd..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer hidden (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_container (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_container (fluent-next.blue.light).png deleted file mode 100644 index 89f7a0b77703..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_container (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_container (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_container (fluent.blue.light).png deleted file mode 100644 index f0d26d2413ca..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_container (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_popup (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_popup (fluent-next.blue.light).png deleted file mode 100644 index c23a91b3657b..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_popup (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_popup (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_popup (fluent.blue.light).png deleted file mode 100644 index f52b0c40e72a..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu inside drawer, shading=true_popup (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_container (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_container (fluent-next.blue.light).png deleted file mode 100644 index 7a2f66bdbf2d..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_container (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_container (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_container (fluent.blue.light).png deleted file mode 100644 index 19e4f2efe0d8..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_container (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_popup (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_popup (fluent-next.blue.light).png deleted file mode 100644 index 3f510e1d7e3b..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_popup (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_popup (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_popup (fluent.blue.light).png deleted file mode 100644 index 0cb1755b6ea9..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, Menu outside drawer, shading=true_popup (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_container (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_container (fluent-next.blue.light).png deleted file mode 100644 index 6b7bd502eb24..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_container (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_container (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_container (fluent.blue.light).png deleted file mode 100644 index 5e5c5d401c57..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_container (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_popup (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_popup (fluent-next.blue.light).png deleted file mode 100644 index c152b6739cd8..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_popup (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_popup (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_popup (fluent.blue.light).png deleted file mode 100644 index 98c198d8dfc3..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox inside drawer, shading=true_popup (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_container (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_container (fluent-next.blue.light).png deleted file mode 100644 index 7325732887e4..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_container (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_container (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_container (fluent.blue.light).png deleted file mode 100644 index 6cbe9e8e01ad..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_container (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_popup (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_popup (fluent-next.blue.light).png deleted file mode 100644 index 19202d1f2745..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_popup (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_popup (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_popup (fluent.blue.light).png deleted file mode 100644 index 6dfdacda332e..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer z-index, SelectBox outside drawer, shading=true_popup (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=overlap, shading=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=overlap, shading=true (fluent-next.blue.light).png deleted file mode 100644 index 491084388d11..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=overlap, shading=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=overlap, shading=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=overlap, shading=true (fluent.blue.light).png deleted file mode 100644 index e2e564bb2aa5..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=overlap, shading=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=push, shading=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=push, shading=true (fluent-next.blue.light).png deleted file mode 100644 index 659647bd252d..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=push, shading=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=push, shading=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=push, shading=true (fluent.blue.light).png deleted file mode 100644 index a74ac75a80d5..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=push, shading=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=shrink, shading=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=shrink, shading=true (fluent-next.blue.light).png deleted file mode 100644 index 713cfa0bad2b..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=shrink, shading=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=shrink, shading=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=shrink, shading=true (fluent.blue.light).png deleted file mode 100644 index 4045a96eba4c..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, openedStateMode=shrink, shading=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=bottom, shading=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=bottom, shading=true (fluent-next.blue.light).png deleted file mode 100644 index c24f92491869..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=bottom, shading=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=bottom, shading=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=bottom, shading=true (fluent.blue.light).png deleted file mode 100644 index 3fa010e4b50b..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=bottom, shading=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=left, shading=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=left, shading=true (fluent-next.blue.light).png deleted file mode 100644 index 713cfa0bad2b..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=left, shading=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=left, shading=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=left, shading=true (fluent.blue.light).png deleted file mode 100644 index 4045a96eba4c..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=left, shading=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=right, shading=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=right, shading=true (fluent-next.blue.light).png deleted file mode 100644 index 0a54586b2a4b..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=right, shading=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=right, shading=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=right, shading=true (fluent.blue.light).png deleted file mode 100644 index 7a23e6373a7e..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=right, shading=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=top, shading=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=top, shading=true (fluent-next.blue.light).png deleted file mode 100644 index 0e16ce3131c0..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=top, shading=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=top, shading=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=top, shading=true (fluent.blue.light).png deleted file mode 100644 index 4392d7c410c7..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/drawer/etalons/Drawer, position=top, shading=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/gallery/common.ts b/e2e/testcafe-devextreme/tests/navigation/gallery/common.ts deleted file mode 100644 index 419be74cc87b..000000000000 --- a/e2e/testcafe-devextreme/tests/navigation/gallery/common.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; -import Gallery from 'devextreme-testcafe-models/gallery'; -import { testScreenshot } from '../../../helpers/themeUtils'; -import { createWidget } from '../../../helpers/createWidget'; -import url from '../../../helpers/getPageUrl'; -import { setAttribute } from '../../../helpers/domUtils'; - -const YELLOW_PIXEL = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAMSURBVBhXYzi8wA8AA9sBsq0bEHsAAAAASUVORK5CYII='; -const BLACK_PIXEL = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAMSURBVBhXY1hSWg4AA1EBkakDs38AAAAASUVORK5CYII='; -const RED_PIXEL = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAMSURBVBhXY/i5aQsABQcCYPaWuk8AAAAASUVORK5CYII='; - -fixture.disablePageReloads`Click on indicator` - .page(url(__dirname, '../../container.html')); - -test('click on indicator item should change selected item', async (t) => { - const gallery = new Gallery('#container'); - const secondIndicatorItem = gallery.getIndicatorItem(1); - - await t - .click(secondIndicatorItem.element) - .expect(secondIndicatorItem.isSelected).ok(); -}).before(async () => createWidget('dxGallery', { - height: 300, - showIndicator: true, - items: [BLACK_PIXEL, RED_PIXEL, YELLOW_PIXEL], -})); - -[true, false].forEach((showIndicator) => { - test(`Gallery. Check normal and focus state. showIndicator=${showIndicator}`, async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, `Gallery. showIndicator=${showIndicator}.png`, { element: '#container' }); - - await t.click('#container'); - - await testScreenshot(t, takeScreenshot, `Focused gallery. showIndicator=${showIndicator}.png`, { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async () => { - await createWidget('dxGallery', { - height: 110, - showIndicator, - items: [BLACK_PIXEL, RED_PIXEL, YELLOW_PIXEL], - itemTemplate(item: string) { - const result = $('
'); - - $('') - .attr({ src: item }) - .height(100) - .width(100) - .appendTo(result); - - return result; - }, - }); - - await setAttribute('#container', 'style', 'width: 120px; height: 120px;'); - }); -}); diff --git a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Focused gallery. showIndicator=false (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Focused gallery. showIndicator=false (fluent-next.blue.light).png deleted file mode 100644 index ab31ff8d5beb..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Focused gallery. showIndicator=false (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Focused gallery. showIndicator=false (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Focused gallery. showIndicator=false (fluent.blue.light).png deleted file mode 100644 index ab31ff8d5beb..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Focused gallery. showIndicator=false (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Focused gallery. showIndicator=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Focused gallery. showIndicator=true (fluent-next.blue.light).png deleted file mode 100644 index 6aec1b72cd9b..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Focused gallery. showIndicator=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Focused gallery. showIndicator=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Focused gallery. showIndicator=true (fluent.blue.light).png deleted file mode 100644 index 23766f4e8457..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Focused gallery. showIndicator=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Gallery. showIndicator=false (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Gallery. showIndicator=false (fluent-next.blue.light).png deleted file mode 100644 index b2a5739d6644..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Gallery. showIndicator=false (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Gallery. showIndicator=false (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Gallery. showIndicator=false (fluent.blue.light).png deleted file mode 100644 index b2a5739d6644..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Gallery. showIndicator=false (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Gallery. showIndicator=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Gallery. showIndicator=true (fluent-next.blue.light).png deleted file mode 100644 index 6aec1b72cd9b..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Gallery. showIndicator=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Gallery. showIndicator=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Gallery. showIndicator=true (fluent.blue.light).png deleted file mode 100644 index 23766f4e8457..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/gallery/etalons/Gallery. showIndicator=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/common.ts b/e2e/testcafe-devextreme/tests/navigation/stepper/common.ts deleted file mode 100644 index 214c7c3dc77a..000000000000 --- a/e2e/testcafe-devextreme/tests/navigation/stepper/common.ts +++ /dev/null @@ -1,204 +0,0 @@ -import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; -import { Item } from 'devextreme/ui/stepper.d'; -import Stepper from 'devextreme-testcafe-models/stepper'; -import { testScreenshot } from '../../../helpers/themeUtils'; -import url from '../../../helpers/getPageUrl'; -import { createWidget } from '../../../helpers/createWidget'; -import { appendElementTo, setAttribute } from '../../../helpers/domUtils'; - -fixture.disablePageReloads`Stepper_common` - .page(url(__dirname, '../../container.html')); - -const commonItems: Item[] = [ - { icon: 'cart', label: 'Cart' }, - { icon: 'clipboardtasklist', label: 'Shipping Info' }, - { icon: 'gift', label: 'Promo Code', optional: true }, - { icon: 'packagebox', label: 'Checkout' }, - { icon: 'checkmarkcircle', label: 'Ordered' }, -]; - -['horizontal', 'vertical'].forEach((orientation) => { - test('Stepper common properties', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - await testScreenshot(t, takeScreenshot, `Stepper orient=${orientation}.png`, { - element: '#container', - }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async () => { - await appendElementTo('#container', 'div', 'stepper'); - await appendElementTo('#container', 'div', 'stepper2'); - - const containerStyle = orientation === 'horizontal' ? 'width: 800px; flex-direction: column;' : 'height: 600px; width: 400px'; - await setAttribute('#container', 'style', `display: flex; gap: 40px; ${containerStyle}`); - - const stepperOptions = { - selectedIndex: 4, - orientation, - dataSource: commonItems, - }; - - const stepperRTLOptions = { - ...stepperOptions, - rtlEnabled: true, - }; - - await createWidget('dxStepper', stepperOptions, '#stepper'); - - return createWidget('dxStepper', stepperRTLOptions, '#stepper2'); - }); -}); - -test('Stepper text overflow in horizontal orientation', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - await testScreenshot(t, takeScreenshot, 'Stepper text overflow orient=horizontal.png', { element: '#parentContainer' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - await appendElementTo('#container', 'div', 'stepper'); - await setAttribute('#container', 'style', 'width: 200px; height: 150px; overflow: auto;'); - - await appendElementTo('#otherContainer', 'div', 'stepper2'); - await setAttribute('#otherContainer', 'style', 'width: 400px; height: 150px; overflow: auto;'); - - await setAttribute('#parentContainer', 'style', 'width: 400px;'); - - const stepperOptions = { - dataSource: commonItems, - }; - - await createWidget('dxStepper', stepperOptions, '#stepper'); - - return createWidget('dxStepper', stepperOptions, '#stepper2'); -}); - -test('Stepper text overflow in vertical orientation', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - await testScreenshot(t, takeScreenshot, 'Stepper text overflow orient=vertical.png', { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - await appendElementTo('#container', 'div', 'stepper'); - await appendElementTo('#container', 'div', 'stepper2'); - await setAttribute('#container', 'style', 'display: flex; gap: 40px; width: 400px'); - - const stepperOptions = { - dataSource: commonItems, - width: 120, - height: 400, - orientation: 'vertical', - }; - - const stepperRTLOptions = { - ...stepperOptions, - rtlEnabled: true, - }; - - await createWidget('dxStepper', stepperOptions, '#stepper'); - - return createWidget('dxStepper', stepperRTLOptions, '#stepper2'); -}); - -[true, false].forEach((selectOnFocus) => { - test('Stepper item states', async (t) => { - const state = selectOnFocus ? 'selected' : 'focused'; - - await t.pressKey('tab'); - - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - await testScreenshot(t, takeScreenshot, `Stepper 1st step selected,selectOnFocus=${selectOnFocus}.png`, { element: '#stepper' }); - - await t.pressKey('right'); - await testScreenshot(t, takeScreenshot, `Stepper valid step ${state},selectOnFocus=${selectOnFocus}.png`, { element: '#stepper' }); - - await t.pressKey('right'); - await testScreenshot(t, takeScreenshot, `Stepper invalid step ${state},selectOnFocus=${selectOnFocus}.png`, { element: '#stepper' }); - - await t.pressKey('right'); - await testScreenshot(t, takeScreenshot, `Stepper disabled step focused,selectOnFocus=${selectOnFocus}.png`, { element: '#stepper' }); - - await t.pressKey('right'); - await testScreenshot(t, takeScreenshot, `Stepper disabled valid step focused,selectOnFocus=${selectOnFocus}.png`, { element: '#stepper' }); - - await t.pressKey('right'); - await testScreenshot(t, takeScreenshot, `Stepper disabled invalid step focused,selectOnFocus=${selectOnFocus}.png`, { element: '#stepper' }); - - await t.pressKey('right'); - await testScreenshot(t, takeScreenshot, `Stepper last step ${state},selectOnFocus=${selectOnFocus}.png`, { element: '#stepper' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async () => { - await appendElementTo('#container', 'div', 'stepper'); - await setAttribute('#container', 'style', 'width: 800px; height: 150px;'); - - const dataSource: Item[] = [ - { label: 'Default' }, - { label: 'Valid', isValid: true, optional: true }, - { label: 'Invalid', isValid: false, optional: true }, - { - label: 'Disabled', icon: 'packagebox', disabled: true, optional: true, - }, - { label: 'Disabled Valid', disabled: true, isValid: true }, - { label: 'Disabled Invalid', disabled: true, isValid: false }, - { label: 'With Text', text: 'T', optional: true }, - ]; - - const stepperOptions = { - selectOnFocus, - dataSource, - }; - - return createWidget('dxStepper', stepperOptions, '#stepper'); - }); -}); - -test('Stepper completed item states', async (t) => { - const stepper = new Stepper('#container'); - await t.click(stepper.getItem(3).element); - - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await t.pressKey('left'); - await testScreenshot(t, takeScreenshot, 'Completed invalid step focused.png', { element: '#stepper' }); - - await t.pressKey('left'); - await testScreenshot(t, takeScreenshot, 'Completed valid step focused.png', { element: '#stepper' }); - - await t.pressKey('left'); - await testScreenshot(t, takeScreenshot, 'Completed step focused.png', { element: '#stepper' }); - - await t.click('body', { - offsetX: -10, - offsetY: -10, - }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - await appendElementTo('#container', 'div', 'stepper'); - await setAttribute('#container', 'style', 'width: 800px; height: 150px;'); - - const dataSource: Item[] = [ - { label: 'Default' }, - { label: 'Valid', isValid: true, optional: true }, - { label: 'Invalid', isValid: false, optional: true }, - { label: 'With Text', text: 'T', optional: true }, - ]; - - const stepperOptions = { - selectOnFocus: false, - dataSource, - selectedIndex: 3, - }; - - return createWidget('dxStepper', stepperOptions, '#stepper'); -}); diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed invalid step focused (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed invalid step focused (fluent-next.blue.light).png deleted file mode 100644 index 9fdd3aff0d7a..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed invalid step focused (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed invalid step focused (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed invalid step focused (fluent.blue.light).png deleted file mode 100644 index 63d6561790d0..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed invalid step focused (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed step focused (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed step focused (fluent-next.blue.light).png deleted file mode 100644 index fba516824adf..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed step focused (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed step focused (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed step focused (fluent.blue.light).png deleted file mode 100644 index e85c6e377003..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed step focused (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed valid step focused (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed valid step focused (fluent-next.blue.light).png deleted file mode 100644 index bf29348d8c07..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed valid step focused (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed valid step focused (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed valid step focused (fluent.blue.light).png deleted file mode 100644 index f2ac6a3e29c0..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Completed valid step focused (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=false (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=false (fluent-next.blue.light).png deleted file mode 100644 index 4e86efff884f..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=false (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=false (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=false (fluent.blue.light).png deleted file mode 100644 index c21e5d945745..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=false (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=true (fluent-next.blue.light).png deleted file mode 100644 index 4e86efff884f..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=true (fluent.blue.light).png deleted file mode 100644 index c21e5d945745..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper 1st step selected,selectOnFocus=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=false (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=false (fluent-next.blue.light).png deleted file mode 100644 index 024c1b34cdd7..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=false (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=false (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=false (fluent.blue.light).png deleted file mode 100644 index e2954c711488..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=false (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=true (fluent-next.blue.light).png deleted file mode 100644 index adf7494ae4cb..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=true (fluent.blue.light).png deleted file mode 100644 index d0de34a80f90..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled invalid step focused,selectOnFocus=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=false (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=false (fluent-next.blue.light).png deleted file mode 100644 index 62da2c1e16a0..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=false (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=false (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=false (fluent.blue.light).png deleted file mode 100644 index 018e7b746d7a..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=false (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=true (fluent-next.blue.light).png deleted file mode 100644 index 1e1984d229cf..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=true (fluent.blue.light).png deleted file mode 100644 index 46a3092f6ddc..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled step focused,selectOnFocus=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=false (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=false (fluent-next.blue.light).png deleted file mode 100644 index 1864856ae55f..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=false (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=false (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=false (fluent.blue.light).png deleted file mode 100644 index 33d2d20b3f54..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=false (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=true (fluent-next.blue.light).png deleted file mode 100644 index 8e5b8edcac56..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=true (fluent.blue.light).png deleted file mode 100644 index a4639f064ee7..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper disabled valid step focused,selectOnFocus=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper invalid step focused,selectOnFocus=false (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper invalid step focused,selectOnFocus=false (fluent-next.blue.light).png deleted file mode 100644 index 22106136fc1d..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper invalid step focused,selectOnFocus=false (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper invalid step focused,selectOnFocus=false (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper invalid step focused,selectOnFocus=false (fluent.blue.light).png deleted file mode 100644 index 5e9315bbb457..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper invalid step focused,selectOnFocus=false (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper invalid step selected,selectOnFocus=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper invalid step selected,selectOnFocus=true (fluent-next.blue.light).png deleted file mode 100644 index 4a07327b1a7a..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper invalid step selected,selectOnFocus=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper invalid step selected,selectOnFocus=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper invalid step selected,selectOnFocus=true (fluent.blue.light).png deleted file mode 100644 index c1d3b9b584b5..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper invalid step selected,selectOnFocus=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper last step focused,selectOnFocus=false (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper last step focused,selectOnFocus=false (fluent-next.blue.light).png deleted file mode 100644 index cf7cae11b9f2..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper last step focused,selectOnFocus=false (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper last step focused,selectOnFocus=false (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper last step focused,selectOnFocus=false (fluent.blue.light).png deleted file mode 100644 index 06f45ac9d6ac..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper last step focused,selectOnFocus=false (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper last step selected,selectOnFocus=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper last step selected,selectOnFocus=true (fluent-next.blue.light).png deleted file mode 100644 index d20c186965bf..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper last step selected,selectOnFocus=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper last step selected,selectOnFocus=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper last step selected,selectOnFocus=true (fluent.blue.light).png deleted file mode 100644 index b472ba0c041a..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper last step selected,selectOnFocus=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper orient=horizontal (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper orient=horizontal (fluent-next.blue.light).png deleted file mode 100644 index 0167381aa8ee..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper orient=horizontal (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper orient=horizontal (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper orient=horizontal (fluent.blue.light).png deleted file mode 100644 index 45b5454fea57..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper orient=horizontal (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper orient=vertical (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper orient=vertical (fluent-next.blue.light).png deleted file mode 100644 index 10621e810c1a..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper orient=vertical (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper orient=vertical (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper orient=vertical (fluent.blue.light).png deleted file mode 100644 index fe2ce36764d9..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper orient=vertical (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper text overflow orient=horizontal (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper text overflow orient=horizontal (fluent-next.blue.light).png deleted file mode 100644 index d8a80a2d080c..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper text overflow orient=horizontal (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper text overflow orient=horizontal (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper text overflow orient=horizontal (fluent.blue.light).png deleted file mode 100644 index 19e931f2e777..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper text overflow orient=horizontal (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper text overflow orient=vertical (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper text overflow orient=vertical (fluent-next.blue.light).png deleted file mode 100644 index 783ae252b139..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper text overflow orient=vertical (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper text overflow orient=vertical (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper text overflow orient=vertical (fluent.blue.light).png deleted file mode 100644 index 02c2a3135c57..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper text overflow orient=vertical (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper valid step focused,selectOnFocus=false (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper valid step focused,selectOnFocus=false (fluent-next.blue.light).png deleted file mode 100644 index ac7dddf93eb8..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper valid step focused,selectOnFocus=false (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper valid step focused,selectOnFocus=false (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper valid step focused,selectOnFocus=false (fluent.blue.light).png deleted file mode 100644 index 6e0bd14152d1..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper valid step focused,selectOnFocus=false (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper valid step selected,selectOnFocus=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper valid step selected,selectOnFocus=true (fluent-next.blue.light).png deleted file mode 100644 index f63fc1791f20..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper valid step selected,selectOnFocus=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper valid step selected,selectOnFocus=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper valid step selected,selectOnFocus=true (fluent.blue.light).png deleted file mode 100644 index a62de2d76f89..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/stepper/etalons/Stepper valid step selected,selectOnFocus=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/common.ts b/e2e/testcafe-devextreme/tests/navigation/tabPanel/common.ts deleted file mode 100644 index 54e4906a327f..000000000000 --- a/e2e/testcafe-devextreme/tests/navigation/tabPanel/common.ts +++ /dev/null @@ -1,402 +0,0 @@ -import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; -import { - Selector, - ClientFunction, -} from 'testcafe'; -import TabPanel from 'devextreme-testcafe-models/tabPanel'; -import { Item } from 'devextreme/ui/tab_panel.d'; -import { testScreenshot } from '../../../helpers/themeUtils'; -import url from '../../../helpers/getPageUrl'; -import { createWidget } from '../../../helpers/createWidget'; -import { setAttribute, appendElementTo, insertStylesheetRulesToPage } from '../../../helpers/domUtils'; - -const TABS_RIGHT_NAV_BUTTON_CLASS = 'dx-tabs-nav-button-right'; -const TABS_LEFT_NAV_BUTTON_CLASS = 'dx-tabs-nav-button-left'; - -fixture.disablePageReloads`TabPanel_common` - .page(url(__dirname, '../../container.html')); - -['with scrolling', 'without scrolling'].forEach((mode) => { - const testName = `TabPanel borders ${mode}`; - test(testName, async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, `${testName}.png`, { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async () => { - const dataSource: Item[] = [ - { - title: 'John Heart', - text: 'John Heart', - }, { - title: 'Olivia Peyton', - text: 'Olivia Peyton', - }, { - title: 'Robert Reagan', - text: 'Robert Reagan', - }, { - title: 'Greta Sims', - text: 'Greta Sims', - }, { - title: 'Olivia Peyton', - text: 'Olivia Peyton', - }, - ]; - - const tabPanelOptions = { - dataSource, - itemTemplate: (_, __, itemElement) => { - ($('
').css('marginTop', '10px') as any) - .dxTabs({ - items: [ - { - title: 'John Heart', - text: 'John Heart', - }, { - title: 'Olivia Peyton', - text: 'Olivia Peyton', - }, { - title: 'Robert Reagan', - text: 'Robert Reagan', - }, { - title: 'Greta Sims', - text: 'Greta Sims', - }, { - title: 'Olivia Peyton', - text: 'Olivia Peyton', - }, - ], - width: 300, - showNavButtons: true, - }) - .appendTo(itemElement); - }, - height: 120, - width: mode === 'with scrolling' ? 300 : 900, - showNavButtons: true, - }; - - return createWidget('dxTabPanel', tabPanelOptions); - }); -}); - -test('TabPanel text-overflow with tabsPosition left', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, 'TabPanel text-overflow when tabsPosition is left.png', { element: '#container' }); - - await setAttribute('.dx-tabs-wrapper', 'style', 'max-width: 130px;'); - - await testScreenshot(t, takeScreenshot, 'TabPanel text-overflow when tabs wrapper width is limited.png', { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - const dataSource: Item[] = [ - { icon: 'user', text: 'John Heart', title: 'John Heart' }, - { icon: 'user', text: 'Marina Elizabeth Thomas Grace Sophia', title: 'Mariya Elizabeth Thomas Grace Sophia' }, - { icon: 'user', text: 'Robert Reagan', title: 'Robert Reagan' }, - { icon: 'user', text: 'Greta Sims', title: 'Greta Sims' }, - ]; - - return createWidget('dxTabPanel', { - dataSource, - width: 600, - height: 250, - tabsPosition: 'left', - showNavButtons: true, - }); -}); - -test('TabPanel focus borders after change selectedIndex in runtime', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - const tabPanel = new TabPanel('#container'); - await tabPanel.option('selectedIndex', 1); - - await testScreenshot(t, takeScreenshot, 'TabPanel focus borders.png', { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - const dataSource: Item[] = [ - { - title: 'John Heart', - text: 'John Heart', - }, { - title: 'Olivia Peyton', - text: 'Olivia Peyton', - }, { - title: 'Robert Reagan', - text: 'Robert Reagan', - }, { - title: 'Greta Sims', - text: 'Greta Sims', - }, { - title: 'Olivia Peyton', - text: 'Olivia Peyton', - }, - ]; - - return createWidget('dxTabPanel', { - dataSource, - height: 120, - width: 300, - }); -}); - -test('TabPanel navigation buttons hover', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await t.click('body', { - offsetX: -10, - offsetY: -10, - }); - - const rightNavButton = Selector(`.${TABS_RIGHT_NAV_BUTTON_CLASS}`); - await t - .click(rightNavButton) - .hover(rightNavButton); - - await testScreenshot(t, takeScreenshot, 'TabPanel right navigation button hovered.png', { element: '#container' }); - - const leftNavButton = Selector(`.${TABS_LEFT_NAV_BUTTON_CLASS}`); - await t.hover(leftNavButton); - - await testScreenshot(t, takeScreenshot, 'TabPanel left navigation button hovered.png', { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - const dataSource: Item[] = [ - { - title: 'John Heart', - text: 'John Heart', - }, { - title: 'Olivia Peyton', - text: 'Olivia Peyton', - }, { - title: 'Robert Reagan', - text: 'Robert Reagan', - }, { - title: 'Greta Sims', - text: 'Greta Sims', - }, { - title: 'Olivia Peyton', - text: 'Olivia Peyton', - }, - ]; - - const tabPanelOptions = { - dataSource, - height: 120, - width: 400, - showNavButtons: true, - selectedIndex: 2, - useInkRipple: false, - }; - - return createWidget('dxTabPanel', tabPanelOptions); -}); - -['top', 'right', 'bottom', 'left'].forEach((tabsPosition) => { - const testName = `TabPanel without focus,tabsPosition=${tabsPosition}`; - test(testName, async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await t.click('body', { - offsetX: -10, - offsetY: -10, - }); - - await testScreenshot(t, takeScreenshot, `${testName}.png`, { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async () => { - await appendElementTo('#container', 'div', 'tabpanel'); - await appendElementTo('#container', 'div', 'tabpanel-rtl'); - await setAttribute('#container', 'style', 'display: flex; gap: 40px; flex-direction: column; width: fit-content;'); - - const dataSource: Item[] = [ - { - title: 'John Heart', - text: 'John Heart', - }, { - title: 'Olivia Peyton', - text: 'Olivia Peyton', - }, { - title: 'Robert Reagan', - text: 'Robert Reagan', - }, { - title: 'Greta Sims', - text: 'Greta Sims', - }, { - title: 'Olivia Peyton', - text: 'Olivia Peyton', - }, - ]; - - const tabPanelOptions = { - dataSource, - height: 250, - width: 450, - tabsPosition, - useInkRipple: false, - }; - - await createWidget('dxTabPanel', tabPanelOptions, '#tabpanel'); - return createWidget('dxTabPanel', { ...tabPanelOptions, rtlEnabled: true }, '#tabpanel-rtl'); - }); -}); - -test('TabPanel item focus when clicking on multiview', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - const tabPanel = new TabPanel('#container'); - await t.click(tabPanel.multiView.element); - await testScreenshot(t, takeScreenshot, 'TabPanel item focus when clicking on multiview.png', { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - const dataSource: Item[] = [ - { - title: 'John Heart', - text: 'John Heart', - }, { - title: 'Olivia Peyton', - text: 'Olivia Peyton', - }, { - title: 'Robert Reagan', - text: 'Robert Reagan', - }, { - title: 'Greta Sims', - text: 'Greta Sims', - }, { - title: 'Olivia Peyton', - text: 'Olivia Peyton', - }, - ]; - - return createWidget('dxTabPanel', { - dataSource, - height: 250, - width: 450, - useInkRipple: false, - }); -}); - -const positions = ['top', 'left', 'right', 'bottom']; - -positions.forEach((tabsPosition) => { - test(`TabPanel border appearance when it placed inside the content of TabPanel with=${tabsPosition}`, async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, `Nested TabPanel borders appearance,tabsPos=${tabsPosition}.png`, { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async () => { - await insertStylesheetRulesToPage('.dx-tabpanel { margin: 10px }'); - - const dataSource: Item[] = [ - { - title: 'John Heart', - text: 'John Heart', - }, { - title: 'Olivia Peyton', - text: 'Olivia Peyton', - }, - ]; - - return createWidget('dxTabPanel', { - dataSource, - height: 700, - width: 500, - tabsPosition, - selectedIndex: 1, - deferRendering: true, - itemTemplate: ClientFunction(() => { - const $container = $('
'); - - positions.forEach((position) => { - const $tabPanel = ($('
') as any).dxTabPanel({ - height: 120, - tabsPosition: position, - dataSource, - }); - - $container.append($tabPanel); - - $container.append($('
')); - }); - - return $container; - }, { - dependencies: { dataSource, positions }, - }), - }); - }); -}); - -test('TabPanel tabs min-width', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, 'TabPanel tabs min-width.png', { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - const dataSource: Item[] = [ - { text: 'ok', title: 'ok' }, - { icon: 'comment' }, - { icon: 'user' }, - { icon: 'money' }, - { text: 'ok', title: 'ok', icon: 'search' }, - { text: 'alignright', title: 'alignright', icon: 'alignright' }, - ]; - - return createWidget('dxTabPanel', { - dataSource, - height: 250, - width: 900, - useInkRipple: false, - }); -}); - -['left', 'right'].forEach((tabsPosition) => { - test('TabPanel should be shown correctly even if there is only one tab', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, `TabPanel with single tab, tabPosition=${tabsPosition}.png`, { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async () => { - const dataSource: Item[] = [ - { - title: 'John Heart', - text: 'John Heart', - }, - ]; - - return createWidget('dxTabPanel', { - dataSource, - height: 120, - width: 300, - tabsPosition, - }); - }); -}); diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=bottom (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=bottom (fluent-next.blue.light).png deleted file mode 100644 index c500be1cae66..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=bottom (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=bottom (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=bottom (fluent.blue.light).png deleted file mode 100644 index 91e36d8e69ef..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=bottom (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=left (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=left (fluent-next.blue.light).png deleted file mode 100644 index e7256fe2801b..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=left (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=left (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=left (fluent.blue.light).png deleted file mode 100644 index 8431abf53543..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=left (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=right (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=right (fluent-next.blue.light).png deleted file mode 100644 index b9a7ee8d217c..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=right (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=right (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=right (fluent.blue.light).png deleted file mode 100644 index 7f744254729e..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=right (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=top (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=top (fluent-next.blue.light).png deleted file mode 100644 index f95721315906..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=top (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=top (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=top (fluent.blue.light).png deleted file mode 100644 index d87518b15b67..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/Nested TabPanel borders appearance,tabsPos=top (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel borders with scrolling (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel borders with scrolling (fluent-next.blue.light).png deleted file mode 100644 index e6ffd9f8bf8b..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel borders with scrolling (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel borders with scrolling (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel borders with scrolling (fluent.blue.light).png deleted file mode 100644 index bc1dd040062f..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel borders with scrolling (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel borders without scrolling (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel borders without scrolling (fluent-next.blue.light).png deleted file mode 100644 index b74f7a152581..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel borders without scrolling (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel borders without scrolling (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel borders without scrolling (fluent.blue.light).png deleted file mode 100644 index f8da52350fbf..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel borders without scrolling (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel focus borders (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel focus borders (fluent-next.blue.light).png deleted file mode 100644 index fb6f701c6a8f..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel focus borders (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel focus borders (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel focus borders (fluent.blue.light).png deleted file mode 100644 index c1b48578a1b5..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel focus borders (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel item focus when clicking on multiview (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel item focus when clicking on multiview (fluent-next.blue.light).png deleted file mode 100644 index 8b8f1429de82..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel item focus when clicking on multiview (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel item focus when clicking on multiview (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel item focus when clicking on multiview (fluent.blue.light).png deleted file mode 100644 index 006df9ee1b88..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel item focus when clicking on multiview (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel left navigation button hovered (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel left navigation button hovered (fluent-next.blue.light).png deleted file mode 100644 index e1f251c4cf91..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel left navigation button hovered (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel left navigation button hovered (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel left navigation button hovered (fluent.blue.light).png deleted file mode 100644 index 9decc624393e..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel left navigation button hovered (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel right navigation button hovered (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel right navigation button hovered (fluent-next.blue.light).png deleted file mode 100644 index da155ab9cf2a..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel right navigation button hovered (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel right navigation button hovered (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel right navigation button hovered (fluent.blue.light).png deleted file mode 100644 index 1a4664bb8bdd..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel right navigation button hovered (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel tabs min-width (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel tabs min-width (fluent-next.blue.light).png deleted file mode 100644 index 626db07be19c..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel tabs min-width (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel tabs min-width (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel tabs min-width (fluent.blue.light).png deleted file mode 100644 index d91689952138..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel tabs min-width (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabs wrapper width is limited (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabs wrapper width is limited (fluent-next.blue.light).png deleted file mode 100644 index 17bbdc9fe9f4..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabs wrapper width is limited (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabs wrapper width is limited (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabs wrapper width is limited (fluent.blue.light).png deleted file mode 100644 index d34931b1c0eb..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabs wrapper width is limited (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabsPosition is left (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabsPosition is left (fluent-next.blue.light).png deleted file mode 100644 index 911259e38c8c..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabsPosition is left (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabsPosition is left (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabsPosition is left (fluent.blue.light).png deleted file mode 100644 index f7cc4f11276e..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel text-overflow when tabsPosition is left (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=left (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=left (fluent-next.blue.light).png deleted file mode 100644 index 0c2ec2878a64..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=left (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=left (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=left (fluent.blue.light).png deleted file mode 100644 index 183aba66fa03..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=left (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=right (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=right (fluent-next.blue.light).png deleted file mode 100644 index c2b071475ee2..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=right (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=right (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=right (fluent.blue.light).png deleted file mode 100644 index 375375072cd6..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel with single tab, tabPosition=right (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=bottom (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=bottom (fluent-next.blue.light).png deleted file mode 100644 index f5ea8f4f6218..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=bottom (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=bottom (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=bottom (fluent.blue.light).png deleted file mode 100644 index 62ebdde64327..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=bottom (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=left (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=left (fluent-next.blue.light).png deleted file mode 100644 index dac71823b8e5..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=left (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=left (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=left (fluent.blue.light).png deleted file mode 100644 index 077f2ed71269..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=left (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=right (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=right (fluent-next.blue.light).png deleted file mode 100644 index e76a40518a5f..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=right (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=right (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=right (fluent.blue.light).png deleted file mode 100644 index 03e57cee9937..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=right (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=top (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=top (fluent-next.blue.light).png deleted file mode 100644 index cc38f6bc1b54..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=top (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=top (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=top (fluent.blue.light).png deleted file mode 100644 index 64298821e579..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabPanel/etalons/TabPanel without focus,tabsPosition=top (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabPanel/focus.ts b/e2e/testcafe-devextreme/tests/navigation/tabPanel/focus.ts deleted file mode 100644 index dd44fd54fed4..000000000000 --- a/e2e/testcafe-devextreme/tests/navigation/tabPanel/focus.ts +++ /dev/null @@ -1,260 +0,0 @@ -import { Selector, t } from 'testcafe'; -import TabPanel from 'devextreme-testcafe-models/tabPanel'; -import url from '../../../helpers/getPageUrl'; -import { createWidget } from '../../../helpers/createWidget'; -import { appendElementTo } from '../../../helpers/domUtils'; - -fixture.disablePageReloads`TabPanel` - .page(url(__dirname, '../../container.html')); - -// T821726 -test('[{0: selected}, {1}] -> click to tabs[1] -> click to external button', async () => { - const tabPanel = new TabPanel('#tabPanel'); - - await t - .click(tabPanel.tabs.getItem(1).element) - .expect(tabPanel.isFocused).ok() - .expect(tabPanel.tabs.isFocused) - .ok() - .expect(tabPanel.tabs.getItem(0).isFocused) - .notOk() - .expect(tabPanel.tabs.getItem(1).isFocused) - .ok() - .expect(tabPanel.multiView.getItem(0).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(1).isFocused) - .ok(); - - await t - .click(Selector('body'), { offsetY: 400 }) - .expect(tabPanel.isFocused).notOk() - .expect(tabPanel.tabs.isFocused) - .notOk() - .expect(tabPanel.tabs.getItem(0).isFocused) - .notOk() - .expect(tabPanel.tabs.getItem(1).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(1).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(0).isFocused) - .notOk(); -}).before(async () => { - await appendElementTo('#container', 'div', 'tabPanel'); - - return createWidget('dxTabPanel', { - items: ['Item 1', 'Item 2'], - }, '#tabPanel'); -}); - -test('[{0: selected}] -> click to multiView -> click to external button', async () => { - const tabPanel = new TabPanel('#tabPanel'); - - await t - .click(tabPanel.multiView.getItem(0).element) - .expect(tabPanel.isFocused).ok() - .expect(tabPanel.tabs.isFocused) - .ok() - .expect(tabPanel.tabs.getItem(0).isFocused) - .ok() - .expect(tabPanel.multiView.getItem(0).isFocused) - .ok(); - - await t - .click(Selector('body'), { offsetY: 400 }) - .expect(tabPanel.isFocused).notOk() - .expect(tabPanel.tabs.isFocused) - .notOk() - .expect(tabPanel.tabs.getItem(0).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(0).isFocused) - .notOk(); -}).before(async () => { - await appendElementTo('#container', 'div', 'tabPanel'); - - return createWidget('dxTabPanel', { - items: ['Item 1'], - }, '#tabPanel'); -}); - -test('[{0: selected}, {1}, {2}] -> click to tabs[1] -> navigate to tabs[2] -> click to external button', async () => { - const tabPanel = new TabPanel('#tabPanel'); - - await t - .click(tabPanel.tabs.getItem(1).element) - .expect(tabPanel.isFocused).ok() - .expect(tabPanel.tabs.isFocused) - .ok() - .expect(tabPanel.tabs.getItem(0).isFocused) - .notOk() - .expect(tabPanel.tabs.getItem(1).isFocused) - .ok() - .expect(tabPanel.tabs.getItem(2).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(0).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(1).isFocused) - .ok() - .expect(tabPanel.multiView.getItem(2).isFocused) - .notOk(); - - await t - .pressKey('right') - .expect(tabPanel.isFocused).ok() - .expect(tabPanel.tabs.isFocused) - .ok() - .expect(tabPanel.tabs.getItem(0).isFocused) - .notOk() - .expect(tabPanel.tabs.getItem(1).isFocused) - .notOk() - .expect(tabPanel.tabs.getItem(2).isFocused) - .ok() - .expect(tabPanel.multiView.getItem(0).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(1).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(2).isFocused) - .ok(); - - await t - .click(Selector('body'), { offsetY: 400 }) - .expect(tabPanel.isFocused).notOk() - .expect(tabPanel.tabs.isFocused) - .notOk() - .expect(tabPanel.tabs.getItem(0).isFocused) - .notOk() - .expect(tabPanel.tabs.getItem(1).isFocused) - .notOk() - .expect(tabPanel.tabs.getItem(2).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(0).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(1).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(2).isFocused) - .notOk(); -}).before(async () => { - await appendElementTo('#container', 'div', 'tabPanel'); - - return createWidget('dxTabPanel', { - items: ['Item 1', 'Item 2', 'Item 3'], - }, '#tabPanel'); -}); - -test('[{0: selected}, {1}] -> click to multiView -> navigate to tabs[1] -> click to external button', async () => { - const tabPanel = new TabPanel('#tabPanel'); - - await t - .click(tabPanel.multiView.getItem(0).element) - .expect(tabPanel.isFocused).ok() - .expect(tabPanel.tabs.isFocused) - .ok() - .expect(tabPanel.tabs.getItem(0).isFocused) - .ok() - .expect(tabPanel.tabs.getItem(1).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(0).isFocused) - .ok() - .expect(tabPanel.multiView.getItem(1).isFocused) - .notOk(); - - await t - .pressKey('right') - .expect(tabPanel.isFocused).ok() - .expect(tabPanel.tabs.isFocused) - .ok() - .expect(tabPanel.tabs.getItem(0).isFocused) - .notOk() - .expect(tabPanel.tabs.getItem(1).isFocused) - .ok() - .expect(tabPanel.multiView.getItem(0).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(1).isFocused) - .ok(); - - await t - .click(Selector('body'), { offsetY: 400 }) - .expect(tabPanel.isFocused).notOk() - .expect(tabPanel.tabs.isFocused) - .notOk() - .expect(tabPanel.tabs.getItem(0).isFocused) - .notOk() - .expect(tabPanel.tabs.getItem(1).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(0).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(1).isFocused) - .notOk(); -}).before(async () => { - await appendElementTo('#container', 'div', 'tabPanel'); - - return createWidget('dxTabPanel', { - items: ['Item 1', 'Item 2'], - }, '#tabPanel'); -}); - -test('[{0: selected}] -> click to multiView -> press "tab" -> press "tab"', async () => { - const tabPanel = new TabPanel('#container'); - - await t - .click(tabPanel.multiView.getItem(0).element) - .expect(tabPanel.isFocused).ok() - .expect(tabPanel.tabs.isFocused) - .ok() - .expect(tabPanel.tabs.getItem(0).isFocused) - .ok() - .expect(tabPanel.multiView.getItem(0).isFocused) - .ok(); - - await t - .pressKey('tab') - .expect(tabPanel.isFocused).ok() - .expect(tabPanel.tabs.isFocused) - .ok() - .expect(tabPanel.tabs.getItem(0).isFocused) - .ok() - .expect(tabPanel.multiView.getItem(0).isFocused) - .notOk(); - - await t - .pressKey('tab') - .expect(tabPanel.isFocused).notOk() - .expect(tabPanel.tabs.isFocused) - .notOk() - .expect(tabPanel.tabs.getItem(0).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(0).isFocused) - .notOk(); -}).before(async () => createWidget('dxTabPanel', { - items: ['Item 1'], -})); - -test('[{0: selected}] -> focusin by press "tab" -> press "tab"', async () => { - const tabPanel = new TabPanel('#tabPanel'); - - await t - .click(Selector('body'), { offsetY: 400 }) - .pressKey('tab') - .expect(tabPanel.isFocused).ok() - .expect(tabPanel.tabs.isFocused) - .ok() - .expect(tabPanel.tabs.getItem(0).isFocused) - .ok() - .expect(tabPanel.multiView.getItem(0).isFocused) - .ok(); - - await t - .pressKey('tab') - .expect(tabPanel.isFocused).notOk() - .expect(tabPanel.tabs.isFocused) - .notOk() - .expect(tabPanel.tabs.getItem(0).isFocused) - .notOk() - .expect(tabPanel.multiView.getItem(0).isFocused) - .notOk(); -}).before(async () => { - await appendElementTo('#container', 'div', 'tabPanel'); - - return createWidget('dxTabPanel', { - items: ['Item 1'], - }, '#tabPanel'); -}); diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/common.ts b/e2e/testcafe-devextreme/tests/navigation/tabs/common.ts deleted file mode 100644 index 4961f84f6394..000000000000 --- a/e2e/testcafe-devextreme/tests/navigation/tabs/common.ts +++ /dev/null @@ -1,221 +0,0 @@ -import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; -import { Selector } from 'testcafe'; -import { Item } from 'devextreme/ui/tabs.d'; -import { testScreenshot } from '../../../helpers/themeUtils'; -import url from '../../../helpers/getPageUrl'; -import { createWidget } from '../../../helpers/createWidget'; -import { appendElementTo, setAttribute } from '../../../helpers/domUtils'; - -const TAB_CLASS = 'dx-tab'; - -fixture.disablePageReloads`Tabs_common` - .page(url(__dirname, '../../container.html')); - -test('Tabs background color', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, 'Tabs background color.png', { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - await appendElementTo('#container', 'div', 'tabs'); - await setAttribute('#container', 'style', 'width: 400px; background: #fff000 !important;'); - - const dataSource: Item[] = [ - { text: 'John Heart' }, - { text: 'Marina Thomas' }, - { text: 'Robert Reagan' }, - { text: 'Greta Sims' }, - ]; - - await createWidget('dxTabs', { dataSource }, '#tabs'); -}); - -test('Tabs text-overflow with vertical orientation', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, 'Tabs text-overflow.png', { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - await setAttribute('#container', 'style', 'display: flex; gap: 40px; width: fit-content;'); - - const iconPositions = ['start', 'end', 'top']; - const dataSource: Item[] = [ - { icon: 'user', text: 'John Heart' }, - { icon: 'user', text: 'Marina Elizabeth Thomas Grace Sophia Alexander Benjamin Olivia Nicholas Victoria Michael Emily' }, - { icon: 'user', text: 'Robert Reagan' }, - { icon: 'user', text: 'Greta Sims' }, - ]; - - await Promise.all(iconPositions.map((iconPosition) => appendElementTo('#container', 'div', `tabs-${iconPosition}`))); - await Promise.all(iconPositions.map((iconPosition) => createWidget('dxTabs', { - dataSource, - iconPosition, - width: 130, - orientation: 'vertical', - }, `#tabs-${iconPosition}`))); -}); - -[true, false].forEach((rtlEnabled) => { - test('Tabs icon position', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, `Tabs icon position,rtl=${rtlEnabled}.png`, { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async () => { - await setAttribute('#container', 'style', 'display: flex; flex-direction: column; gap: 20px; width: 800px'); - - const iconPositions = ['start', 'end', 'top', 'bottom']; - const dataSource: Item[] = [ - { text: 'user', badge: '1' }, - { text: 'comment', icon: 'comment', badge: 'text' }, - { icon: 'user' }, - { icon: 'money' }, - ]; - - await Promise.all(iconPositions.map((iconPosition) => appendElementTo('#container', 'div', `tabs-${iconPosition}`))); - await Promise.all(iconPositions.map((iconPosition) => createWidget('dxTabs', { - dataSource, - iconPosition, - rtlEnabled, - }, `#tabs-${iconPosition}`))); - }); -}); - -test('Tabs with width: auto in flex container', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, 'Tabs with width auto.png', { element: '#tabs' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - await appendElementTo('#container', 'div', 'tabs'); - await setAttribute('#container', 'style', 'display: flex; width: 800px;'); - - const dataSource: Item[] = [ - { text: 'ok' }, - { icon: 'comment' }, - { icon: 'user' }, - { icon: 'money' }, - { text: 'ok', icon: 'search' }, - { text: 'alignright', icon: 'alignright' }, - ]; - - return createWidget('dxTabs', { dataSource, width: 'auto' }, '#tabs'); -}); - -['primary', 'secondary'].forEach((stylingMode) => { - ['horizontal', 'vertical'].forEach((orientation) => { - test('Tabs item selected states', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await testScreenshot(t, takeScreenshot, `Tabs item selected, orientation=${orientation}, stylingMode=${stylingMode}.png`, { element: '#container' }); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); - }).before(async () => { - await appendElementTo('#container', 'div', 'tabs'); - await appendElementTo('#container', 'div', 'tabs-rtl'); - await setAttribute('#container', 'style', `display: flex; gap: 40px; flex-direction: ${orientation === 'horizontal' ? 'column' : 'row'}; width: fit-content;`); - - const dataSource: Item[] = [ - { text: 'John Heart' }, - { text: 'Marina Thomas', disabled: true }, - { text: 'Robert Reagan' }, - { text: 'Greta Sims' }, - { text: 'Olivia Peyton' }, - { text: 'Ed Holmes' }, - { text: 'Wally Hobbs' }, - { text: 'Brad Jameson' }, - ]; - - const tabsOptions = { - dataSource, - orientation, - stylingMode, - width: orientation === 'horizontal' ? 450 : 'auto', - height: orientation === 'horizontal' ? 'auto' : 250, - selectedItem: dataSource[2], - showNavButtons: true, - }; - - await createWidget('dxTabs', tabsOptions, '#tabs'); - return createWidget('dxTabs', { ...tabsOptions, rtlEnabled: true }, '#tabs-rtl'); - }); - }); -}); - -test('Tabs item states', async (t) => { - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - await testScreenshot(t, takeScreenshot, 'Tabs without focus.png', { element: '#tabs' }); - - await t.pressKey('tab'); - await testScreenshot(t, takeScreenshot, 'Tabs item focused.png', { element: '#tabs' }); - - await t.pressKey('right'); - await testScreenshot(t, takeScreenshot, 'Tabs disabled item focused.png', { element: '#tabs' }); - - const thirdItem = Selector(`.${TAB_CLASS}:nth-child(3)`); - const fourthItem = Selector(`.${TAB_CLASS}:nth-child(4)`); - - await t - .pressKey('right') - .dispatchEvent(thirdItem, 'mousedown'); - await testScreenshot(t, takeScreenshot, 'Tabs item active.png', { element: '#tabs' }); - await t.dispatchEvent(thirdItem, 'mouseup'); - - await t - .click(thirdItem) - .hover(fourthItem); - await testScreenshot(t, takeScreenshot, 'Tabs item hovered.png', { element: '#tabs' }); - - await t.click('body', { - offsetX: -10, - offsetY: -10, - }); - - await t.hover(thirdItem); - await testScreenshot(t, takeScreenshot, 'Tabs selected item hovered.png', { element: '#tabs' }); - - await t.dispatchEvent(thirdItem, 'mousedown'); - await testScreenshot(t, takeScreenshot, 'Tabs selected item active.png', { element: '#tabs' }); - await t.dispatchEvent(thirdItem, 'mouseup'); - - await t - .expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - await appendElementTo('#container', 'div', 'tabs'); - - const dataSource: Item[] = [ - { text: 'John Heart' }, - { text: 'Marina Thomas', disabled: true }, - { text: 'Robert Reagan' }, - { text: 'Greta Sims' }, - { text: 'Olivia Peyton' }, - { text: 'Ed Holmes' }, - { text: 'Wally Hobbs' }, - { text: 'Brad Jameson' }, - ]; - - const tabsOptions = { - dataSource, - selectOnFocus: false, - showNavButtons: true, - width: 600, - useInkRipple: false, - }; - - return createWidget('dxTabs', tabsOptions, '#tabs'); -}); diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs background color (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs background color (fluent-next.blue.light).png deleted file mode 100644 index 705b87b9b48b..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs background color (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs background color (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs background color (fluent.blue.light).png deleted file mode 100644 index b8d02bb585eb..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs background color (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs disabled item focused (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs disabled item focused (fluent-next.blue.light).png deleted file mode 100644 index 6be178a96662..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs disabled item focused (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs disabled item focused (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs disabled item focused (fluent.blue.light).png deleted file mode 100644 index ae073ab39d97..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs disabled item focused (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs icon position,rtl=false (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs icon position,rtl=false (fluent-next.blue.light).png deleted file mode 100644 index 5148de5fe9cd..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs icon position,rtl=false (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs icon position,rtl=false (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs icon position,rtl=false (fluent.blue.light).png deleted file mode 100644 index 184c59b1980c..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs icon position,rtl=false (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs icon position,rtl=true (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs icon position,rtl=true (fluent-next.blue.light).png deleted file mode 100644 index 36b86d507d0d..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs icon position,rtl=true (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs icon position,rtl=true (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs icon position,rtl=true (fluent.blue.light).png deleted file mode 100644 index b23a74f66671..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs icon position,rtl=true (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item active (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item active (fluent-next.blue.light).png deleted file mode 100644 index 2d83bfb75f44..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item active (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item active (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item active (fluent.blue.light).png deleted file mode 100644 index d2ce714f3b84..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item active (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item focused (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item focused (fluent-next.blue.light).png deleted file mode 100644 index d85150bc6ffe..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item focused (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item focused (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item focused (fluent.blue.light).png deleted file mode 100644 index 6963df631e78..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item focused (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item hovered (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item hovered (fluent-next.blue.light).png deleted file mode 100644 index c2a3c7cd8e7a..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item hovered (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item hovered (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item hovered (fluent.blue.light).png deleted file mode 100644 index f75811f36576..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item hovered (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=primary (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=primary (fluent-next.blue.light).png deleted file mode 100644 index b0fe3fd0464e..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=primary (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=primary (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=primary (fluent.blue.light).png deleted file mode 100644 index 72bce3a2cc32..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=primary (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=secondary (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=secondary (fluent-next.blue.light).png deleted file mode 100644 index 8a530a837991..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=secondary (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=secondary (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=secondary (fluent.blue.light).png deleted file mode 100644 index eee9c38424c5..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=horizontal, stylingMode=secondary (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=primary (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=primary (fluent-next.blue.light).png deleted file mode 100644 index fa17ee7f2454..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=primary (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=primary (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=primary (fluent.blue.light).png deleted file mode 100644 index f1640f6556c7..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=primary (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=secondary (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=secondary (fluent-next.blue.light).png deleted file mode 100644 index b9db3cce3eec..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=secondary (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=secondary (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=secondary (fluent.blue.light).png deleted file mode 100644 index cc09af9f7e11..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs item selected, orientation=vertical, stylingMode=secondary (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs selected item active (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs selected item active (fluent-next.blue.light).png deleted file mode 100644 index 5585a6123ee4..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs selected item active (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs selected item active (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs selected item active (fluent.blue.light).png deleted file mode 100644 index 3b2a9a820ba9..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs selected item active (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs selected item hovered (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs selected item hovered (fluent-next.blue.light).png deleted file mode 100644 index 11da06e2b5a7..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs selected item hovered (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs selected item hovered (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs selected item hovered (fluent.blue.light).png deleted file mode 100644 index 8a45f75dcb4d..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs selected item hovered (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs text-overflow (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs text-overflow (fluent-next.blue.light).png deleted file mode 100644 index f69c49654b10..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs text-overflow (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs text-overflow (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs text-overflow (fluent.blue.light).png deleted file mode 100644 index 10811190fbef..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs text-overflow (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs with width auto (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs with width auto (fluent-next.blue.light).png deleted file mode 100644 index db55b4772504..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs with width auto (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs with width auto (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs with width auto (fluent.blue.light).png deleted file mode 100644 index 08a3e5ec6e90..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs with width auto (fluent.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs without focus (fluent-next.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs without focus (fluent-next.blue.light).png deleted file mode 100644 index 0c7bc2f71572..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs without focus (fluent-next.blue.light).png and /dev/null differ diff --git a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs without focus (fluent.blue.light).png b/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs without focus (fluent.blue.light).png deleted file mode 100644 index 86e38bcb08f2..000000000000 Binary files a/e2e/testcafe-devextreme/tests/navigation/tabs/etalons/Tabs without focus (fluent.blue.light).png and /dev/null differ diff --git a/packages/testcafe-models/buttonGroup/index.ts b/packages/testcafe-models/buttonGroup/index.ts deleted file mode 100644 index 2f70a0dc2f4e..000000000000 --- a/packages/testcafe-models/buttonGroup/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Selector } from 'testcafe'; -import type { WidgetName } from '../types'; - -import Widget from '../internal/widget'; -import Button from '../button'; - -const CLASS = { - item: 'dx-button', - buttonGroup: 'dx-buttongroup', - selected: 'dx-state-selected', - itemSelected: 'dx-item-selected', -}; -export default class ButtonGroup extends Widget { - // eslint-disable-next-line - constructor(id: string | Selector) { - super(id); - - this.element = Selector(`.${CLASS.buttonGroup}`); - } - - getItem(index = 0): Button { - return new Button(this.getItems().nth(index)); - } - - getItems(): Selector { - return this.element.find(`.${CLASS.item}`); - } - - isItemSelected(index = 0): Promise { - return this.getItem(index).element.hasClass(CLASS.itemSelected); - } - - // eslint-disable-next-line class-methods-use-this - getName(): WidgetName { return 'dxButtonGroup'; } -} diff --git a/packages/testcafe-models/gallery/index.ts b/packages/testcafe-models/gallery/index.ts deleted file mode 100644 index 376065613d79..000000000000 --- a/packages/testcafe-models/gallery/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { WidgetName } from '../types'; -import Widget from '../internal/widget'; -import GalleryIndicatorItem from './indicatorItem'; - -const CLASS = { - indicatorItem: 'dx-gallery-indicator-item', -}; - -export default class List extends Widget { - indicatorItems: Selector; - - constructor(id: string | Selector) { - super(id); - - this.indicatorItems = this.element.find(`.${CLASS.indicatorItem}`); - } - - // eslint-disable-next-line class-methods-use-this - getName(): WidgetName { return 'dxGallery'; } - - getIndicatorItem(index = 0): GalleryIndicatorItem { - return new GalleryIndicatorItem(this.indicatorItems.nth(index)); - } -} diff --git a/packages/testcafe-models/gallery/indicatorItem.ts b/packages/testcafe-models/gallery/indicatorItem.ts deleted file mode 100644 index aec99fbf1847..000000000000 --- a/packages/testcafe-models/gallery/indicatorItem.ts +++ /dev/null @@ -1,14 +0,0 @@ -const CLASS = { - selected: 'dx-gallery-indicator-item-selected', -}; - -export default class Indicator { - element: Selector; - - isSelected: Promise; - - constructor(element: Selector) { - this.element = element; - this.isSelected = element.hasClass(CLASS.selected); - } -} diff --git a/packages/testcafe-models/htmlEditor/dialog/dialog.ts b/packages/testcafe-models/htmlEditor/dialog/dialog.ts deleted file mode 100644 index c74e5e1d976d..000000000000 --- a/packages/testcafe-models/htmlEditor/dialog/dialog.ts +++ /dev/null @@ -1,27 +0,0 @@ -import Popup from '../../popup'; -import Tabs from '../../tabs'; -import AddImageFileForm from './addImageFileForm'; -import AddImageUrlForm from './addImageUrlForm'; -import FooterToolbar from './footerToolbar'; - -const CLASS = { - FORM: '.dx-formdialog-form', -}; - -export default class Dialog extends Popup { - public get tabs(): Tabs { - return new Tabs(this.element.find(Tabs.className)); - } - - public get footerToolbar(): FooterToolbar { - return new FooterToolbar(this.element.find(Popup.footerToolbarClassName)); - } - - public get addImageFileForm(): AddImageFileForm { - return new AddImageFileForm(this.element.find(CLASS.FORM)); - } - - public get addImageUrlForm(): AddImageUrlForm { - return new AddImageUrlForm(this.element.find(CLASS.FORM)); - } -} diff --git a/packages/testcafe-models/htmlEditor/index.ts b/packages/testcafe-models/htmlEditor/index.ts deleted file mode 100644 index e1ee2ea6c965..000000000000 --- a/packages/testcafe-models/htmlEditor/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { WidgetName } from '../types'; -import Widget from '../internal/widget'; -import Popup from '../popup'; -import Dialog from './dialog/dialog'; -import AIDialog from './dialog/aiDialog'; -import RootToolbar from './rootToolbar'; - -const CLASS = { - CONTENT: '.dx-htmleditor-content', -}; - -export default class HtmlEditor extends Widget { - // eslint-disable-next-line class-methods-use-this - getName(): WidgetName { - return 'dxHtmlEditor'; - } - - public get content(): Selector { - return this.element.find(CLASS.CONTENT); - } - - // eslint-disable-next-line class-methods-use-this - public get dialog(): Dialog { - return new Dialog(Popup.className); - } - - // eslint-disable-next-line class-methods-use-this - public get toolbar(): RootToolbar { - return new RootToolbar(); - } - - // eslint-disable-next-line class-methods-use-this - public getAIDialog(): AIDialog { - return new AIDialog(); - } -} diff --git a/packages/testcafe-models/htmlEditor/rootToolbar.ts b/packages/testcafe-models/htmlEditor/rootToolbar.ts deleted file mode 100644 index 14066c96a633..000000000000 --- a/packages/testcafe-models/htmlEditor/rootToolbar.ts +++ /dev/null @@ -1,18 +0,0 @@ -import Toolbar from '../toolbar'; -import ToolbarItem from '../toolbar/toolbarItem'; - -const CLASS = { - ROOT: '.dx-htmleditor-toolbar', -}; - -type ToolbarItemName = 'image' | 'color' | 'link' | 'ai' | 'bold' | 'italic'; - -export default class RootToolbar extends Toolbar { - constructor() { - super(CLASS.ROOT); - } - - public getItemByName(itemName: ToolbarItemName): ToolbarItem { - return new ToolbarItem(this.element.find(`.dx-${itemName}-format`)); - } -} diff --git a/packages/testcafe-models/internal/collection.ts b/packages/testcafe-models/internal/collection.ts deleted file mode 100644 index b99a8ff6bd0f..000000000000 --- a/packages/testcafe-models/internal/collection.ts +++ /dev/null @@ -1,24 +0,0 @@ -import Widget from '../internal/widget'; -import CollectionItem from "./collectionItem"; - -export default abstract class Collection extends Widget { - protected itemClassName: string; - - protected ItemClass: new (element: Selector) => Item; - - constructor(id: string | Selector) { - super(id); - } - - private getItemElements() { - return this.element.find(this.itemClassName); - } - - private getItemElementByIndex(index = 0) { - return this.getItemElements().nth(index); - } - - public getItem(index = 0): Item { - return new this.ItemClass(this.getItemElementByIndex(index)); - } -} diff --git a/packages/testcafe-models/internal/collectionItem.ts b/packages/testcafe-models/internal/collectionItem.ts deleted file mode 100644 index 7353b4cc4961..000000000000 --- a/packages/testcafe-models/internal/collectionItem.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default class CollectionItem { - element: Selector; - - constructor(element: Selector) { - this.element = element; - } -} diff --git a/packages/testcafe-models/multiView/index.ts b/packages/testcafe-models/multiView/index.ts deleted file mode 100644 index 3029aba56848..000000000000 --- a/packages/testcafe-models/multiView/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { WidgetName } from '../types'; -import Widget from '../internal/widget'; -import MultiViewItem from './item'; - -const CLASS = { - item: 'dx-multiview-item', -}; - -export default class MultiView extends Widget { - itemElements: Selector; - - constructor(id: string) { - super(id); - - this.itemElements = this.element.find(`.${CLASS.item}`); - } - - // eslint-disable-next-line class-methods-use-this - getName(): WidgetName { return 'dxMultiView'; } - - getItem(index = 0): MultiViewItem { - return new MultiViewItem(this.itemElements.nth(index)); - } -} diff --git a/packages/testcafe-models/multiView/item.ts b/packages/testcafe-models/multiView/item.ts deleted file mode 100644 index 16b94d5b5998..000000000000 --- a/packages/testcafe-models/multiView/item.ts +++ /dev/null @@ -1,14 +0,0 @@ -const CLASS = { - focused: 'dx-state-focused', -}; - -export default class MultiViewItem { - element: Selector; - - isFocused: Promise; - - constructor(element: Selector) { - this.element = element; - this.isFocused = this.element.hasClass(CLASS.focused); - } -} diff --git a/packages/testcafe-models/stepper/index.ts b/packages/testcafe-models/stepper/index.ts deleted file mode 100644 index c0dcfe59e59f..000000000000 --- a/packages/testcafe-models/stepper/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { WidgetName } from '../types'; -import Collection from "../internal/collection"; -import CollectionItem from "../internal/collectionItem"; - -export default class Stepper extends Collection { - public static className = '.dx-stepper'; - - itemClassName = '.dx-step'; - - ItemClass = CollectionItem; - - getName(): WidgetName { return 'dxStepper'; } -} diff --git a/packages/testcafe-models/tabPanel.ts b/packages/testcafe-models/tabPanel.ts deleted file mode 100644 index 117417b1014f..000000000000 --- a/packages/testcafe-models/tabPanel.ts +++ /dev/null @@ -1,31 +0,0 @@ -import Widget from './internal/widget'; -import Tabs from './tabs'; -import MultiView from './multiView'; -import TabItem from './tabs/item'; -import type { WidgetName } from './types'; - -const CLASS = { - tabs: 'dx-tabs', - multiView: 'dx-multiview', - item: 'dx-tab', -}; - -export default class TabPanel extends Widget { - tabs: Tabs; - - multiView: MultiView; - - constructor(id: string) { - super(id); - - this.tabs = new Tabs(`.${CLASS.tabs}`); - this.multiView = new MultiView(`.${CLASS.multiView}`); - } - - // eslint-disable-next-line class-methods-use-this - getName(): WidgetName { return 'dxTabPanel'; } - - public getItem(index = 0): TabItem { - return new TabItem(this.element.find(`.${CLASS.item}`).nth(index)); - } -} diff --git a/packages/testcafe-models/tabs/index.ts b/packages/testcafe-models/tabs/index.ts deleted file mode 100644 index 612ee7e7146b..000000000000 --- a/packages/testcafe-models/tabs/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { WidgetName } from '../types'; -import TabItem from './item'; -import Collection from "../internal/collection"; - -export default class Tabs extends Collection { - public static className = '.dx-tabs'; - - itemClassName = '.dx-tab'; - - ItemClass = TabItem; - - getName(): WidgetName { return 'dxTabs'; } -} diff --git a/packages/testcafe-models/tabs/item.ts b/packages/testcafe-models/tabs/item.ts deleted file mode 100644 index d6e964d6b359..000000000000 --- a/packages/testcafe-models/tabs/item.ts +++ /dev/null @@ -1,15 +0,0 @@ -import CollectionItem from "../internal/collectionItem"; - -const CLASS = { - focused: 'dx-state-focused', -}; - -export default class TabItem extends CollectionItem{ - isFocused: Promise; - - constructor(element: Selector) { - super(element); - - this.isFocused = element.hasClass(CLASS.focused); - } -} diff --git a/packages/testcafe-models/toolbar/toolbarItem.ts b/packages/testcafe-models/toolbar/toolbarItem.ts deleted file mode 100644 index 6d92340aea31..000000000000 --- a/packages/testcafe-models/toolbar/toolbarItem.ts +++ /dev/null @@ -1,15 +0,0 @@ -import CollectionItem from '../internal/collectionItem'; - -const CLASS = { - focused: 'dx-state-focused', -}; - -export default class ToolbarItem extends CollectionItem { - isFocused: Promise; - - constructor(element: Selector) { - super(element); - - this.isFocused = element.hasClass(CLASS.focused); - } -}