@equinor/roma-framework 1.0.0 → 1.1.0

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.
Files changed (160) hide show
  1. package/cypress.mjs +1132 -0
  2. package/dev-portal/index.d.ts +15 -0
  3. package/dev-portal/lib/api/fetcher.d.ts +21 -0
  4. package/dev-portal/lib/api/ms-graph/api/group/find-group-members.d.ts +2 -0
  5. package/dev-portal/lib/api/ms-graph/api/user/find-user-by-shortname.d.ts +1 -0
  6. package/dev-portal/lib/api/ms-graph/api/user/find-users-by-mail.d.ts +2 -0
  7. package/dev-portal/lib/api/ms-graph/index.d.ts +10 -0
  8. package/dev-portal/lib/api/ms-graph/model/azure-response.d.ts +7 -0
  9. package/dev-portal/lib/api/ms-graph/model/error.d.ts +11 -0
  10. package/dev-portal/lib/api/roma/api/app-controller/app-controller.d.ts +121 -0
  11. package/dev-portal/lib/api/roma/api/category-controller/category-controller.d.ts +93 -0
  12. package/dev-portal/lib/api/roma/api/environment-controller/environment-controller.d.ts +26 -0
  13. package/dev-portal/lib/api/roma/api/feedback-controller/feedback-controller.d.ts +50 -0
  14. package/dev-portal/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +161 -0
  15. package/dev-portal/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +20 -0
  16. package/dev-portal/lib/api/roma/api/service-controller/service-controller.d.ts +93 -0
  17. package/dev-portal/lib/api/roma/api/setting-controller/setting-controller.d.ts +260 -0
  18. package/dev-portal/lib/api/roma/index.d.ts +9 -0
  19. package/dev-portal/lib/api/roma/model/appDto.d.ts +19 -0
  20. package/dev-portal/lib/api/roma/model/categoryDto.d.ts +13 -0
  21. package/dev-portal/lib/api/roma/model/environmentDto.d.ts +10 -0
  22. package/dev-portal/lib/api/roma/model/feedbackDetailsDto.d.ts +13 -0
  23. package/dev-portal/lib/api/roma/model/feedbackDto.d.ts +6 -0
  24. package/dev-portal/lib/api/roma/model/feedbackExpandedResponseDetailsDto.d.ts +13 -0
  25. package/dev-portal/lib/api/roma/model/feedbackExpandedResponseDto.d.ts +4 -0
  26. package/dev-portal/lib/api/roma/model/feedbackExpandedResponseIssueDto.d.ts +6 -0
  27. package/dev-portal/lib/api/roma/model/feedbackFeedbackDto.d.ts +13 -0
  28. package/dev-portal/lib/api/roma/model/feedbackPage.d.ts +19 -0
  29. package/dev-portal/lib/api/roma/model/feedbackResponseDto.d.ts +4 -0
  30. package/dev-portal/lib/api/roma/model/feedbackResponseIssueDto.d.ts +11 -0
  31. package/dev-portal/lib/api/roma/model/feedbackSolutionDto.d.ts +10 -0
  32. package/dev-portal/lib/api/roma/model/getAllApps200.d.ts +10 -0
  33. package/dev-portal/lib/api/roma/model/getAllCategories200.d.ts +10 -0
  34. package/dev-portal/lib/api/roma/model/getAllRomaConfigurationTypes200Item.d.ts +11 -0
  35. package/dev-portal/lib/api/roma/model/getAllServices200.d.ts +10 -0
  36. package/dev-portal/lib/api/roma/model/getSettingsByAppShortName200.d.ts +10 -0
  37. package/dev-portal/lib/api/roma/model/getSettingsByUserId200.d.ts +10 -0
  38. package/dev-portal/lib/api/roma/model/index.d.ts +38 -0
  39. package/dev-portal/lib/api/roma/model/listFeedbacksByCurrentUserParams.d.ts +17 -0
  40. package/dev-portal/lib/api/roma/model/pageableObject.d.ts +9 -0
  41. package/dev-portal/lib/api/roma/model/romaConfigurationDto.d.ts +7 -0
  42. package/dev-portal/lib/api/roma/model/romaConfigurationDtoValue.d.ts +10 -0
  43. package/dev-portal/lib/api/roma/model/serverSentEventActivityLogDto.d.ts +8 -0
  44. package/dev-portal/lib/api/roma/model/serverSentEventStandardEventDto.d.ts +10 -0
  45. package/dev-portal/lib/api/roma/model/serviceDto.d.ts +16 -0
  46. package/dev-portal/lib/api/roma/model/settingDto.d.ts +9 -0
  47. package/dev-portal/lib/api/roma/model/settingDtoValue.d.ts +10 -0
  48. package/dev-portal/lib/api/roma/model/sortObject.d.ts +12 -0
  49. package/dev-portal/lib/api/roma/model/uploadBundleBody.d.ts +10 -0
  50. package/dev-portal/lib/api/roma/model/versionDto.d.ts +12 -0
  51. package/dev-portal/lib/api/roma/use-client.d.ts +34 -0
  52. package/dev-portal/lib/api/util.d.ts +1 -0
  53. package/dev-portal/lib/app-provider.d.ts +32 -0
  54. package/dev-portal/lib/dev-portal/AppLoader.d.ts +14 -0
  55. package/dev-portal/lib/dev-portal/AppViewer.d.ts +6 -0
  56. package/dev-portal/lib/dev-portal/EquinorLoader.d.ts +12 -0
  57. package/dev-portal/lib/dev-portal/ErrorViewer.d.ts +20 -0
  58. package/dev-portal/lib/dev-portal/Header.d.ts +2 -0
  59. package/dev-portal/lib/dev-portal/HeaderMenu.d.ts +4 -0
  60. package/dev-portal/lib/dev-portal/HttpErrorViewer.d.ts +13 -0
  61. package/dev-portal/lib/dev-portal/Navigation.d.ts +5 -0
  62. package/dev-portal/lib/dev-portal/PortalStyles.d.ts +1111 -0
  63. package/dev-portal/lib/dev-portal/PortalTypes.d.ts +13 -0
  64. package/dev-portal/lib/dev-portal/Root.d.ts +5 -0
  65. package/dev-portal/lib/dev-portal/SideSheets.d.ts +6 -0
  66. package/dev-portal/lib/dev-portal/config.d.ts +3 -0
  67. package/dev-portal/lib/dev-portal/index.d.ts +13 -0
  68. package/dev-portal/lib/dev-portal/logo.d.ts +2 -0
  69. package/dev-portal/lib/eds-event-provider.d.ts +6 -0
  70. package/dev-portal/lib/error-handlers/fallback-http-errors.d.ts +1 -0
  71. package/dev-portal/lib/error-handlers/http-error-handler.d.ts +11 -0
  72. package/dev-portal/lib/hooks/use-get-api-roles.d.ts +11 -0
  73. package/dev-portal/lib/hooks/use-has-api-role.d.ts +7 -0
  74. package/dev-portal/lib/make-component.d.ts +12 -0
  75. package/dev-portal/lib/query/persister.d.ts +6 -0
  76. package/dev-portal/lib/style-provider.d.ts +7 -0
  77. package/dev-portal/lib/test-utils/modules.d.ts +109 -0
  78. package/dev-portal/lib/test-utils/roma-cypress-wrapper.d.ts +3 -0
  79. package/dev-portal/package.json +5 -1
  80. package/dev-portal/roma-framework.umd.js +2787 -3311
  81. package/index.d.ts +15 -0
  82. package/lib/api/fetcher.d.ts +21 -0
  83. package/lib/api/ms-graph/api/group/find-group-members.d.ts +2 -0
  84. package/lib/api/ms-graph/api/user/find-user-by-shortname.d.ts +1 -0
  85. package/lib/api/ms-graph/api/user/find-users-by-mail.d.ts +2 -0
  86. package/lib/api/ms-graph/index.d.ts +10 -0
  87. package/lib/api/ms-graph/model/azure-response.d.ts +7 -0
  88. package/lib/api/ms-graph/model/error.d.ts +11 -0
  89. package/lib/api/roma/api/app-controller/app-controller.d.ts +121 -0
  90. package/lib/api/roma/api/category-controller/category-controller.d.ts +93 -0
  91. package/lib/api/roma/api/environment-controller/environment-controller.d.ts +26 -0
  92. package/lib/api/roma/api/feedback-controller/feedback-controller.d.ts +50 -0
  93. package/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +161 -0
  94. package/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +20 -0
  95. package/lib/api/roma/api/service-controller/service-controller.d.ts +93 -0
  96. package/lib/api/roma/api/setting-controller/setting-controller.d.ts +260 -0
  97. package/lib/api/roma/index.d.ts +9 -0
  98. package/lib/api/roma/model/appDto.d.ts +19 -0
  99. package/lib/api/roma/model/categoryDto.d.ts +13 -0
  100. package/lib/api/roma/model/environmentDto.d.ts +10 -0
  101. package/lib/api/roma/model/feedbackDetailsDto.d.ts +13 -0
  102. package/lib/api/roma/model/feedbackDto.d.ts +6 -0
  103. package/lib/api/roma/model/feedbackExpandedResponseDetailsDto.d.ts +13 -0
  104. package/lib/api/roma/model/feedbackExpandedResponseDto.d.ts +4 -0
  105. package/lib/api/roma/model/feedbackExpandedResponseIssueDto.d.ts +6 -0
  106. package/lib/api/roma/model/feedbackFeedbackDto.d.ts +13 -0
  107. package/lib/api/roma/model/feedbackPage.d.ts +19 -0
  108. package/lib/api/roma/model/feedbackResponseDto.d.ts +4 -0
  109. package/lib/api/roma/model/feedbackResponseIssueDto.d.ts +11 -0
  110. package/lib/api/roma/model/feedbackSolutionDto.d.ts +10 -0
  111. package/lib/api/roma/model/getAllApps200.d.ts +10 -0
  112. package/lib/api/roma/model/getAllCategories200.d.ts +10 -0
  113. package/lib/api/roma/model/getAllRomaConfigurationTypes200Item.d.ts +11 -0
  114. package/lib/api/roma/model/getAllServices200.d.ts +10 -0
  115. package/lib/api/roma/model/getSettingsByAppShortName200.d.ts +10 -0
  116. package/lib/api/roma/model/getSettingsByUserId200.d.ts +10 -0
  117. package/lib/api/roma/model/index.d.ts +38 -0
  118. package/lib/api/roma/model/listFeedbacksByCurrentUserParams.d.ts +17 -0
  119. package/lib/api/roma/model/pageableObject.d.ts +9 -0
  120. package/lib/api/roma/model/romaConfigurationDto.d.ts +7 -0
  121. package/lib/api/roma/model/romaConfigurationDtoValue.d.ts +10 -0
  122. package/lib/api/roma/model/serverSentEventActivityLogDto.d.ts +8 -0
  123. package/lib/api/roma/model/serverSentEventStandardEventDto.d.ts +10 -0
  124. package/lib/api/roma/model/serviceDto.d.ts +16 -0
  125. package/lib/api/roma/model/settingDto.d.ts +9 -0
  126. package/lib/api/roma/model/settingDtoValue.d.ts +10 -0
  127. package/lib/api/roma/model/sortObject.d.ts +12 -0
  128. package/lib/api/roma/model/uploadBundleBody.d.ts +10 -0
  129. package/lib/api/roma/model/versionDto.d.ts +12 -0
  130. package/lib/api/roma/use-client.d.ts +34 -0
  131. package/lib/api/util.d.ts +1 -0
  132. package/lib/app-provider.d.ts +32 -0
  133. package/lib/dev-portal/AppLoader.d.ts +14 -0
  134. package/lib/dev-portal/AppViewer.d.ts +6 -0
  135. package/lib/dev-portal/EquinorLoader.d.ts +12 -0
  136. package/lib/dev-portal/ErrorViewer.d.ts +20 -0
  137. package/lib/dev-portal/Header.d.ts +2 -0
  138. package/lib/dev-portal/HeaderMenu.d.ts +4 -0
  139. package/lib/dev-portal/HttpErrorViewer.d.ts +13 -0
  140. package/lib/dev-portal/Navigation.d.ts +5 -0
  141. package/lib/dev-portal/PortalStyles.d.ts +1111 -0
  142. package/lib/dev-portal/PortalTypes.d.ts +13 -0
  143. package/lib/dev-portal/Root.d.ts +5 -0
  144. package/lib/dev-portal/SideSheets.d.ts +6 -0
  145. package/lib/dev-portal/config.d.ts +3 -0
  146. package/lib/dev-portal/index.d.ts +13 -0
  147. package/lib/dev-portal/logo.d.ts +2 -0
  148. package/lib/eds-event-provider.d.ts +6 -0
  149. package/lib/error-handlers/fallback-http-errors.d.ts +1 -0
  150. package/lib/error-handlers/http-error-handler.d.ts +11 -0
  151. package/lib/hooks/use-get-api-roles.d.ts +11 -0
  152. package/lib/hooks/use-has-api-role.d.ts +7 -0
  153. package/lib/make-component.d.ts +12 -0
  154. package/lib/query/persister.d.ts +6 -0
  155. package/lib/style-provider.d.ts +7 -0
  156. package/lib/test-utils/modules.d.ts +109 -0
  157. package/lib/test-utils/roma-cypress-wrapper.d.ts +3 -0
  158. package/package.json +6 -2
  159. package/roma-framework.mjs +1225 -4925
  160. package/router-CrMzSazo.mjs +5741 -0
package/cypress.mjs ADDED
@@ -0,0 +1,1132 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { FrameworkProvider } from "@equinor/fusion-framework-react";
3
+ import { ModuleProvider } from "@equinor/fusion-framework-react-module";
4
+ import { QueryClientProvider, QueryClient } from "@tanstack/react-query";
5
+ import { _ as __extends, e as Subscription, f as __spreadArray, h as __read, k as arrRemove, O as Observable, i as isFunction, o as operate, c as createOperatorSubscriber, a as innerFrom, l as iterator, n as readableStreamLikeToAsyncGenerator, p as isInteropObservable, q as isArrayLike, t as isPromise, u as isAsyncIterable, v as isIterable, x as isReadableStreamLike, y as createInvalidObservableTypeError, z as SafeSubscriber, E as EmptyError, A as Action$2, B as BehaviorSubject, m as map, I as IntlProvider } from "./router-CrMzSazo.mjs";
6
+ import require$$0 from "react-dom";
7
+ import * as React from "react";
8
+ var dateTimestampProvider = {
9
+ now: function() {
10
+ return Date.now();
11
+ },
12
+ delegate: void 0
13
+ };
14
+ var Action$1 = function(_super) {
15
+ __extends(Action2, _super);
16
+ function Action2(scheduler, work) {
17
+ return _super.call(this) || this;
18
+ }
19
+ Action2.prototype.schedule = function(state, delay) {
20
+ return this;
21
+ };
22
+ return Action2;
23
+ }(Subscription);
24
+ var intervalProvider = {
25
+ setInterval: function(handler, timeout) {
26
+ var args = [];
27
+ for (var _i = 2; _i < arguments.length; _i++) {
28
+ args[_i - 2] = arguments[_i];
29
+ }
30
+ return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args)));
31
+ },
32
+ clearInterval: function(handle) {
33
+ return clearInterval(handle);
34
+ },
35
+ delegate: void 0
36
+ };
37
+ var AsyncAction = function(_super) {
38
+ __extends(AsyncAction2, _super);
39
+ function AsyncAction2(scheduler, work) {
40
+ var _this = _super.call(this, scheduler, work) || this;
41
+ _this.scheduler = scheduler;
42
+ _this.work = work;
43
+ _this.pending = false;
44
+ return _this;
45
+ }
46
+ AsyncAction2.prototype.schedule = function(state, delay) {
47
+ var _a;
48
+ if (delay === void 0) {
49
+ delay = 0;
50
+ }
51
+ if (this.closed) {
52
+ return this;
53
+ }
54
+ this.state = state;
55
+ var id = this.id;
56
+ var scheduler = this.scheduler;
57
+ if (id != null) {
58
+ this.id = this.recycleAsyncId(scheduler, id, delay);
59
+ }
60
+ this.pending = true;
61
+ this.delay = delay;
62
+ this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);
63
+ return this;
64
+ };
65
+ AsyncAction2.prototype.requestAsyncId = function(scheduler, _id, delay) {
66
+ if (delay === void 0) {
67
+ delay = 0;
68
+ }
69
+ return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);
70
+ };
71
+ AsyncAction2.prototype.recycleAsyncId = function(_scheduler, id, delay) {
72
+ if (delay === void 0) {
73
+ delay = 0;
74
+ }
75
+ if (delay != null && this.delay === delay && this.pending === false) {
76
+ return id;
77
+ }
78
+ if (id != null) {
79
+ intervalProvider.clearInterval(id);
80
+ }
81
+ return void 0;
82
+ };
83
+ AsyncAction2.prototype.execute = function(state, delay) {
84
+ if (this.closed) {
85
+ return new Error("executing a cancelled action");
86
+ }
87
+ this.pending = false;
88
+ var error = this._execute(state, delay);
89
+ if (error) {
90
+ return error;
91
+ } else if (this.pending === false && this.id != null) {
92
+ this.id = this.recycleAsyncId(this.scheduler, this.id, null);
93
+ }
94
+ };
95
+ AsyncAction2.prototype._execute = function(state, _delay) {
96
+ var errored = false;
97
+ var errorValue;
98
+ try {
99
+ this.work(state);
100
+ } catch (e) {
101
+ errored = true;
102
+ errorValue = e ? e : new Error("Scheduled action threw falsy error");
103
+ }
104
+ if (errored) {
105
+ this.unsubscribe();
106
+ return errorValue;
107
+ }
108
+ };
109
+ AsyncAction2.prototype.unsubscribe = function() {
110
+ if (!this.closed) {
111
+ var _a = this, id = _a.id, scheduler = _a.scheduler;
112
+ var actions = scheduler.actions;
113
+ this.work = this.state = this.scheduler = null;
114
+ this.pending = false;
115
+ arrRemove(actions, this);
116
+ if (id != null) {
117
+ this.id = this.recycleAsyncId(scheduler, id, null);
118
+ }
119
+ this.delay = null;
120
+ _super.prototype.unsubscribe.call(this);
121
+ }
122
+ };
123
+ return AsyncAction2;
124
+ }(Action$1);
125
+ var Scheduler = function() {
126
+ function Scheduler2(schedulerActionCtor, now) {
127
+ if (now === void 0) {
128
+ now = Scheduler2.now;
129
+ }
130
+ this.schedulerActionCtor = schedulerActionCtor;
131
+ this.now = now;
132
+ }
133
+ Scheduler2.prototype.schedule = function(work, delay, state) {
134
+ if (delay === void 0) {
135
+ delay = 0;
136
+ }
137
+ return new this.schedulerActionCtor(this, work).schedule(state, delay);
138
+ };
139
+ Scheduler2.now = dateTimestampProvider.now;
140
+ return Scheduler2;
141
+ }();
142
+ var AsyncScheduler = function(_super) {
143
+ __extends(AsyncScheduler2, _super);
144
+ function AsyncScheduler2(SchedulerAction, now) {
145
+ if (now === void 0) {
146
+ now = Scheduler.now;
147
+ }
148
+ var _this = _super.call(this, SchedulerAction, now) || this;
149
+ _this.actions = [];
150
+ _this._active = false;
151
+ return _this;
152
+ }
153
+ AsyncScheduler2.prototype.flush = function(action) {
154
+ var actions = this.actions;
155
+ if (this._active) {
156
+ actions.push(action);
157
+ return;
158
+ }
159
+ var error;
160
+ this._active = true;
161
+ do {
162
+ if (error = action.execute(action.state, action.delay)) {
163
+ break;
164
+ }
165
+ } while (action = actions.shift());
166
+ this._active = false;
167
+ if (error) {
168
+ while (action = actions.shift()) {
169
+ action.unsubscribe();
170
+ }
171
+ throw error;
172
+ }
173
+ };
174
+ return AsyncScheduler2;
175
+ }(Scheduler);
176
+ var asyncScheduler = new AsyncScheduler(AsyncAction);
177
+ var async = asyncScheduler;
178
+ var EMPTY = new Observable(function(subscriber) {
179
+ return subscriber.complete();
180
+ });
181
+ function isScheduler(value) {
182
+ return value && isFunction(value.schedule);
183
+ }
184
+ function last(arr) {
185
+ return arr[arr.length - 1];
186
+ }
187
+ function popScheduler(args) {
188
+ return isScheduler(last(args)) ? args.pop() : void 0;
189
+ }
190
+ function executeSchedule(parentSubscription, scheduler, work, delay, repeat) {
191
+ if (delay === void 0) {
192
+ delay = 0;
193
+ }
194
+ if (repeat === void 0) {
195
+ repeat = false;
196
+ }
197
+ var scheduleSubscription = scheduler.schedule(function() {
198
+ work();
199
+ if (repeat) {
200
+ parentSubscription.add(this.schedule(null, delay));
201
+ } else {
202
+ this.unsubscribe();
203
+ }
204
+ }, delay);
205
+ parentSubscription.add(scheduleSubscription);
206
+ if (!repeat) {
207
+ return scheduleSubscription;
208
+ }
209
+ }
210
+ function observeOn(scheduler, delay) {
211
+ if (delay === void 0) {
212
+ delay = 0;
213
+ }
214
+ return operate(function(source, subscriber) {
215
+ source.subscribe(createOperatorSubscriber(subscriber, function(value) {
216
+ return executeSchedule(subscriber, scheduler, function() {
217
+ return subscriber.next(value);
218
+ }, delay);
219
+ }, function() {
220
+ return executeSchedule(subscriber, scheduler, function() {
221
+ return subscriber.complete();
222
+ }, delay);
223
+ }, function(err) {
224
+ return executeSchedule(subscriber, scheduler, function() {
225
+ return subscriber.error(err);
226
+ }, delay);
227
+ }));
228
+ });
229
+ }
230
+ function subscribeOn(scheduler, delay) {
231
+ if (delay === void 0) {
232
+ delay = 0;
233
+ }
234
+ return operate(function(source, subscriber) {
235
+ subscriber.add(scheduler.schedule(function() {
236
+ return source.subscribe(subscriber);
237
+ }, delay));
238
+ });
239
+ }
240
+ function scheduleObservable(input, scheduler) {
241
+ return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
242
+ }
243
+ function schedulePromise(input, scheduler) {
244
+ return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
245
+ }
246
+ function scheduleArray(input, scheduler) {
247
+ return new Observable(function(subscriber) {
248
+ var i = 0;
249
+ return scheduler.schedule(function() {
250
+ if (i === input.length) {
251
+ subscriber.complete();
252
+ } else {
253
+ subscriber.next(input[i++]);
254
+ if (!subscriber.closed) {
255
+ this.schedule();
256
+ }
257
+ }
258
+ });
259
+ });
260
+ }
261
+ function scheduleIterable(input, scheduler) {
262
+ return new Observable(function(subscriber) {
263
+ var iterator$1;
264
+ executeSchedule(subscriber, scheduler, function() {
265
+ iterator$1 = input[iterator]();
266
+ executeSchedule(subscriber, scheduler, function() {
267
+ var _a;
268
+ var value;
269
+ var done;
270
+ try {
271
+ _a = iterator$1.next(), value = _a.value, done = _a.done;
272
+ } catch (err) {
273
+ subscriber.error(err);
274
+ return;
275
+ }
276
+ if (done) {
277
+ subscriber.complete();
278
+ } else {
279
+ subscriber.next(value);
280
+ }
281
+ }, 0, true);
282
+ });
283
+ return function() {
284
+ return isFunction(iterator$1 === null || iterator$1 === void 0 ? void 0 : iterator$1.return) && iterator$1.return();
285
+ };
286
+ });
287
+ }
288
+ function scheduleAsyncIterable(input, scheduler) {
289
+ if (!input) {
290
+ throw new Error("Iterable cannot be null");
291
+ }
292
+ return new Observable(function(subscriber) {
293
+ executeSchedule(subscriber, scheduler, function() {
294
+ var iterator2 = input[Symbol.asyncIterator]();
295
+ executeSchedule(subscriber, scheduler, function() {
296
+ iterator2.next().then(function(result) {
297
+ if (result.done) {
298
+ subscriber.complete();
299
+ } else {
300
+ subscriber.next(result.value);
301
+ }
302
+ });
303
+ }, 0, true);
304
+ });
305
+ });
306
+ }
307
+ function scheduleReadableStreamLike(input, scheduler) {
308
+ return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);
309
+ }
310
+ function scheduled(input, scheduler) {
311
+ if (input != null) {
312
+ if (isInteropObservable(input)) {
313
+ return scheduleObservable(input, scheduler);
314
+ }
315
+ if (isArrayLike(input)) {
316
+ return scheduleArray(input, scheduler);
317
+ }
318
+ if (isPromise(input)) {
319
+ return schedulePromise(input, scheduler);
320
+ }
321
+ if (isAsyncIterable(input)) {
322
+ return scheduleAsyncIterable(input, scheduler);
323
+ }
324
+ if (isIterable(input)) {
325
+ return scheduleIterable(input, scheduler);
326
+ }
327
+ if (isReadableStreamLike(input)) {
328
+ return scheduleReadableStreamLike(input, scheduler);
329
+ }
330
+ }
331
+ throw createInvalidObservableTypeError(input);
332
+ }
333
+ function from(input, scheduler) {
334
+ return scheduler ? scheduled(input, scheduler) : innerFrom(input);
335
+ }
336
+ function of() {
337
+ var args = [];
338
+ for (var _i = 0; _i < arguments.length; _i++) {
339
+ args[_i] = arguments[_i];
340
+ }
341
+ var scheduler = popScheduler(args);
342
+ return from(args, scheduler);
343
+ }
344
+ function firstValueFrom(source, config) {
345
+ return new Promise(function(resolve, reject) {
346
+ var subscriber = new SafeSubscriber({
347
+ next: function(value) {
348
+ resolve(value);
349
+ subscriber.unsubscribe();
350
+ },
351
+ error: reject,
352
+ complete: function() {
353
+ {
354
+ reject(new EmptyError());
355
+ }
356
+ }
357
+ });
358
+ source.subscribe(subscriber);
359
+ });
360
+ }
361
+ function isValidDate(value) {
362
+ return value instanceof Date && !isNaN(value);
363
+ }
364
+ function timer(dueTime, intervalOrScheduler, scheduler) {
365
+ if (scheduler === void 0) {
366
+ scheduler = async;
367
+ }
368
+ var intervalDuration = -1;
369
+ {
370
+ if (isScheduler(intervalOrScheduler)) {
371
+ scheduler = intervalOrScheduler;
372
+ } else {
373
+ intervalDuration = intervalOrScheduler;
374
+ }
375
+ }
376
+ return new Observable(function(subscriber) {
377
+ var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;
378
+ if (due < 0) {
379
+ due = 0;
380
+ }
381
+ var n = 0;
382
+ return scheduler.schedule(function() {
383
+ if (!subscriber.closed) {
384
+ subscriber.next(n++);
385
+ if (0 <= intervalDuration) {
386
+ this.schedule(void 0, intervalDuration);
387
+ } else {
388
+ subscriber.complete();
389
+ }
390
+ }
391
+ }, due);
392
+ });
393
+ }
394
+ function interval(period, scheduler) {
395
+ if (scheduler === void 0) {
396
+ scheduler = asyncScheduler;
397
+ }
398
+ return timer(period, period, scheduler);
399
+ }
400
+ function take(count) {
401
+ return count <= 0 ? function() {
402
+ return EMPTY;
403
+ } : operate(function(source, subscriber) {
404
+ var seen = 0;
405
+ source.subscribe(createOperatorSubscriber(subscriber, function(value) {
406
+ if (++seen <= count) {
407
+ subscriber.next(value);
408
+ if (count <= seen) {
409
+ subscriber.complete();
410
+ }
411
+ }
412
+ }));
413
+ });
414
+ }
415
+ function timeInterval(scheduler) {
416
+ if (scheduler === void 0) {
417
+ scheduler = asyncScheduler;
418
+ }
419
+ return operate(function(source, subscriber) {
420
+ var last2 = scheduler.now();
421
+ source.subscribe(createOperatorSubscriber(subscriber, function(value) {
422
+ var now = scheduler.now();
423
+ var interval2 = now - last2;
424
+ last2 = now;
425
+ subscriber.next(new TimeInterval(value, interval2));
426
+ }));
427
+ });
428
+ }
429
+ var TimeInterval = /* @__PURE__ */ function() {
430
+ function TimeInterval2(value, interval2) {
431
+ this.value = value;
432
+ this.interval = interval2;
433
+ }
434
+ return TimeInterval2;
435
+ }();
436
+ var client = {};
437
+ var m = require$$0;
438
+ if (process.env.NODE_ENV === "production") {
439
+ client.createRoot = m.createRoot;
440
+ client.hydrateRoot = m.hydrateRoot;
441
+ } else {
442
+ var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
443
+ client.createRoot = function(c, o) {
444
+ i.usingClientEntryPoint = true;
445
+ try {
446
+ return m.createRoot(c, o);
447
+ } finally {
448
+ i.usingClientEntryPoint = false;
449
+ }
450
+ };
451
+ client.hydrateRoot = function(c, h, o) {
452
+ i.usingClientEntryPoint = true;
453
+ try {
454
+ return m.hydrateRoot(c, h, o);
455
+ } finally {
456
+ i.usingClientEntryPoint = false;
457
+ }
458
+ };
459
+ }
460
+ function getDisplayName(node, fallbackName = "Unknown") {
461
+ const type = node === null || node === void 0 ? void 0 : node.type;
462
+ if (!type) {
463
+ return fallbackName;
464
+ }
465
+ let displayName = null;
466
+ if (typeof type.displayName === "string") {
467
+ displayName = type.displayName;
468
+ }
469
+ if (!displayName) {
470
+ displayName = type.name || fallbackName;
471
+ }
472
+ const match = displayName.match(/^(.*) \[from (.*)\]$/);
473
+ if (match) {
474
+ const componentName = match[1];
475
+ const moduleName = match[2];
476
+ if (componentName && moduleName) {
477
+ if (moduleName === componentName || moduleName.startsWith(`${componentName}.`)) {
478
+ displayName = componentName;
479
+ }
480
+ }
481
+ }
482
+ return displayName;
483
+ }
484
+ const ROOT_SELECTOR = "[data-cy-root]";
485
+ const getContainerEl = () => {
486
+ const el = document.querySelector(ROOT_SELECTOR);
487
+ if (el) {
488
+ return el;
489
+ }
490
+ throw Error(`No element found that matches selector ${ROOT_SELECTOR}. Please add a root element with data-cy-root attribute to your "component-index.html" file so that Cypress can attach your component to the DOM.`);
491
+ };
492
+ function checkForRemovedStyleOptions(mountingOptions) {
493
+ for (const key of ["cssFile", "cssFiles", "style", "styles", "stylesheet", "stylesheets"]) {
494
+ if (mountingOptions[key]) {
495
+ Cypress.utils.throwErrByPath("mount.removed_style_mounting_options", key);
496
+ }
497
+ }
498
+ }
499
+ function setupHooks(optionalCallback) {
500
+ if (Cypress.testingType !== "component") {
501
+ return;
502
+ }
503
+ Cypress.Commands.overwrite("visit", () => {
504
+ throw new Error("cy.visit from a component spec is not allowed");
505
+ });
506
+ Cypress.Commands.overwrite("session", () => {
507
+ throw new Error("cy.session from a component spec is not allowed");
508
+ });
509
+ Cypress.Commands.overwrite("origin", () => {
510
+ throw new Error("cy.origin from a component spec is not allowed");
511
+ });
512
+ Cypress.on("test:before:after:run:async", () => {
513
+ optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback();
514
+ });
515
+ }
516
+ let mountCleanup;
517
+ const makeMountFn = (type, jsx2, options = {}, rerenderKey, internalMountOptions) => {
518
+ if (!internalMountOptions) {
519
+ throw Error("internalMountOptions must be provided with `render` and `reactDom` parameters");
520
+ }
521
+ if (options.alias) {
522
+ Cypress.utils.throwErrByPath("mount.alias", options.alias);
523
+ }
524
+ checkForRemovedStyleOptions(options);
525
+ mountCleanup = internalMountOptions.cleanup;
526
+ return cy.then(() => {
527
+ var _a, _b, _c;
528
+ const reactDomToUse = internalMountOptions.reactDom;
529
+ const el = getContainerEl();
530
+ if (!el) {
531
+ throw new Error([
532
+ `[@cypress/react] 🔥 Hmm, cannot find root element to mount the component. Searched for ${ROOT_SELECTOR}`
533
+ ].join(" "));
534
+ }
535
+ const key = rerenderKey !== null && rerenderKey !== void 0 ? rerenderKey : (
536
+ // @ts-ignore provide unique key to the the wrapped component to make sure we are rerendering between tests
537
+ (((_c = (_b = (_a = Cypress === null || Cypress === void 0 ? void 0 : Cypress.mocha) === null || _a === void 0 ? void 0 : _a.getRunner()) === null || _b === void 0 ? void 0 : _b.test) === null || _c === void 0 ? void 0 : _c.title) || "") + Math.random()
538
+ );
539
+ const props = {
540
+ key
541
+ };
542
+ const reactComponent = React.createElement(options.strict ? React.StrictMode : React.Fragment, props, jsx2);
543
+ const userComponent = reactComponent.props.children;
544
+ internalMountOptions.render(reactComponent, el, reactDomToUse);
545
+ return cy.wrap(userComponent, { log: false }).then(() => {
546
+ return cy.wrap({
547
+ component: userComponent,
548
+ rerender: (newComponent) => makeMountFn("rerender", newComponent, options, key, internalMountOptions),
549
+ unmount: () => {
550
+ Cypress.utils.throwErrByPath("mount.unmount");
551
+ }
552
+ }, { log: false });
553
+ }).wait(0, { log: false }).then(() => {
554
+ if (options.log !== false) {
555
+ const componentName = getDisplayName(jsx2);
556
+ const jsxComponentName = `<${componentName} ... />`;
557
+ Cypress.log({
558
+ name: type,
559
+ type: "parent",
560
+ message: [jsxComponentName],
561
+ // @ts-ignore
562
+ $el: el.children.item(0),
563
+ consoleProps: () => {
564
+ return {
565
+ // @ts-ignore protect the use of jsx functional components use ReactNode
566
+ props: jsx2 === null || jsx2 === void 0 ? void 0 : jsx2.props,
567
+ description: type === "mount" ? "Mounts React component" : "Rerenders mounted React component",
568
+ home: "https://github.com/cypress-io/cypress"
569
+ };
570
+ }
571
+ });
572
+ }
573
+ });
574
+ });
575
+ };
576
+ const makeUnmountFn = (options) => {
577
+ return cy.then(() => {
578
+ var _a;
579
+ const wasUnmounted = mountCleanup === null || mountCleanup === void 0 ? void 0 : mountCleanup();
580
+ if (wasUnmounted && options.log) {
581
+ Cypress.log({
582
+ name: "unmount",
583
+ type: "parent",
584
+ message: [(_a = options.boundComponentMessage) !== null && _a !== void 0 ? _a : "Unmounted component"],
585
+ consoleProps: () => {
586
+ return {
587
+ description: "Unmounts React component",
588
+ parent: getContainerEl().parentNode,
589
+ home: "https://github.com/cypress-io/cypress"
590
+ };
591
+ }
592
+ });
593
+ }
594
+ });
595
+ };
596
+ const preMountCleanup = () => {
597
+ mountCleanup === null || mountCleanup === void 0 ? void 0 : mountCleanup();
598
+ };
599
+ setupHooks(preMountCleanup);
600
+ const debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
601
+ };
602
+ var debug_1 = debug;
603
+ const SEMVER_SPEC_VERSION = "2.0.0";
604
+ const MAX_LENGTH$1 = 256;
605
+ const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
606
+ 9007199254740991;
607
+ const MAX_SAFE_COMPONENT_LENGTH = 16;
608
+ const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH$1 - 6;
609
+ const RELEASE_TYPES = [
610
+ "major",
611
+ "premajor",
612
+ "minor",
613
+ "preminor",
614
+ "patch",
615
+ "prepatch",
616
+ "prerelease"
617
+ ];
618
+ var constants = {
619
+ MAX_LENGTH: MAX_LENGTH$1,
620
+ MAX_SAFE_COMPONENT_LENGTH,
621
+ MAX_SAFE_BUILD_LENGTH,
622
+ MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,
623
+ RELEASE_TYPES,
624
+ SEMVER_SPEC_VERSION,
625
+ FLAG_INCLUDE_PRERELEASE: 1,
626
+ FLAG_LOOSE: 2
627
+ };
628
+ function createCommonjsModule(fn) {
629
+ var module = { exports: {} };
630
+ return fn(module, module.exports), module.exports;
631
+ }
632
+ createCommonjsModule(function(module, exports) {
633
+ const {
634
+ MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH2,
635
+ MAX_SAFE_BUILD_LENGTH: MAX_SAFE_BUILD_LENGTH2,
636
+ MAX_LENGTH
637
+ } = constants;
638
+ exports = module.exports = {};
639
+ const re = exports.re = [];
640
+ const safeRe = exports.safeRe = [];
641
+ const src = exports.src = [];
642
+ const t = exports.t = {};
643
+ let R = 0;
644
+ const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
645
+ const safeRegexReplacements = [
646
+ ["\\s", 1],
647
+ ["\\d", MAX_LENGTH],
648
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH2]
649
+ ];
650
+ const makeSafeRegex = (value) => {
651
+ for (const [token, max] of safeRegexReplacements) {
652
+ value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
653
+ }
654
+ return value;
655
+ };
656
+ const createToken = (name, value, isGlobal) => {
657
+ const safe = makeSafeRegex(value);
658
+ const index = R++;
659
+ debug_1(name, index, value);
660
+ t[name] = index;
661
+ src[index] = value;
662
+ re[index] = new RegExp(value, isGlobal ? "g" : void 0);
663
+ safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
664
+ };
665
+ createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
666
+ createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
667
+ createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
668
+ createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
669
+ createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
670
+ createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
671
+ createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
672
+ createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
673
+ createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
674
+ createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
675
+ createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
676
+ createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
677
+ createToken("FULL", `^${src[t.FULLPLAIN]}$`);
678
+ createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
679
+ createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
680
+ createToken("GTLT", "((?:<|>)?=?)");
681
+ createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
682
+ createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
683
+ createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
684
+ createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
685
+ createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
686
+ createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
687
+ createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH2}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH2}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH2}}))?`);
688
+ createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
689
+ createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
690
+ createToken("COERCERTL", src[t.COERCE], true);
691
+ createToken("COERCERTLFULL", src[t.COERCEFULL], true);
692
+ createToken("LONETILDE", "(?:~>?)");
693
+ createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
694
+ exports.tildeTrimReplace = "$1~";
695
+ createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
696
+ createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
697
+ createToken("LONECARET", "(?:\\^)");
698
+ createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
699
+ exports.caretTrimReplace = "$1^";
700
+ createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
701
+ createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
702
+ createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
703
+ createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
704
+ createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
705
+ exports.comparatorTrimReplace = "$1$2$3";
706
+ createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
707
+ createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
708
+ createToken("STAR", "(<|>)?=?\\s*\\*");
709
+ createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
710
+ createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
711
+ });
712
+ let root;
713
+ const cleanup = () => {
714
+ if (root) {
715
+ root.unmount();
716
+ root = null;
717
+ return true;
718
+ }
719
+ return false;
720
+ };
721
+ function mount$1(jsx2, options = {}, rerenderKey) {
722
+ cleanup();
723
+ const internalOptions = {
724
+ reactDom: client,
725
+ render: (reactComponent, el) => {
726
+ if (!root) {
727
+ root = client.createRoot(el);
728
+ }
729
+ return root.render(reactComponent);
730
+ },
731
+ unmount: internalUnmount,
732
+ cleanup
733
+ };
734
+ return makeMountFn("mount", jsx2, Object.assign({ ReactDom: client }, options), rerenderKey, internalOptions);
735
+ }
736
+ function internalUnmount(options = { log: true }) {
737
+ return makeUnmountFn(options);
738
+ }
739
+ var Action = /* @__PURE__ */ ((Action2) => {
740
+ Action2["Pop"] = "POP";
741
+ Action2["Push"] = "PUSH";
742
+ Action2["Replace"] = "REPLACE";
743
+ return Action2;
744
+ })(Action || {});
745
+ class RomaMockedServiceDiscovery {
746
+ constructor() {
747
+ this.environment = {
748
+ type: "",
749
+ clientId: "",
750
+ services: {}
751
+ };
752
+ this.configureClient = cy.stub().as("configureClient");
753
+ this.createClient = cy.stub().as("createClient.sd");
754
+ }
755
+ resolveService(key) {
756
+ return Promise.resolve({
757
+ name: "mocked_service_name",
758
+ key: "mocked_service_key",
759
+ url: "mocked_service_url",
760
+ uri: "mocked_service_url",
761
+ version: "mocked_service_version",
762
+ environment: "mocked_service_environment",
763
+ defaultScopes: []
764
+ });
765
+ }
766
+ async resolveServices() {
767
+ return this.environment;
768
+ }
769
+ }
770
+ const _logger = {
771
+ get: (obj, property) => cy.log
772
+ };
773
+ const logger = new Proxy({}, _logger);
774
+ class RomaMockedAuthModule {
775
+ constructor() {
776
+ this.defaultAccount = {
777
+ homeAccountId: "mocked_home_account_id",
778
+ environment: "mocked_environment",
779
+ tenantId: "mocked_tenant_id",
780
+ username: "mocked_username",
781
+ localAccountId: "mocked_local_account_id",
782
+ name: "Mocked User"
783
+ };
784
+ this.defaultClient = {
785
+ acquireToken: (req) => Promise.resolve({
786
+ authority: "https://login.microsoftonline.com/mock",
787
+ uniqueId: "mocked_unique_id",
788
+ tenantId: "mocked_tenant_id",
789
+ scopes: req.scopes || [],
790
+ account: this.defaultAccount,
791
+ idToken: "mocked_id_token",
792
+ idTokenClaims: {},
793
+ accessToken: "mocked_access_token",
794
+ fromCache: false,
795
+ expiresOn: new Date(Date.now() + 3600 * 1e3),
796
+ // 1 hour from now
797
+ tokenType: "Bearer",
798
+ correlationId: "mocked_correlation_id"
799
+ }),
800
+ handleRedirectPromise: () => Promise.resolve(null),
801
+ login: () => Promise.resolve(),
802
+ account: {
803
+ homeAccountId: "mocked_home_account_id",
804
+ environment: "mocked_environment",
805
+ tenantId: "mocked_tenant_id",
806
+ username: "mocked_username",
807
+ localAccountId: "mocked_local_account_id",
808
+ name: "Mocked User"
809
+ },
810
+ setLogger: cy.stub().as("setLogger"),
811
+ getLogger: () => logger,
812
+ requestOrigin: ""
813
+ };
814
+ this.defaultConfig = {
815
+ tenantId: "mocked_tenant_id",
816
+ clientId: "mocked_client_id",
817
+ redirectUri: "https://mocked.redirect.uri",
818
+ config: {}
819
+ };
820
+ }
821
+ acquireAccessToken(req) {
822
+ return Promise.resolve(
823
+ "part1." + window.btoa('{"roles": ["role1", "role2"]}') + ".part3"
824
+ );
825
+ }
826
+ acquireToken(req) {
827
+ return Promise.resolve({
828
+ authority: "https://login.microsoftonline.com/mock",
829
+ uniqueId: "mocked_unique_id",
830
+ tenantId: "mocked_tenant_id",
831
+ scopes: req.scopes || [],
832
+ account: this.defaultAccount || null,
833
+ idToken: "mocked_id_token",
834
+ idTokenClaims: {},
835
+ accessToken: "mocked_access_token",
836
+ fromCache: false,
837
+ expiresOn: new Date(Date.now() + 3600 * 1e3),
838
+ // 1 hour from now
839
+ tokenType: "Bearer",
840
+ correlationId: "mocked_correlation_id"
841
+ });
842
+ }
843
+ createClient(name) {
844
+ return this.defaultClient;
845
+ }
846
+ getClient(name) {
847
+ return this.createClient(name);
848
+ }
849
+ handleRedirect() {
850
+ return Promise.resolve(null);
851
+ }
852
+ login() {
853
+ return Promise.resolve(void 0);
854
+ }
855
+ }
856
+ class Navigator {
857
+ constructor() {
858
+ this.basename = "";
859
+ this.origin = "";
860
+ this.value = {
861
+ action: Action.Push,
862
+ location: null,
863
+ delta: null
864
+ };
865
+ this.location = null;
866
+ this.action = Action$2.Push;
867
+ this.createHref = cy.stub().as("createHref");
868
+ this.createURL = cy.stub().as("createURL");
869
+ this.encodeLocation = cy.stub().as("encodeLocation");
870
+ this.push = cy.stub().as("push");
871
+ this.replace = cy.stub().as("replace");
872
+ this.go = cy.stub().as("go");
873
+ this.listen = cy.stub().as("listen");
874
+ }
875
+ }
876
+ class RomaMockedNavigationModule {
877
+ constructor() {
878
+ this.dispose = cy.stub();
879
+ this.navigator = new Navigator();
880
+ this.path = { pathname: "string", search: "string", hash: "string" };
881
+ this.state$ = of({
882
+ action: Action.Push,
883
+ location: this.path
884
+ });
885
+ this.createHref = cy.stub().as("createHref.module");
886
+ this.createRouter = cy.stub().as("createRouter");
887
+ this.createURL = cy.stub().as("createURL.module");
888
+ this.push = cy.stub().as("push.module");
889
+ this.replace = cy.stub().as("replace.module");
890
+ }
891
+ }
892
+ class RomaMockedHttpClient {
893
+ hasClient() {
894
+ return true;
895
+ }
896
+ createClient() {
897
+ return {
898
+ fetch: (url, options) => {
899
+ return fetch(url.startsWith("/") ? url : `/${url}`, options);
900
+ },
901
+ fetch$(path, init) {
902
+ return from(this.fetch(path, init));
903
+ },
904
+ fetchAsync(path, args) {
905
+ return this.fetch(path, args);
906
+ },
907
+ async blob(path, args) {
908
+ const r = await fetch(path, args);
909
+ return await r.blob();
910
+ },
911
+ blob$(path, args) {
912
+ return from(this.blob(path, args));
913
+ },
914
+ async json(path, init) {
915
+ const r = await this.fetch(path, init);
916
+ return await r.json();
917
+ },
918
+ json$(path, init) {
919
+ return from(this.json(path, init));
920
+ },
921
+ jsonAsync(path, args) {
922
+ return this.json(path, args);
923
+ },
924
+ uri: ""
925
+ };
926
+ }
927
+ createCustomClient() {
928
+ return this.createClient();
929
+ }
930
+ }
931
+ const mockMessages = [
932
+ {
933
+ id: "fe96f880-220d-4b4e-b30d-eabc9b9d2101",
934
+ subject: "Price.Curve.Built",
935
+ created: "2023-11-10T13:45:01.8148405Z",
936
+ correlationId: "0613b3b1-d74a-4818-8b34-dc63157fb6bd",
937
+ sourceApplication: "Morningstar",
938
+ payloadScheme: "https://schemas.mss.equinor.com/morningstar/v1/curvebuilt",
939
+ message: "Delivery 12345/6 updated",
940
+ payload: {
941
+ curve: "CRUDE_MARS-ARGUS-VS-WTI-AYV_ARGUS-CME_BBL_USD",
942
+ deliveryDates: 62,
943
+ pubDate: "2023-11-10",
944
+ feed: "Equinor_CrudeCurves"
945
+ },
946
+ environment: "prod",
947
+ version: "1.0"
948
+ },
949
+ {
950
+ id: "a1b2c3d4-5678-90ab-cdef-1234567890ab",
951
+ subject: "Trade.Confirmed",
952
+ created: "2023-11-11T09:30:00.000Z",
953
+ correlationId: "1234abcd-5678-efgh-ijkl-1234567890mn",
954
+ sourceApplication: "TradeApp",
955
+ payloadScheme: "https://schemas.mss.equinor.com/trade/v1/confirmed",
956
+ message: "Trade 98765 confirmed",
957
+ payload: {
958
+ tradeId: "98765",
959
+ product: "Brent Crude",
960
+ quantity: 1e3,
961
+ price: 75.5,
962
+ tradeDate: "2023-11-11"
963
+ },
964
+ environment: "prod",
965
+ version: "1.0"
966
+ },
967
+ {
968
+ id: "b2c3d4e5-6789-01ab-cdef-2345678901bc",
969
+ subject: "Cargo.Arrived",
970
+ created: "2023-11-12T14:15:00.000Z",
971
+ correlationId: "2345bcde-6789-fghi-jklm-2345678901op",
972
+ sourceApplication: "CargoApp",
973
+ payloadScheme: "https://schemas.mss.equinor.com/cargo/v1/arrived",
974
+ message: "Cargo 54321 arrived at destination",
975
+ payload: {
976
+ cargoId: "54321",
977
+ destination: "Rotterdam",
978
+ arrivalDate: "2023-11-12"
979
+ },
980
+ environment: "prod",
981
+ version: "1.0"
982
+ },
983
+ {
984
+ id: "c3d4e5f6-7890-12ab-cdef-3456789012cd",
985
+ subject: "Inspection.Completed",
986
+ created: "2023-11-13T11:00:00.000Z",
987
+ correlationId: "3456cdef-7890-ghij-klmn-3456789012qr",
988
+ sourceApplication: "InspectionApp",
989
+ payloadScheme: "https://schemas.mss.equinor.com/inspection/v1/completed",
990
+ message: "Inspection 67890 completed",
991
+ payload: {
992
+ inspectionId: "67890",
993
+ result: "Passed",
994
+ inspector: "John Doe",
995
+ inspectionDate: "2023-11-13"
996
+ },
997
+ environment: "prod",
998
+ version: "1.0"
999
+ },
1000
+ {
1001
+ id: "d4e5f6g7-8901-23ab-cdef-4567890123de",
1002
+ subject: "Maintenance.Scheduled",
1003
+ created: "2023-11-14T08:45:00.000Z",
1004
+ correlationId: "4567defg-8901-hijk-lmno-4567890123st",
1005
+ sourceApplication: "MaintenanceApp",
1006
+ payloadScheme: "https://schemas.mss.equinor.com/maintenance/v1/scheduled",
1007
+ message: "Maintenance for equipment 12345 scheduled",
1008
+ payload: {
1009
+ equipmentId: "12345",
1010
+ maintenanceDate: "2023-11-20",
1011
+ technician: "Jane Smith"
1012
+ },
1013
+ environment: "prod",
1014
+ version: "1.0"
1015
+ }
1016
+ ];
1017
+ class Connection {
1018
+ constructor() {
1019
+ this.messageList = new BehaviorSubject([
1020
+ {
1021
+ id: "fe96f880-220d-4b4e-b30d-eabc9b9d2101",
1022
+ subject: "Price. Curve. Built",
1023
+ created: "2023-11-10T13:45:01.8148405Z",
1024
+ correlationId: "0613b3b1-d74a-4818-8b34-dc63157fb6bd",
1025
+ sourceApplication: "Morningstar",
1026
+ payloadScheme: "https:// schemas. mss. equinor. com/ morningstar/ v1/ curvebuilt",
1027
+ message: "Delivery 12345/ 6 updated",
1028
+ payload: {
1029
+ curve: "CRUDE_MARS-ARGUS-VS-WTI-AYV_ARGUS-CME_BBL_USD",
1030
+ deliveryDates: 62,
1031
+ pubDate: "2023-11-10",
1032
+ feed: "Equinor_CrudeCurves"
1033
+ },
1034
+ environment: "prod",
1035
+ version: "1.0"
1036
+ }
1037
+ ]);
1038
+ this.interval$ = interval(50);
1039
+ this.messageList$ = this.interval$.pipe(
1040
+ timeInterval(),
1041
+ take(mockMessages.length),
1042
+ map((v) => mockMessages.slice(0, v.value + 1))
1043
+ );
1044
+ }
1045
+ async setAllRead() {
1046
+ const currentValues = await firstValueFrom(this.messageList);
1047
+ const newValues = [...currentValues].map((v) => ({ ...v, read: true }));
1048
+ this.messageList.next(newValues);
1049
+ }
1050
+ async setReadState(eventId, read) {
1051
+ const currentValues = await firstValueFrom(this.messageList);
1052
+ const newValues = [...currentValues];
1053
+ const currentEventIndex = newValues.findIndex((e) => e.id === eventId);
1054
+ if (currentEventIndex >= 0) {
1055
+ newValues[currentEventIndex] = {
1056
+ ...newValues[currentEventIndex],
1057
+ read
1058
+ };
1059
+ } else {
1060
+ newValues.push({
1061
+ ...newValues[currentEventIndex],
1062
+ read
1063
+ });
1064
+ }
1065
+ this.messageList.next(newValues);
1066
+ }
1067
+ }
1068
+ class RomaMockedSseModule {
1069
+ connect(name) {
1070
+ return new Connection();
1071
+ }
1072
+ createConnection(name, options) {
1073
+ }
1074
+ }
1075
+ const RomaCypressWrapper = ({ children }) => {
1076
+ const navigation = new RomaMockedNavigationModule();
1077
+ const http = new RomaMockedHttpClient();
1078
+ const auth = new RomaMockedAuthModule();
1079
+ const serviceDiscovery = new RomaMockedServiceDiscovery();
1080
+ const sse = new RomaMockedSseModule();
1081
+ return /* @__PURE__ */ jsx(
1082
+ FrameworkProvider,
1083
+ {
1084
+ value: {
1085
+ modules: {
1086
+ dispose: () => {
1087
+ },
1088
+ navigation,
1089
+ sse,
1090
+ http,
1091
+ auth,
1092
+ serviceDiscovery
1093
+ }
1094
+ },
1095
+ children: /* @__PURE__ */ jsx(
1096
+ ModuleProvider,
1097
+ {
1098
+ value: {
1099
+ navigation,
1100
+ http,
1101
+ auth
1102
+ },
1103
+ children: /* @__PURE__ */ jsx(
1104
+ QueryClientProvider,
1105
+ {
1106
+ client: new QueryClient({
1107
+ defaultOptions: {
1108
+ queries: {
1109
+ staleTime: Infinity,
1110
+ refetchInterval: false,
1111
+ refetchIntervalInBackground: false,
1112
+ refetchOnMount: false,
1113
+ refetchOnReconnect: false,
1114
+ refetchOnWindowFocus: false,
1115
+ retry: false
1116
+ }
1117
+ }
1118
+ }),
1119
+ children: /* @__PURE__ */ jsx(IntlProvider, { locale: "en-US", children })
1120
+ }
1121
+ )
1122
+ }
1123
+ )
1124
+ }
1125
+ );
1126
+ };
1127
+ const mount = (component, options = {}) => {
1128
+ return mount$1(/* @__PURE__ */ jsx(RomaCypressWrapper, { children: component }), options);
1129
+ };
1130
+ export {
1131
+ mount
1132
+ };