@umituz/react-native-settings 4.0.1 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -100,14 +100,14 @@ describe('DisclaimerCard', () => {
|
|
|
100
100
|
<DisclaimerCard
|
|
101
101
|
title="Test Title"
|
|
102
102
|
shortMessage="Test Message"
|
|
103
|
-
iconName="
|
|
103
|
+
iconName="info"
|
|
104
104
|
iconColor="#2196F3"
|
|
105
105
|
backgroundColor="#E3F2FD"
|
|
106
106
|
onPress={jest.fn()}
|
|
107
107
|
/>
|
|
108
108
|
);
|
|
109
109
|
|
|
110
|
-
expect(getByTestId('atomic-icon-
|
|
110
|
+
expect(getByTestId('atomic-icon-info-warning')).toBeTruthy();
|
|
111
111
|
});
|
|
112
112
|
|
|
113
113
|
it('handles long text content', () => {
|
|
@@ -148,7 +148,7 @@ describe('DisclaimerCard', () => {
|
|
|
148
148
|
|
|
149
149
|
it('uses withAlpha utility correctly', () => {
|
|
150
150
|
const { withAlpha } = require('@umituz/react-native-design-system-theme');
|
|
151
|
-
|
|
151
|
+
|
|
152
152
|
render(
|
|
153
153
|
<DisclaimerCard
|
|
154
154
|
title="Test Title"
|
|
@@ -178,7 +178,7 @@ describe('DisclaimerCard', () => {
|
|
|
178
178
|
|
|
179
179
|
// Check that icon container has correct styles
|
|
180
180
|
expect(getByTestId('atomic-icon-AlertTriangle-warning')).toBeTruthy();
|
|
181
|
-
|
|
181
|
+
|
|
182
182
|
// Check that title and arrow are present
|
|
183
183
|
expect(getByTestId('atomic-icon-ArrowRight-secondary-sm')).toBeTruthy();
|
|
184
184
|
});
|
|
@@ -29,31 +29,31 @@ jest.mock('@umituz/react-native-design-system-theme', () => ({
|
|
|
29
29
|
describe('DisclaimerSetting', () => {
|
|
30
30
|
it('renders disclaimer card correctly', () => {
|
|
31
31
|
const { getByTestId } = render(<DisclaimerSetting />);
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
expect(getByTestId('disclaimer-setting')).toBeTruthy();
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
it('opens modal when card is pressed', () => {
|
|
37
37
|
const { getByTestId } = render(<DisclaimerSetting />);
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
const card = getByTestId('disclaimer-setting');
|
|
40
40
|
fireEvent.press(card);
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
// Modal should be visible now
|
|
43
43
|
expect(getByTestId('close-disclaimer-modal')).toBeTruthy();
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
it('closes modal when close button is pressed', () => {
|
|
47
47
|
const { getByTestId } = render(<DisclaimerSetting />);
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
// Open modal first
|
|
50
50
|
const card = getByTestId('disclaimer-setting');
|
|
51
51
|
fireEvent.press(card);
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
// Close modal
|
|
54
54
|
const closeButton = getByTestId('close-disclaimer-modal');
|
|
55
55
|
fireEvent.press(closeButton);
|
|
56
|
-
|
|
56
|
+
|
|
57
57
|
// Modal should be closed
|
|
58
58
|
expect(() => getByTestId('close-disclaimer-modal')).toThrow();
|
|
59
59
|
});
|
|
@@ -63,11 +63,11 @@ describe('DisclaimerSetting', () => {
|
|
|
63
63
|
titleKey: 'custom.title',
|
|
64
64
|
messageKey: 'custom.message',
|
|
65
65
|
shortMessageKey: 'custom.shortMessage',
|
|
66
|
-
iconName: '
|
|
66
|
+
iconName: 'info',
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
const { getByText } = render(<DisclaimerSetting {...customProps} />);
|
|
70
|
-
|
|
70
|
+
|
|
71
71
|
expect(getByText('custom.title')).toBeTruthy();
|
|
72
72
|
expect(getByText('custom.shortMessage')).toBeTruthy();
|
|
73
73
|
});
|