aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/card/card-actions.test.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/molecules/card/card-actions.test.tsx')
-rw-r--r--src/components/molecules/card/card-actions.test.tsx37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/components/molecules/card/card-actions.test.tsx b/src/components/molecules/card/card-actions.test.tsx
new file mode 100644
index 0000000..94c2677
--- /dev/null
+++ b/src/components/molecules/card/card-actions.test.tsx
@@ -0,0 +1,37 @@
+import { describe, expect, it } from '@jest/globals';
+import { render, screen as rtlScreen } from '@testing-library/react';
+import { CardActions } from './card-actions';
+
+describe('CardActions', () => {
+ it('renders its children', () => {
+ const actions = 'animi et omnis';
+
+ render(<CardActions>{actions}</CardActions>);
+
+ expect(rtlScreen.getByText(actions)).toBeInTheDocument();
+ });
+
+ it('can render its children with start alignment', () => {
+ const actions = 'animi et omnis';
+
+ render(<CardActions alignment="start">{actions}</CardActions>);
+
+ expect(rtlScreen.getByText(actions)).toHaveStyle(`--alignment: flex-start`);
+ });
+
+ it('can render its children with centered alignment', () => {
+ const actions = 'animi et omnis';
+
+ render(<CardActions alignment="center">{actions}</CardActions>);
+
+ expect(rtlScreen.getByText(actions)).toHaveStyle(`--alignment: center`);
+ });
+
+ it('can render its children with end alignment', () => {
+ const actions = 'animi et omnis';
+
+ render(<CardActions alignment="end">{actions}</CardActions>);
+
+ expect(rtlScreen.getByText(actions)).toHaveStyle(`--alignment: flex-end`);
+ });
+});