Skip to content

Commit 18b5c35

Browse files
committed
fix(volview.page): attempt to fix flaky state-manifest.e2e.ts test
1 parent e68b07c commit 18b5c35

7 files changed

Lines changed: 86 additions & 59 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: E2E Testing on ${{ matrix.os }}
1111
runs-on: ${{ matrix.os }}
1212
env:
13-
DOWNLOAD_TIMEOUT: 160000
13+
DOWNLOAD_TIMEOUT: 220000
1414
steps:
1515
- uses: actions/checkout@v4
1616
with:

src/io/import/processors/restoreStateFile.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,18 @@ const migrate210To300 = (inputManifest: any) => {
148148

149149
const migrate501To600 = (inputManifest: any) => {
150150
const manifest = JSON.parse(JSON.stringify(inputManifest));
151-
151+
152152
// Convert views array to viewByID object
153153
if (manifest.views && Array.isArray(manifest.views)) {
154154
manifest.viewByID = {};
155155
manifest.views.forEach((view: any) => {
156156
const migratedView = { ...view };
157-
157+
158158
// Add required 'name' field if missing
159159
if (!migratedView.name) {
160160
migratedView.name = migratedView.id;
161161
}
162-
162+
163163
// Convert 'props' to 'options' if present
164164
if (migratedView.props) {
165165
// Convert any non-string values in props to strings for options
@@ -174,7 +174,7 @@ const migrate501To600 = (inputManifest: any) => {
174174
});
175175
delete migratedView.props;
176176
}
177-
177+
178178
// Add orientation for 2D views based on the view ID
179179
if (migratedView.type === '2D' && !migratedView.options) {
180180
migratedView.options = {};
@@ -185,12 +185,12 @@ const migrate501To600 = (inputManifest: any) => {
185185
migratedView.options.orientation = migratedView.id;
186186
}
187187
}
188-
188+
189189
// Handle type conversion for Oblique views
190190
if (migratedView.type === 'Oblique3D') {
191191
migratedView.type = 'Oblique';
192192
}
193-
193+
194194
// Set dataID based on whether the view has config with data
195195
// In 5.0.1, if a view has config entries, it means it's associated with that data
196196
if (migratedView.config && Object.keys(migratedView.config).length > 0) {
@@ -199,25 +199,25 @@ const migrate501To600 = (inputManifest: any) => {
199199
} else {
200200
migratedView.dataID = null;
201201
}
202-
202+
203203
manifest.viewByID[migratedView.id] = migratedView;
204204
});
205205
delete manifest.views;
206206
}
207-
207+
208208
// Add missing fields with proper defaults
209209
if (manifest.isActiveViewMaximized === undefined) {
210210
manifest.isActiveViewMaximized = false;
211211
}
212-
212+
213213
if (manifest.activeView === undefined) {
214214
manifest.activeView = null;
215215
}
216-
216+
217217
// Convert layout to layoutSlots and update layout structure
218218
if (manifest.layout && !manifest.layoutSlots) {
219219
const slots: string[] = [];
220-
220+
221221
// Extract all slot names and convert layout to new format
222222
const convertLayoutItem = (item: any): any => {
223223
if (typeof item === 'string') {
@@ -226,36 +226,36 @@ const migrate501To600 = (inputManifest: any) => {
226226
slots.push(item);
227227
return {
228228
type: 'slot',
229-
slotIndex
229+
slotIndex,
230230
};
231231
}
232232
if (item.direction && item.items) {
233233
// This is a nested layout
234234
return {
235235
type: 'layout',
236236
direction: item.direction,
237-
items: item.items.map(convertLayoutItem)
237+
items: item.items.map(convertLayoutItem),
238238
};
239239
}
240240
return item;
241241
};
242-
242+
243243
// Convert the root layout
244244
if (manifest.layout.direction && manifest.layout.items) {
245245
manifest.layout = {
246246
direction: manifest.layout.direction,
247-
items: manifest.layout.items.map(convertLayoutItem)
247+
items: manifest.layout.items.map(convertLayoutItem),
248248
};
249249
}
250-
250+
251251
manifest.layoutSlots = slots;
252252
}
253-
253+
254254
// Ensure parentToLayers exists as an array
255255
if (!manifest.parentToLayers) {
256256
manifest.parentToLayers = [];
257257
}
258-
258+
259259
manifest.version = '6.0.0';
260260
return manifest;
261261
};

src/vtk/webvr-empty.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default function () {}
1+
export default function webvrEmpty() {}

0 commit comments

Comments
 (0)