Skip to content

Commit

Permalink
Merge branch 'main' into fix/DSM-844_limit-height-in-product-card-loy…
Browse files Browse the repository at this point in the history
…al-badges
  • Loading branch information
acpcor committed Oct 17, 2023
2 parents dd86679 + fb11e8c commit 1b9e321
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 37 deletions.
66 changes: 33 additions & 33 deletions .bitmap
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@
{
"atoms/button": {
"scope": "carlsberggroup.malty",
"version": "0.0.100",
"version": "0.0.101",
"mainFile": "index.ts",
"rootDir": "malty/atoms/Button"
},
"atoms/card": {
"scope": "carlsberggroup.malty",
"version": "0.0.16",
"version": "0.0.17",
"mainFile": "index.ts",
"rootDir": "malty/atoms/Card"
},
"atoms/checkbox": {
"scope": "carlsberggroup.malty",
"version": "0.0.67",
"version": "0.0.68",
"mainFile": "index.ts",
"rootDir": "malty/atoms/Checkbox"
},
"atoms/chip": {
"scope": "carlsberggroup.malty",
"version": "0.0.57",
"version": "0.0.58",
"mainFile": "index.ts",
"rootDir": "malty/atoms/Chip"
},
Expand Down Expand Up @@ -107,7 +107,7 @@
},
"atoms/price": {
"scope": "carlsberggroup.malty",
"version": "0.0.7",
"version": "0.0.8",
"mainFile": "index.ts",
"rootDir": "malty/atoms/Price"
},
Expand All @@ -119,7 +119,7 @@
},
"atoms/progress-circle": {
"scope": "carlsberggroup.malty",
"version": "0.0.8",
"version": "0.0.9",
"mainFile": "index.ts",
"rootDir": "malty/atoms/ProgressCircle"
},
Expand All @@ -137,19 +137,19 @@
},
"atoms/rating": {
"scope": "carlsberggroup.malty",
"version": "0.0.32",
"version": "0.0.33",
"mainFile": "index.ts",
"rootDir": "malty/atoms/Rating"
},
"atoms/select": {
"scope": "carlsberggroup.malty",
"version": "0.0.107",
"version": "0.0.108",
"mainFile": "index.ts",
"rootDir": "malty/atoms/Select"
},
"atoms/text": {
"scope": "carlsberggroup.malty",
"version": "0.0.64",
"version": "0.0.65",
"mainFile": "index.ts",
"rootDir": "malty/atoms/Text"
},
Expand All @@ -167,7 +167,7 @@
},
"atoms/tooltip": {
"scope": "carlsberggroup.malty",
"version": "0.0.87",
"version": "0.0.88",
"mainFile": "index.ts",
"rootDir": "malty/atoms/Tooltip"
},
Expand Down Expand Up @@ -1487,139 +1487,139 @@
},
"molecules/accordion": {
"scope": "carlsberggroup.malty",
"version": "0.0.38",
"version": "0.0.39",
"mainFile": "index.ts",
"rootDir": "malty/molecules/Accordion"
},
"molecules/alert-banner": {
"scope": "carlsberggroup.malty",
"version": "0.0.90",
"version": "0.0.91",
"mainFile": "index.ts",
"rootDir": "malty/molecules/AlertBanner"
},
"molecules/alert-inline": {
"scope": "carlsberggroup.malty",
"version": "0.0.58",
"version": "0.0.59",
"mainFile": "index.ts",
"rootDir": "malty/molecules/AlertInline"
},
"molecules/article-card": {
"scope": "carlsberggroup.malty",
"version": "0.0.12",
"version": "0.0.13",
"mainFile": "index.ts",
"rootDir": "malty/molecules/ArticleCard"
},
"molecules/avatar": {
"scope": "carlsberggroup.malty",
"version": "0.0.51",
"version": "0.0.52",
"mainFile": "index.tsx",
"rootDir": "malty/molecules/Avatar"
},
"molecules/banner": {
"scope": "carlsberggroup.malty",
"version": "0.0.17",
"version": "0.0.18",
"mainFile": "index.ts",
"rootDir": "malty/molecules/Banner"
},
"molecules/datepicker": {
"scope": "carlsberggroup.malty",
"version": "0.0.69",
"version": "0.0.70",
"mainFile": "index.ts",
"rootDir": "malty/molecules/Datepicker"
},
"molecules/footer": {
"scope": "carlsberggroup.malty",
"version": "0.0.17",
"version": "0.0.18",
"mainFile": "index.ts",
"rootDir": "malty/molecules/Footer"
},
"molecules/hero": {
"scope": "carlsberggroup.malty",
"version": "0.0.14",
"version": "0.0.15",
"mainFile": "index.ts",
"rootDir": "malty/molecules/Hero"
},
"molecules/loading": {
"scope": "carlsberggroup.malty",
"version": "0.0.75",
"version": "0.0.76",
"mainFile": "index.ts",
"rootDir": "malty/molecules/Loading"
},
"molecules/modal": {
"scope": "carlsberggroup.malty",
"version": "0.0.77",
"version": "0.0.78",
"mainFile": "index.ts",
"rootDir": "malty/molecules/Modal"
},
"molecules/nav-list": {
"scope": "carlsberggroup.malty",
"version": "0.0.59",
"version": "0.0.60",
"mainFile": "index.tsx",
"rootDir": "malty/molecules/NavList"
},
"molecules/pagination": {
"scope": "carlsberggroup.malty",
"version": "0.0.80",
"version": "0.0.81",
"mainFile": "index.ts",
"rootDir": "malty/molecules/Pagination"
},
"molecules/product-card": {
"scope": "carlsberggroup.malty",
"version": "0.0.42",
"version": "0.0.43",
"mainFile": "index.ts",
"rootDir": "malty/molecules/ProductCard"
},
"molecules/product-quantity-actions": {
"scope": "carlsberggroup.malty",
"version": "0.0.21",
"version": "0.0.22",
"mainFile": "index.ts",
"rootDir": "malty/molecules/ProductQuantityActions"
},
"molecules/products-bar": {
"scope": "carlsberggroup.malty",
"version": "0.0.60",
"version": "0.0.61",
"mainFile": "index.tsx",
"rootDir": "malty/molecules/ProductsBar"
},
"molecules/segmented-control": {
"scope": "carlsberggroup.malty",
"version": "0.0.13",
"version": "0.0.14",
"mainFile": "index.ts",
"rootDir": "malty/molecules/SegmentedControl"
},
"molecules/side-nav": {
"scope": "carlsberggroup.malty",
"version": "0.0.66",
"version": "0.0.67",
"mainFile": "index.tsx",
"rootDir": "malty/molecules/SideNav"
},
"molecules/sku": {
"scope": "carlsberggroup.malty",
"version": "0.0.9",
"version": "0.0.10",
"mainFile": "index.ts",
"rootDir": "malty/molecules/Sku"
},
"molecules/stepper": {
"scope": "carlsberggroup.malty",
"version": "0.0.73",
"version": "0.0.74",
"mainFile": "index.ts",
"rootDir": "malty/molecules/Stepper"
},
"molecules/toast": {
"scope": "carlsberggroup.malty",
"version": "0.0.66",
"version": "0.0.67",
"mainFile": "index.ts",
"rootDir": "malty/molecules/Toast"
},
"organisms/carousel": {
"scope": "carlsberggroup.malty",
"version": "0.0.25",
"version": "0.0.26",
"mainFile": "index.ts",
"rootDir": "malty/organisms/Carousel"
},
"organisms/table": {
"scope": "carlsberggroup.malty",
"version": "0.1.5",
"version": "0.1.6",
"mainFile": "index.ts",
"rootDir": "malty/organisms/Table"
},
Expand Down
29 changes: 26 additions & 3 deletions malty/atoms/Text/Text.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,33 @@ import { TextStyle } from '.';
import { Text } from './Text';

const text = 'this is a text block';
describe('text', () => {
const testId = 'text';

describe('Text', () => {
it('should render with the correct text', () => {
render(<Text textStyle={TextStyle.MediumBold}>{text}</Text>);
const rendered = screen.getByText(text);
expect(rendered).toBeInTheDocument();

expect(screen.getByText(text)).toBeInTheDocument();
});

it('should have the assigned data test id', () => {
render(
<Text dataQaId={testId} textStyle={TextStyle.MediumBold}>
{text}
</Text>
);

expect(screen.getByTestId(testId)).toBeInTheDocument();
});

it('should render children element', () => {
render(
<Text dataQaId={testId} textStyle={TextStyle.MediumBold}>
<span data-testid="span">{text}</span>
</Text>
);

expect(screen.getByTestId('span')).toBeInTheDocument();
expect(screen.getByTestId(testId)).toBeInTheDocument();
});
});
1 change: 0 additions & 1 deletion malty/atoms/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export const Text = ({
theme={theme}
as={StyledTag}
className={className}
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
>
{children}
Expand Down

0 comments on commit 1b9e321

Please sign in to comment.