Skip to content

Commit

Permalink
chore: align visual test and update snapshots
Browse files Browse the repository at this point in the history
Align Dialog

Align Paragraph

Align Anchor (new)

Align Hr

Align Lists

Align Typography

Align Heading

Align Autocomplete

Align Avatar

Align Badge

Align Breadcrumb

Align Button

Align Checkbox

Align Drawer

Align Dropdown

Align FormLabel

Align FormRow and FormSet

Align FormStatus

Align GlobalError

Align GlobalStatus

Align HelpButton

Align Icon

Algin InfoCard

Align Input

Align Modal

Align NumberFormat

Align Pagination

Align ProgressIndicator

Align Radio button

Align Seciton

Align Skeleton

Align Slider

Align Space

Align StepIndicator

Align switch

Align Tabs

Align Tag

Align Textarea

Align Timeline

Align ToggleButton

Align Tooltip

Align Upload

Align VisuallyHidden

Align Image

Align Blockquote

Align DrawerList

Align DatePicker

Align Table

Align PaymentCard

Align HelperClasses

Align Logo
  • Loading branch information
tujoworker committed Jan 26, 2023
1 parent b3a4f36 commit 113cae6
Show file tree
Hide file tree
Showing 527 changed files with 1,161 additions and 1,697 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,6 @@ export const FullDrawerExample = () => (
phasellus praesent justo mollis montes velit taciti gravida
lacus commodo senectus feugiat lorem etiam consequat
penatibus cum hendrerit accumsan orci potenti purus nulla
interdum metus sollicitudin magnis libero sapien habitant non
class ridiculus consectetur congue nec litora sociosqu
aliquet felis in rhoncus nascetur odio ultricies nullam a
iaculis massa nisi ante nam cras aenean erat facilisi vivamus
ut cursus auctor arcu lobortis himenaeos dictum habitasse
tristique mauris at blandit sagittis nibh dignissim
condimentum per integer duis lacinia malesuada est adipiscing
maecenas donec eleifend turpis dictumst dapibus tempor fusce
aliquam torquent hac ac curabitur venenatis et tincidunt
augue porta vehicula enim facilisis posuere primis molestie
convallis diam vel fringilla dolor leo quis diam cursus massa
sapien tristique cum senectus sed tortor natoque amet
hendrerit ut fusce ipsum quis
</P>
</>
)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,41 @@
*/

import {
testPageScreenshot,
makeScreenshot,
setupPageScreenshot,
} from '../../../core/jest/jestSetupScreenshots'

describe('Accordion closed', () => {
describe('Accordion', () => {
setupPageScreenshot({
url: '/uilib/components/accordion/demos',
})

it('have to match accordion in closed state', async () => {
const screenshot = await testPageScreenshot({
it('have to match in closed state', async () => {
const screenshot = await makeScreenshot({
style: { width: '20rem', height: '15rem' },
selector: '[data-visual-test="accordion-default"]',
})
expect(screenshot).toMatchImageSnapshot()
})

it('have to match accordion in nested accordions', async () => {
const screenshot = await testPageScreenshot({
it('have to match in nested accordions', async () => {
const screenshot = await makeScreenshot({
style: { width: '20rem', height: '25rem' },
selector: '[data-visual-test="accordion-nested"]',
})
expect(screenshot).toMatchImageSnapshot()
})

it('have to match accordion with large content', async () => {
const screenshot = await testPageScreenshot({
it('have to match with large content', async () => {
const screenshot = await makeScreenshot({
style: { width: '20rem', height: '13rem' },
selector: '[data-visual-test="accordion-large"]',
})
expect(screenshot).toMatchImageSnapshot()
})
})

describe('Accordion closed', () => {
setupPageScreenshot({
url: '/uilib/components/accordion/demos',
reload: true,
})

it('have to match accordion in open state with focus', async () => {
const screenshot = await testPageScreenshot({
it('have to match in open state with focus', async () => {
const screenshot = await makeScreenshot({
style: { width: '20rem', height: '20rem' },
styleSelector: '[data-visual-test="accordion-default"]',
selector: '[data-visual-test="accordion-default"]',
Expand All @@ -56,8 +49,8 @@ describe('Accordion closed', () => {
expect(screenshot).toMatchImageSnapshot()
})

it('have to match accordion in closed state with focus', async () => {
const screenshot = await testPageScreenshot({
it('have to match in closed state with focus', async () => {
const screenshot = await makeScreenshot({
style: { width: '20rem', height: '20rem' },
styleSelector: '[data-visual-test="accordion-default"]',
selector: '[data-visual-test="accordion-default"]',
Expand All @@ -68,8 +61,8 @@ describe('Accordion closed', () => {
expect(screenshot).toMatchImageSnapshot()
})

it('have to match accordion in closed state with hover', async () => {
const screenshot = await testPageScreenshot({
it('have to match in closed state with hover', async () => {
const screenshot = await makeScreenshot({
style: { width: '20rem', height: '15rem' },
styleSelector: '[data-visual-test="accordion-default"]',
selector: '[data-visual-test="accordion-default"]',
Expand All @@ -79,53 +72,25 @@ describe('Accordion closed', () => {
})
expect(screenshot).toMatchImageSnapshot()
})
})

describe('Accordion container', () => {
setupPageScreenshot({
url: '/uilib/components/accordion/demos',
})

it('have to match accordion in desktop mode', async () => {
const screenshot = await testPageScreenshot({
it('have to match in desktop mode', async () => {
const screenshot = await makeScreenshot({
style: { width: '40rem', 'min-height': '15rem' },
selector: '[data-visual-test="accordion-container"]',
})
expect(screenshot).toMatchImageSnapshot()
})
})

describe('Accordion container', () => {
setupPageScreenshot({
url: '/uilib/components/accordion/demos',
pageViewport: {
width: 400,
height: 600,
},
})

it('have to match accordion in mobile mode', async () => {
const screenshot = await testPageScreenshot({
style: { width: '30rem', 'min-height': '15rem' },
selector: '[data-visual-test="accordion-container"]',
})
expect(screenshot).toMatchImageSnapshot()
})
})

describe('Accordion group', () => {
setupPageScreenshot({ url: '/uilib/components/accordion/demos' })

it('have to match accordion in first state', async () => {
const screenshot = await testPageScreenshot({
it('have to match in first state', async () => {
const screenshot = await makeScreenshot({
style: { width: '30rem', height: '20rem' },
selector: '[data-visual-test="accordion-group"]',
})
expect(screenshot).toMatchImageSnapshot()
})

it('have to match accordion in second state', async () => {
const screenshot = await testPageScreenshot({
it('have to match in second state', async () => {
const screenshot = await makeScreenshot({
style: { width: '30rem', height: '20rem' },
selector: '[data-visual-test="accordion-group"]',
simulateSelector:
Expand All @@ -134,16 +99,30 @@ describe('Accordion group', () => {
})
expect(screenshot).toMatchImageSnapshot()
})
})

describe('Accordion plain variant', () => {
setupPageScreenshot({ url: '/uilib/components/accordion/demos' })

it('have to match with plain variant', async () => {
const screenshot = await testPageScreenshot({
const screenshot = await makeScreenshot({
style: { width: '20rem', height: '15rem' },
selector: '[data-visual-test="accordion-variant-plain"]',
})
expect(screenshot).toMatchImageSnapshot()
})
})

describe('Accordion container', () => {
setupPageScreenshot({
url: '/uilib/components/accordion/demos',
pageViewport: {
width: 400,
height: 600,
},
})

it('have to match in mobile mode', async () => {
const screenshot = await makeScreenshot({
style: { width: '22rem', 'min-height': '15rem' },
selector: '[data-visual-test="accordion-container"]',
})
expect(screenshot).toMatchImageSnapshot()
})
})
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Loading

0 comments on commit 113cae6

Please sign in to comment.