diff --git a/.github/workflows/pr-vrt-comment.yml b/.github/workflows/pr-vrt-comment.yml index cea6491dd5114c..dc0dd87990a350 100644 --- a/.github/workflows/pr-vrt-comment.yml +++ b/.github/workflows/pr-vrt-comment.yml @@ -63,7 +63,7 @@ jobs: - name: VR App - Create Policy run: | - echo "MAKE THIS WORK" + echo "MAKE THIS WORK TEST" - name: Run screenshotdiff run: | diff --git a/apps/vr-tests-react-components/src/stories/DataGrid/DataGridSubtleMultiSelect.stories.tsx b/apps/vr-tests-react-components/src/stories/DataGrid/DataGridSubtleMultiSelect.stories.tsx new file mode 100644 index 00000000000000..6b559d76d12515 --- /dev/null +++ b/apps/vr-tests-react-components/src/stories/DataGrid/DataGridSubtleMultiSelect.stories.tsx @@ -0,0 +1,60 @@ +import * as React from 'react'; +import type { Meta } from '@storybook/react'; +import { Steps } from 'storywright'; +import { + DataGrid, + DataGridBody, + DataGridCell, + DataGridHeader, + DataGridHeaderCell, + DataGridRow, +} from '@fluentui/react-table'; +import { withStoryWrightSteps } from '../../utilities'; +import { columns, items, type Item } from './utils'; + +export default { + title: 'DataGridConverged - subtle multi select', + + decorators: [ + story => + withStoryWrightSteps({ + story, + steps: new Steps() + .hover('.fui-DataGridHeader > .fui-DataGridRow') + .snapshot('hover header row') + .hover('.fui-DataGridBody > .fui-DataGridRow') + .snapshot('hover row') + .end(), + }), + ], +} satisfies Meta; + +export const Default = () => { + return ( + item.file.label} + focusMode="composite" + style={{ minWidth: '550px' }} + > + + + {({ renderHeaderCell }) => {renderHeaderCell()}} + + + > + {({ item, rowId }) => ( + key={rowId} selectionCell={{ checkboxIndicator: { 'aria-label': 'Select row' } }}> + {({ renderCell }) => {renderCell(item)}} + + )} + + + ); +}; +Default.storyName = 'default'; diff --git a/apps/vr-tests-react-components/src/stories/DataGrid/DataGridSubtleSingleSelect.stories.tsx b/apps/vr-tests-react-components/src/stories/DataGrid/DataGridSubtleSingleSelect.stories.tsx new file mode 100644 index 00000000000000..896d4dbff9ada0 --- /dev/null +++ b/apps/vr-tests-react-components/src/stories/DataGrid/DataGridSubtleSingleSelect.stories.tsx @@ -0,0 +1,60 @@ +import * as React from 'react'; +import type { Meta } from '@storybook/react'; +import { Steps } from 'storywright'; +import { + DataGrid, + DataGridBody, + DataGridCell, + DataGridHeader, + DataGridHeaderCell, + DataGridRow, +} from '@fluentui/react-table'; +import { withStoryWrightSteps } from '../../utilities'; +import { columns, items, type Item } from './utils'; + +export default { + title: 'DataGridConverged - subtle single select', + + decorators: [ + story => + withStoryWrightSteps({ + story, + steps: new Steps() + .hover('.fui-DataGridHeader > .fui-DataGridRow') + .snapshot('hover header row') + .hover('.fui-DataGridBody > .fui-DataGridRow') + .snapshot('hover row') + .end(), + }), + ], +} satisfies Meta; + +export const Default = () => { + return ( + item.file.label} + focusMode="composite" + style={{ minWidth: '550px' }} + > + + + {({ renderHeaderCell }) => {renderHeaderCell()}} + + + > + {({ item, rowId }) => ( + key={rowId} selectionCell={{ checkboxIndicator: { 'aria-label': 'Select row' } }}> + {({ renderCell }) => {renderCell(item)}} + + )} + + + ); +}; +Default.storyName = 'default'; diff --git a/apps/vr-tests-react-components/src/stories/DataGrid/utils.tsx b/apps/vr-tests-react-components/src/stories/DataGrid/utils.tsx new file mode 100644 index 00000000000000..32bb3d0c2f42fa --- /dev/null +++ b/apps/vr-tests-react-components/src/stories/DataGrid/utils.tsx @@ -0,0 +1,140 @@ +import * as React from 'react'; +import { PresenceBadgeStatus } from '@fluentui/react-badge'; +import { createTableColumn, TableColumnDefinition } from '@fluentui/react-table'; +import { + DocumentPdfRegular, + DocumentRegular, + EditRegular, + FolderRegular, + OpenRegular, + PeopleRegular, + VideoRegular, +} from '@fluentui/react-icons'; +import { TableCellLayout } from '@fluentui/react-table'; +import { Avatar } from '@fluentui/react-avatar'; + +type FileCell = { + label: string; + icon: JSX.Element; +}; + +type LastUpdatedCell = { + label: string; + timestamp: number; +}; + +type LastUpdateCell = { + label: string; + icon: JSX.Element; +}; + +type AuthorCell = { + label: string; + status: PresenceBadgeStatus; +}; + +export type Item = { + file: FileCell; + author: AuthorCell; + lastUpdated: LastUpdatedCell; + lastUpdate: LastUpdateCell; +}; + +export const items: Item[] = [ + { + file: { label: 'Meeting notes', icon: }, + author: { label: 'Max Mustermann', status: 'available' }, + lastUpdated: { label: '7h ago', timestamp: 3 }, + lastUpdate: { + label: 'You edited this', + icon: , + }, + }, + { + file: { label: 'Thursday presentation', icon: }, + author: { label: 'Erika Mustermann', status: 'busy' }, + lastUpdated: { label: 'Yesterday at 1:45 PM', timestamp: 2 }, + lastUpdate: { + label: 'You recently opened this', + icon: , + }, + }, + { + file: { label: 'Training recording', icon: }, + author: { label: 'John Doe', status: 'away' }, + lastUpdated: { label: 'Yesterday at 1:45 PM', timestamp: 2 }, + lastUpdate: { + label: 'You recently opened this', + icon: , + }, + }, + { + file: { label: 'Purchase order', icon: }, + author: { label: 'Jane Doe', status: 'offline' }, + lastUpdated: { label: 'Tue at 9:30 AM', timestamp: 1 }, + lastUpdate: { + label: 'You shared this in a Teams chat', + icon: , + }, + }, +]; + +export const columns: TableColumnDefinition[] = [ + createTableColumn({ + columnId: 'file', + compare: (a, b) => { + return a.file.label.localeCompare(b.file.label); + }, + renderHeaderCell: () => { + return 'File'; + }, + renderCell: item => { + return {item.file.label}; + }, + }), + createTableColumn({ + columnId: 'author', + compare: (a, b) => { + return a.author.label.localeCompare(b.author.label); + }, + renderHeaderCell: () => { + return 'Author'; + }, + renderCell: item => { + return ( + + } + > + {item.author.label} + + ); + }, + }), + createTableColumn({ + columnId: 'lastUpdated', + compare: (a, b) => { + return a.lastUpdated.timestamp - b.lastUpdated.timestamp; + }, + renderHeaderCell: () => { + return 'Last updated'; + }, + + renderCell: item => { + return item.lastUpdated.label; + }, + }), + createTableColumn({ + columnId: 'lastUpdate', + compare: (a, b) => { + return a.lastUpdate.label.localeCompare(b.lastUpdate.label); + }, + renderHeaderCell: () => { + return 'Last update'; + }, + renderCell: item => { + return {item.lastUpdate.label}; + }, + }), +]; diff --git a/package.json b/package.json index ab198d1871b4b1..c703034ca35086 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@fluentui/fluentui-repo", "version": "1.0.0", - "description": "Reusable React components for building experiences for Microsoft 365.", + "description": "Reusable React components for test building experiences for Microsoft 365.", "private": true, "repository": { "type": "git", diff --git a/packages/react-components/react-teaching-popover/stories/src/TeachingPopover/TeachingPopoverCarousel.stories.tsx b/packages/react-components/react-teaching-popover/stories/src/TeachingPopover/TeachingPopoverCarousel.stories.tsx index 922bbe8253a05d..23dc4471a8f69e 100644 --- a/packages/react-components/react-teaching-popover/stories/src/TeachingPopover/TeachingPopoverCarousel.stories.tsx +++ b/packages/react-components/react-teaching-popover/stories/src/TeachingPopover/TeachingPopoverCarousel.stories.tsx @@ -28,20 +28,20 @@ export const Carousel = () => ( }> Teaching Bubble Title -
This is page: 1
+
This test page: 1
}> Teaching Bubble Title -
This is page: 2
+
This is page: test 2
- + }> - Teaching Bubble Title + Teaching Bubble 3 Title
This is page: 3