forked from patternfly/react-component-groups
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServiceCard.cy.tsx
More file actions
48 lines (47 loc) · 1.41 KB
/
ServiceCard.cy.tsx
File metadata and controls
48 lines (47 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import React from 'react';
import ServiceCard from '../../packages/module/dist/dynamic/ServiceCard';
import { Button, ButtonVariant } from '@patternfly/react-core';
describe('ServiceCard', () => {
it('renders ServiceCard', () => {
cy.mount(
<ServiceCard
title='Example'
subtitle='A basic example'
description='This is a basic ServiceCard Example'
icon={<img src="/" alt="page-header-icon" />}
helperText='Here is helper text'
ouiaId='Example'
/>)
cy.get('[data-ouia-component-id="Example-card"]').should('exist');
});
it('renders custom footer', () => {
cy.mount(
<ServiceCard
title='Example'
subtitle='A basic example'
description='This is a basic ServiceCard Example'
icon={<img src="/" alt="page-header-icon" />}
helperText='Here is helper text'
ouiaId='Example'
footer={<>
<Button
variant={ButtonVariant.secondary}
isInline
className='pf-v5-u-pr-md'
component="a"
href='www.google.com'>
Launch
</Button>
<Button
variant={ButtonVariant.link}
component="a"
isInline
href='www.google.com'
>
Learn More
</Button></>
}
/>)
cy.get('[data-ouia-component-id="Example-footer"]').should('exist');
})
});