@datarailsshared/dr_renderer 1.5.159 → 1.5.168
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/.idea/jsLibraryMappings.xml +6 -0
- package/.idea/misc.xml +9 -0
- package/.nvmrc +1 -0
- package/jest.config.js +1 -1
- package/package.json +9 -11
- package/scripts/check-versions.js +16 -0
- package/src/highcharts_renderer.d.ts +2 -2
- package/tsconfig.json +1 -1
- package/.circleci/config.yml +0 -85
- package/.github/workflows/ai-coder-jira.yml +0 -915
- package/.github/workflows/ai-coder-n8n-caller.yml +0 -82
- package/.github/workflows/release.yml +0 -49
- package/tests/__snapshots__/suboptions.test.js.snap +0 -5028
- package/tests/dr-renderer-helpers.test.js +0 -228
- package/tests/dr_chart_tooltip.test.js +0 -789
- package/tests/dr_gauge_chart.test.js +0 -2041
- package/tests/errors.test.js +0 -157
- package/tests/highcharts_renderer.test.js +0 -9407
- package/tests/mock/add-in-dynamic-ranges.json +0 -127
- package/tests/mock/add-in-functions.json +0 -410
- package/tests/mock/add-in-tables.json +0 -347
- package/tests/mock/tables.json +0 -2258
- package/tests/mock/widgets.json +0 -401
- package/tests/options-builder.test.js +0 -1698
- package/tests/pivot-table/freeze-panes/constants.test.js +0 -92
- package/tests/pivot-table/freeze-panes/index.test.js +0 -193
- package/tests/pivot-table/freeze-panes/sticky-strategy.test.js +0 -542
- package/tests/pivot-table/freeze-panes/transform-strategy.test.js +0 -304
- package/tests/ptCreateDrillDownSeriesToDrilldownChart.test.js +0 -509
- package/tests/seriesPointStyles-helper.test.js +0 -114
- package/tests/suboptions.test.js +0 -322
- package/tests/value.formatter.test.js +0 -143
package/tests/errors.test.js
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
const {
|
|
2
|
-
BaseRendererError,
|
|
3
|
-
NoDataError,
|
|
4
|
-
TooMuchDataError,
|
|
5
|
-
DataConflictError,
|
|
6
|
-
GaugeConfigurationError,
|
|
7
|
-
GenericRenderingError,
|
|
8
|
-
GenericComputationalError
|
|
9
|
-
} = require('../src/errors');
|
|
10
|
-
|
|
11
|
-
describe('Error Classes', () => {
|
|
12
|
-
describe('BaseRendererError', () => {
|
|
13
|
-
it('should create instance with provided code and title', () => {
|
|
14
|
-
const error = new BaseRendererError({ code: 5, title: 'Test Error' });
|
|
15
|
-
|
|
16
|
-
expect(error.code).toBe(5);
|
|
17
|
-
expect(error.title).toBe('Test Error');
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create instance with options parameter', () => {
|
|
21
|
-
const options = { isBreakdown: true, minCategories: 5 };
|
|
22
|
-
const error = new BaseRendererError({ code: 5, title: 'Test Error', options });
|
|
23
|
-
|
|
24
|
-
expect(error.code).toBe(5);
|
|
25
|
-
expect(error.title).toBe('Test Error');
|
|
26
|
-
expect(error.options).toEqual(options);
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
it('should set empty options object when no options provided', () => {
|
|
30
|
-
const error = new BaseRendererError({ code: 1, title: 'Test' });
|
|
31
|
-
|
|
32
|
-
expect(error.options).toEqual({});
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it('should be instance of BaseRendererError', () => {
|
|
36
|
-
const error = new BaseRendererError({ code: 1, title: 'Test' });
|
|
37
|
-
expect(error).toBeInstanceOf(BaseRendererError);
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it('should be instance of Error', () => {
|
|
41
|
-
const error = new BaseRendererError({ code: 1, title: 'Test' });
|
|
42
|
-
expect(error).toBeInstanceOf(Error);
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
describe('NoDataError', () => {
|
|
47
|
-
it('should create instance with correct code and title', () => {
|
|
48
|
-
const error = new NoDataError();
|
|
49
|
-
|
|
50
|
-
expect(error.code).toBe(1);
|
|
51
|
-
expect(error.title).toBe('No Data Available');
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('should be instance of BaseRendererError', () => {
|
|
55
|
-
const error = new NoDataError();
|
|
56
|
-
expect(error).toBeInstanceOf(BaseRendererError);
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
describe('TooMuchDataError', () => {
|
|
61
|
-
it('should create instance with correct code and title', () => {
|
|
62
|
-
const error = new TooMuchDataError();
|
|
63
|
-
|
|
64
|
-
expect(error.code).toBe(3);
|
|
65
|
-
expect(error.title).toBe('There is too much data. Please edit this widget');
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
it('should be instance of BaseRendererError', () => {
|
|
69
|
-
const error = new TooMuchDataError();
|
|
70
|
-
expect(error).toBeInstanceOf(BaseRendererError);
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
describe('DataConflictError', () => {
|
|
75
|
-
it('should create instance with correct code and title', () => {
|
|
76
|
-
const error = new DataConflictError();
|
|
77
|
-
|
|
78
|
-
expect(error.code).toBe(5);
|
|
79
|
-
expect(error.title).toBe('Data Conflict');
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
it('should create instance with options parameter', () => {
|
|
83
|
-
const options = {
|
|
84
|
-
isBreakdown: true,
|
|
85
|
-
uniqueCategories: ['A', 'B'],
|
|
86
|
-
minCategories: 5,
|
|
87
|
-
maxCategories: 10
|
|
88
|
-
};
|
|
89
|
-
const error = new DataConflictError(options);
|
|
90
|
-
|
|
91
|
-
expect(error.code).toBe(5);
|
|
92
|
-
expect(error.title).toBe('Data Conflict');
|
|
93
|
-
expect(error.options).toEqual(options);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
it('should create instance with empty options when none provided', () => {
|
|
97
|
-
const error = new DataConflictError();
|
|
98
|
-
|
|
99
|
-
expect(error.options).toEqual({});
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
describe('GaugeConfigurationError', () => {
|
|
104
|
-
it('should create instance with correct code and title', () => {
|
|
105
|
-
const error = new GaugeConfigurationError();
|
|
106
|
-
|
|
107
|
-
expect(error.code).toBe(6);
|
|
108
|
-
expect(error.title).toBe('Please configure goal and needle');
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
it('should create instance with empty options', () => {
|
|
112
|
-
const error = new GaugeConfigurationError();
|
|
113
|
-
|
|
114
|
-
expect(error.options).toEqual({});
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
describe('GenericRenderingError', () => {
|
|
119
|
-
it('should create instance with correct code and title', () => {
|
|
120
|
-
const error = new GenericRenderingError();
|
|
121
|
-
|
|
122
|
-
expect(error.code).toBe(7);
|
|
123
|
-
expect(error.title).toBe('An error occurred rendering the PivotTable results.');
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
it('should create instance with empty options', () => {
|
|
127
|
-
const error = new GenericRenderingError();
|
|
128
|
-
|
|
129
|
-
expect(error.options).toEqual({});
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
it('should be instance of BaseRendererError', () => {
|
|
133
|
-
const error = new GenericRenderingError();
|
|
134
|
-
expect(error).toBeInstanceOf(BaseRendererError);
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
describe('GenericComputationalError', () => {
|
|
139
|
-
it('should create instance with correct code and title', () => {
|
|
140
|
-
const error = new GenericComputationalError();
|
|
141
|
-
|
|
142
|
-
expect(error.code).toBe(8);
|
|
143
|
-
expect(error.title).toBe('An error occurred computing the PivotTable results.');
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
it('should create instance with empty options', () => {
|
|
147
|
-
const error = new GenericComputationalError();
|
|
148
|
-
|
|
149
|
-
expect(error.options).toEqual({});
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
it('should be instance of BaseRendererError', () => {
|
|
153
|
-
const error = new GenericComputationalError();
|
|
154
|
-
expect(error).toBeInstanceOf(BaseRendererError);
|
|
155
|
-
});
|
|
156
|
-
});
|
|
157
|
-
});
|