feat(OHIFv3):Add static e2e data (#2665)
This change wraps the E2E test data into a github repository, which is then included in the test builds as static data. That makes running the e2e tests as simple as: yarn test:e2e:server yarn test:e2e without any need to have docker etc installed/running.
This commit is contained in:
1 parent
72bb074f21
commit
0e2c31939c
14 files changed
+888
-108
No files matched your search
@@ -15,6 +15,7 @@ export default class StaticWadoClient extends api.DICOMwebClient {
|
||||
"StudyDescription": "00081030",
|
||||
"StudyDate": "00080020",
|
||||
"ModalitiesInStudy": "00080061",
|
||||
AccessionNumber: "00080050",
|
||||
};
|
||||
|
||||
constructor(qidoConfig) {
|
||||
@@ -66,7 +67,16 @@ export default class StaticWadoClient extends api.DICOMwebClient {
|
||||
actual = actual.Alphabetic;
|
||||
}
|
||||
if (typeof (actual) == 'string') {
|
||||
return actual.indexOf(desired) != -1;
|
||||
if (actual.length === 0) return true;
|
||||
if (desired.length === 0 || desired === '*') return true;
|
||||
if (desired[0] === '*' && desired[desired.length - 1] === '*') {
|
||||
console.log(`Comparing ${actual} to ${desired.substring(1, desired.length - 1)}`)
|
||||
return actual.indexOf(desired.substring(1, desired.length - 1)) != -1;
|
||||
} else if (desired[desired.length - 1] === '*') {
|
||||
return actual.indexOf(desired.substring(0, desired.length - 1)) != -1;
|
||||
} else if (desired[0] === '*') {
|
||||
return actual.indexOf(desired.substring(1)) === actual.length - desired.length + 1;
|
||||
}
|
||||
}
|
||||
return desired === actual;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user