@oanda/labs-order-book-widget 1.0.94 → 1.0.96
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/CHANGELOG.md +740 -0
- package/dist/main/OrderBookWidget/ChartWithData.js.map +1 -1
- package/dist/main/OrderBookWidget/Main.js.map +1 -1
- package/dist/main/OrderBookWidget/OrderBookWidget.js.map +1 -1
- package/dist/main/OrderBookWidget/components/Chart/Chart.js +2 -1
- package/dist/main/OrderBookWidget/components/Chart/Chart.js.map +1 -1
- package/dist/main/OrderBookWidget/components/Chart/constants.js.map +1 -1
- package/dist/main/OrderBookWidget/components/Chart/formatters.js.map +1 -1
- package/dist/main/OrderBookWidget/components/Chart/getOption.js.map +1 -1
- package/dist/main/OrderBookWidget/components/Chart/types.js.map +1 -1
- package/dist/main/OrderBookWidget/config.js.map +1 -1
- package/dist/main/OrderBookWidget/constants.js.map +1 -1
- package/dist/main/OrderBookWidget/render.js.map +1 -1
- package/dist/main/OrderBookWidget/types.js.map +1 -1
- package/dist/main/gql/getOrderPositionBooks.js.map +1 -1
- package/dist/main/gql/types/fragment-masking.js.map +1 -1
- package/dist/main/gql/types/gql.js.map +1 -1
- package/dist/main/gql/types/graphql.js.map +1 -1
- package/dist/main/gql/types/index.js.map +1 -1
- package/dist/main/index.js.map +1 -1
- package/dist/main/translations/index.js.map +1 -1
- package/dist/main/translations/translations.js.map +1 -1
- package/dist/module/OrderBookWidget/ChartWithData.js.map +1 -1
- package/dist/module/OrderBookWidget/Main.js.map +1 -1
- package/dist/module/OrderBookWidget/OrderBookWidget.js.map +1 -1
- package/dist/module/OrderBookWidget/components/Chart/Chart.js +2 -1
- package/dist/module/OrderBookWidget/components/Chart/Chart.js.map +1 -1
- package/dist/module/OrderBookWidget/components/Chart/constants.js.map +1 -1
- package/dist/module/OrderBookWidget/components/Chart/formatters.js.map +1 -1
- package/dist/module/OrderBookWidget/components/Chart/getOption.js.map +1 -1
- package/dist/module/OrderBookWidget/components/Chart/types.js.map +1 -1
- package/dist/module/OrderBookWidget/config.js.map +1 -1
- package/dist/module/OrderBookWidget/constants.js.map +1 -1
- package/dist/module/OrderBookWidget/render.js.map +1 -1
- package/dist/module/OrderBookWidget/types.js.map +1 -1
- package/dist/module/gql/getOrderPositionBooks.js.map +1 -1
- package/dist/module/gql/types/fragment-masking.js.map +1 -1
- package/dist/module/gql/types/gql.js.map +1 -1
- package/dist/module/gql/types/graphql.js.map +1 -1
- package/dist/module/gql/types/index.js.map +1 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/translations/index.js.map +1 -1
- package/dist/module/translations/translations.js.map +1 -1
- package/package.json +4 -4
- package/src/OrderBookWidget/components/Chart/Chart.tsx +1 -1
- package/test/Main.test.tsx +2 -43
package/test/Main.test.tsx
CHANGED
|
@@ -54,49 +54,6 @@ const mocks = [
|
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
},
|
|
57
|
-
{
|
|
58
|
-
request: {
|
|
59
|
-
query: getOrderPositionBooks,
|
|
60
|
-
variables: {
|
|
61
|
-
instrument: InstrumentId.EUR_AUD,
|
|
62
|
-
bookType: BookType.Order,
|
|
63
|
-
recentHours: 1,
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
result: {
|
|
67
|
-
data: {
|
|
68
|
-
orderPositionBooks: [
|
|
69
|
-
{
|
|
70
|
-
bucketWidth: 0.0005,
|
|
71
|
-
price: 0.8,
|
|
72
|
-
time: '2024-02-21T10:30:00Z',
|
|
73
|
-
buckets: [
|
|
74
|
-
{
|
|
75
|
-
price: 0.02,
|
|
76
|
-
longCountPercent: 0.0582,
|
|
77
|
-
shortCountPercent: 0.0,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
price: 0.7,
|
|
81
|
-
longCountPercent: 0.0582,
|
|
82
|
-
shortCountPercent: 0.0,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
price: 0.9925,
|
|
86
|
-
longCountPercent: 0.0582,
|
|
87
|
-
shortCountPercent: 0.0,
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
price: 1.0,
|
|
91
|
-
longCountPercent: 0.1163,
|
|
92
|
-
shortCountPercent: 0.0,
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
57
|
];
|
|
101
58
|
|
|
102
59
|
describe('Main component', () => {
|
|
@@ -119,6 +76,7 @@ describe('Main component', () => {
|
|
|
119
76
|
expect(await findByTestId('order-book-widget')).toBeInTheDocument();
|
|
120
77
|
expect(await findByText('last_updated: 10:30:00 UTC, today')).toBeInTheDocument();
|
|
121
78
|
expect((await findByTestId('select'))).toBeInTheDocument();
|
|
79
|
+
expect(await findByTestId('order-book-chart')).toBeInTheDocument();
|
|
122
80
|
});
|
|
123
81
|
it('should render widget component', async () => {
|
|
124
82
|
const { findByTestId, queryAllByTestId } = render(
|
|
@@ -131,5 +89,6 @@ describe('Main component', () => {
|
|
|
131
89
|
|
|
132
90
|
expect(await findByTestId('order-book-widget')).toBeInTheDocument();
|
|
133
91
|
expect((await queryAllByTestId('select')).length).toBe(0);
|
|
92
|
+
expect(await findByTestId('order-book-chart')).toBeInTheDocument();
|
|
134
93
|
});
|
|
135
94
|
});
|