Skip to content

Commit

Permalink
feat(many): fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HerrTopi committed Jul 18, 2024
1 parent 517a1f6 commit dc7a0b2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cypress/component/DateInput.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('<DateInput/>', () => {
cy.get('span[class$="-calendarDay__day"]').should(
'have.css',
'background-color',
'rgb(16, 135, 81)'
'rgb(3, 137, 61)'
)
})
})
Expand Down
10 changes: 5 additions & 5 deletions packages/ui-avatar/src/Avatar/__new-tests__/Avatar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('<Avatar />', () => {
it('should display the initials in brand color', async () => {
render(<Avatar name="Jessica Jones" />)
const initials = screen.getByText('JJ')
expect(getComputedStyle(initials).color).toBe('rgb(17, 124, 186)')
expect(getComputedStyle(initials).color).toBe('rgb(43, 122, 188)')
})

it('should return the underlying component', async () => {
Expand Down Expand Up @@ -176,7 +176,7 @@ describe('<Avatar />', () => {
it('should display the initials in green (shamrock)', async () => {
render(<Avatar name="Jessica Jones" color="shamrock" />)
const initials = screen.getByText('JJ')
expect(getComputedStyle(initials).color).toBe('rgb(16, 135, 81)')
expect(getComputedStyle(initials).color).toBe('rgb(3, 137, 61)')
})

it('should display the icon in green (shamrock)', async () => {
Expand All @@ -190,7 +190,7 @@ describe('<Avatar />', () => {
</Avatar>
)
const avatarSvg = container.querySelector('svg')
expect(avatarSvg).toHaveStyle({ fill: '#CB4E15' })
expect(avatarSvg).toHaveStyle({ fill: '#CF4A00' })
})
})

Expand All @@ -200,7 +200,7 @@ describe('<Avatar />', () => {
render(<Avatar name="Jessica Jones" color="shamrock" hasInverseColor />)
const initials = screen.getByText('JJ')
expect(initials.parentNode).toHaveStyle({
backgroundColor: 'rgb(16, 135, 81)'
backgroundColor: 'rgb(3, 137, 61)'
})
})

Expand All @@ -222,7 +222,7 @@ describe('<Avatar />', () => {
/>
)
const element = container.querySelector('span')
expect(element).toHaveStyle({ backgroundColor: 'rgb(16, 135, 81)' })
expect(element).toHaveStyle({ backgroundColor: 'rgb(3, 137, 61)' })
})

it('should display the icon in white', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe('<Calendar />', () => {
expect(selectedDay).toBeDefined()
if (selectedDay) {
expect(window.getComputedStyle(selectedDay)?.background).toBe(
'rgb(16, 135, 81)'
'rgb(3, 137, 61)'
)
}
})
Expand Down
4 changes: 2 additions & 2 deletions packages/ui-options/src/Options/Item/__tests__/Item.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ describe('<Item />', async () => {
const icon = await content.find('svg[name="IconCheck"]')
const iconStyle = getComputedStyle(icon.getDOMNode())

expect(iconStyle.fill).to.equal('rgb(203, 78, 21)')
expect(iconStyle.fill).to.equal('rgb(207, 74, 0)')
})

it('should render colored icon after highlighted label', async () => {
Expand All @@ -211,7 +211,7 @@ describe('<Item />', async () => {
const icon = await content.find('svg[name="IconCheck"]')
const iconStyle = getComputedStyle(icon.getDOMNode())

expect(iconStyle.fill).to.equal('rgb(16, 135, 81)')
expect(iconStyle.fill).to.equal('rgb(3, 137, 61)')
})

it('should render nested lists', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,10 @@ describe('<SimpleSelect />', async () => {
const itemIcons = await listbox.findAll('li [role="presentation"] svg')

expect(getComputedStyle(itemIcons[0].getDOMNode()).fill).to.equal(
'rgb(203, 78, 21)'
'rgb(207, 74, 0)'
)
expect(getComputedStyle(itemIcons[1].getDOMNode()).fill).to.equal(
'rgb(17, 124, 186)'
'rgb(43, 122, 188)'
)
})

Expand Down

0 comments on commit dc7a0b2

Please sign in to comment.