Skip to content

Commit

Permalink
Merge branch 'bugfix/SHIBUI-2251' into bugfix/SHIBUI-2250
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Smith committed Nov 3, 2021
2 parents 1376d58 + cc2fdc3 commit c54a6f1
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,25 +101,25 @@ class SeleniumSIDETest extends Specification {

where:
name | file
// 'SHIBUI-1364: Compare FBHTTPMP with filters' | '/SHIBUI-1364-1.side' // bug here for ryan
'SHIBUI-1364: Compare FBHTTPMP with filters' | '/SHIBUI-1364-1.side'
'SHIBUI-1364: Compare FSMP' | '/SHIBUI-1364-2.side'
'SHIBUI-1364: Compare LDMP' | '/SHIBUI-1364-3.side'
// 'SHIBUI-1364: Compare DHTTPMP with filters' | '/SHIBUI-1364-4.side' // bug here for ryan
'SHIBUI-1364: Compare DHTTPMP with filters' | '/SHIBUI-1364-4.side'
'SHIBUI-1281: Metadata Source Dashboard' | '/SHIBUI-1281.side'
'SHIBUI-1311: Metadata Provider Dashboard' | '/SHIBUI-1311.side'
'SHIBUI-950: Metadata Source from XML w/ digest' | '/SHIBUI-950.side'
'SHIBUI-1352: Create LocalDynamic provider' | '/SHIBUI-1352-1.side'
'SHIBUI-1352: Create FileSystem provider' | '/SHIBUI-1352-2.side'
'SHIBUI-1333: Verify metadata source configuration' | '/SHIBUI-1333.side'
'SHIBUI-1334: Verify metadata source versioning' | '/SHIBUI-1334-1.side'
// 'SHIBUI-1334: Verify metadata provider versioning' | '/SHIBUI-1334-2.side' // there's a bug here for ryan
'SHIBUI-1334: Verify metadata provider versioning' | '/SHIBUI-1334-2.side'
'SHIBUI-1335: Verify File Backed HTTP Metadata Provider Filters' | '/SHIBUI-1335-1.side'
'SHIBUI-1335: Verify Filesystem Metadata Provider Filters' | '/SHIBUI-1335-2.side' // adding filters to this resolver type was removed in the react update
'SHIBUI-1335: Verify Local Dynamic Metadata Provider Filters' | '/SHIBUI-1335-3.side' // adding filters to this resolver type was removed in the react update
'SHIBUI-1335: Verify Filesystem Metadata Provider' | '/SHIBUI-1335-2.side'
'SHIBUI-1335: Verify Local Dynamic Metadata Provider' | '/SHIBUI-1335-3.side'
'SHIBUI-1335: Verify Dynamic HTTP Metadata Provider Filters' | '/SHIBUI-1335-4.side'
// 'SHIBUI-1361: Verify dates display in proper format' | '/SHIBUI-1361.side' // Note that this script WILL NOT PASS in the Selenium IDE. There is a bug in the IDE where it thinks there is a missing ')'. there's a bug here for Ryan
'SHIBUI-1361: Verify dates display in proper format' | '/SHIBUI-1361.side'
'SHIBUI-1385: Restore a metadata source version' | '/SHIBUI-1385-1.side'
// 'SHIBUI-1385: Restore a metadata provider version' | '/SHIBUI-1385-2.side' // there's a bug here for ryan
'SHIBUI-1385: Restore a metadata provider version' | '/SHIBUI-1385-2.side'
'SHIBUI-1391: Regex Validation' | '/SHIBUI-1391.side'
'SHIBUI-1407: Metadata source comparison highlights' | '/SHIBUI-1407-1.side'
'SHIBUI-1407: Metadata provider comparison highlights' | '/SHIBUI-1407-2.side'
Expand All @@ -141,7 +141,7 @@ class SeleniumSIDETest extends Specification {
'SHIBUI-2116: Verify entity attribute bundle highlights' | '/SHIBUI-2116.side' // Note that this script WILL NOT PASS in the Selenium IDE due to ${driver} not being set (it is provided by this groovy script).
'SHIBUI-1732: Create, use, and delete CEA String' | '/SHIBUI-1732-1.side'
'SHIBUI-1732: Create, use, and delete CEA Boolean' | '/SHIBUI-1732-2.side'
// 'SHIBUI-1732: Create, use, and delete CEA List' | '/SHIBUI-1732-3.side' // bug here for ryan
'SHIBUI-1732: Create, use, and delete CEA List' | '/SHIBUI-1732-3.side'
'SHIBUI-1732: Create, use, and delete CEA Long' | '/SHIBUI-1732-4.side'
'SHIBUI-1732: Create, use, and delete CEA Double' | '/SHIBUI-1732-5.side'
'SHIBUI-1732: Create, use, and delete CEA Duration' | '/SHIBUI-1732-6.side'
Expand Down
4 changes: 2 additions & 2 deletions backend/src/integration/resources/SHIBUI-1361.side
Original file line number Diff line number Diff line change
Expand Up @@ -1341,9 +1341,9 @@
"id": "0687fe3f-c1af-4a5a-9708-09b7b92734bc",
"comment": "",
"command": "assertText",
"target": "css=div:nth-child(4) > .bg-diff > .d-block:nth-child(2)",
"target": "css=div:nth-child(1) > div:nth-child(4) > .d-flex > .d-block:nth-child(2)",
"targets": [
["css=div:nth-child(4) > .bg-diff > .d-block:nth-child(2)", "css:finder"],
["css=div:nth-child(1) > div:nth-child(4) > .d-flex > .d-block:nth-child(2)", "css:finder"],
["xpath=//div[@id='root']/div/main/div/section/div/div/section[4]/div/div[2]/div[2]/div/div[4]/div/span[2]", "xpath:idRelative"],
["xpath=//div[2]/div[2]/div/div[4]/div/span[2]", "xpath:position"],
["xpath=//span[contains(.,'PT1M')]", "xpath:innerText"]
Expand Down
10 changes: 5 additions & 5 deletions backend/src/integration/resources/SHIBUI-1364-1.side
Original file line number Diff line number Diff line change
Expand Up @@ -2034,11 +2034,11 @@
"id": "63e1b12d-a50a-4877-9588-21209a08b364",
"comment": "",
"command": "assertText",
"target": "css=div:nth-child(7) .d-block:nth-child(2)",
"target": "css=section > div > div > section:nth-child(2) > div > div.p-2 > div:nth-child(2) > div:nth-child(8) > div > span:nth-child(2)",
"targets": [
["css=div:nth-child(7) .d-block:nth-child(2)", "css:finder"],
["xpath=//div[@id='root']/div/main/div/section/div/div/section/div/div[2]/div[2]/div[7]/div/span[2]", "xpath:idRelative"],
["xpath=//div[7]/div/span[2]", "xpath:position"],
["css=div:nth-child(8) > .bg-diff > .d-block:nth-child(2)", "css:finder"],
["xpath=//div[@id='root']/div/main/div/section/div/div/section/div/div[2]/div[2]/div[8]/div/span[2]", "xpath:idRelative"],
["xpath=//div[8]/div/span[2]", "xpath:position"],
["xpath=//span[contains(.,'PT1M')]", "xpath:innerText"]
],
"value": "PT1M"
Expand Down Expand Up @@ -2078,7 +2078,7 @@
"id": "75f45cb6-9c38-44e7-82dc-a473fa7fab62",
"comment": "",
"command": "assertText",
"target": "css=div:nth-child(2) > .d-flex > .d-block:nth-child(2)",
"target": "css=section > div > div > section:nth-child(2) > div > div.p-2 > div:nth-child(2) > div:nth-child(2) > div > span:nth-child(2)",
"targets": [
["css=div:nth-child(2) > .d-flex > .d-block:nth-child(2)", "css:finder"],
["xpath=//div[@id='root']/div/main/div/section/div/div/section/div/div[2]/div[2]/div[2]/div/span[2]", "xpath:idRelative"],
Expand Down
26 changes: 13 additions & 13 deletions backend/src/integration/resources/SHIBUI-1385-2.side
Original file line number Diff line number Diff line change
Expand Up @@ -1351,11 +1351,11 @@
"id": "30aae338-393c-4312-8ccc-f3fd8acb3aad",
"comment": "",
"command": "assertText",
"target": "css=div:nth-child(2) > div:nth-child(3) .text-truncate",
"target": "css=div:nth-child(2) > div:nth-child(4) .text-truncate",
"targets": [
["css=div:nth-child(2) > div:nth-child(3) .text-truncate", "css:finder"],
["xpath=//div[@id='root']/div/main/div/section/div/div/section/div/div[2]/div[2]/div[3]/div/span[2]", "xpath:idRelative"],
["xpath=//div[3]/div/span[2]", "xpath:position"],
["css=div:nth-child(2) > div:nth-child(4) .text-truncate", "css:finder"],
["xpath=//div[@id='root']/div/main/div/section/div/div/section/div/div[2]/div[2]/div[4]/div/span[2]", "xpath:idRelative"],
["xpath=//div[4]/div/span[2]", "xpath:position"],
["xpath=//span[contains(.,'123 version 2')]", "xpath:innerText"]
],
"value": "123 version 2"
Expand Down Expand Up @@ -1416,7 +1416,7 @@
"id": "20bfdc06-e12b-4287-ad14-3ca578d84de1",
"comment": "",
"command": "waitForElementVisible",
"target": "css=div:nth-child(2) > div:nth-child(3) .d-block:nth-child(2)",
"target": "css=div:nth-child(2) > div:nth-child(4) .d-block:nth-child(2)",
"targets": [
["css=div:nth-child(2) > div:nth-child(3) .d-block:nth-child(2)", "css:finder"],
["xpath=//div[@id='root']/div/main/div/section/div/div/section/div/div[2]/div[2]/div[3]/div/span[2]", "xpath:idRelative"],
Expand All @@ -1428,11 +1428,11 @@
"id": "a6c78ab6-5584-490f-9bfd-b1eda70b864b",
"comment": "",
"command": "assertText",
"target": "css=div:nth-child(2) > div:nth-child(3) .d-block:nth-child(2)",
"target": "css=div:nth-child(2) > div:nth-child(4) .d-block:nth-child(2)",
"targets": [
["css=div:nth-child(2) > div:nth-child(3) .d-block:nth-child(2)", "css:finder"],
["xpath=//div[@id='root']/div/main/div/section/div/div/section/div/div[2]/div[2]/div[3]/div/span[2]", "xpath:idRelative"],
["xpath=//div[3]/div/span[2]", "xpath:position"],
["css=div:nth-child(2) > div:nth-child(4) .d-block:nth-child(2)", "css:finder"],
["xpath=//div[@id='root']/div/main/div/section/div/div/section/div/div[2]/div[2]/div[4]/div/span[2]", "xpath:idRelative"],
["xpath=//div[4]/div/span[2]", "xpath:position"],
["xpath=//span[contains(.,'123 version 2')]", "xpath:innerText"]
],
"value": "123 version 2"
Expand All @@ -1451,11 +1451,11 @@
"id": "17832263-6fd7-4df8-86ba-f3e2fdc5d8ce",
"comment": "",
"command": "assertText",
"target": "css=div:nth-child(2) > div:nth-child(3) .d-block:nth-child(3)",
"target": "css=div:nth-child(2) > div:nth-child(4) .d-block:nth-child(3)",
"targets": [
["css=div:nth-child(2) > div:nth-child(3) .d-block:nth-child(3)", "css:finder"],
["xpath=//div[@id='root']/div/main/div/section/div/div/section/div/div[2]/div[2]/div[3]/div/span[3]", "xpath:idRelative"],
["xpath=//div[3]/div/span[3]", "xpath:position"]
["css=div:nth-child(2) > div:nth-child(4) .d-block:nth-child(3)", "css:finder"],
["xpath=//div[@id='root']/div/main/div/section/div/div/section/div/div[2]/div[2]/div[4]/div/span[3]", "xpath:idRelative"],
["xpath=//div[4]/div/span[3]", "xpath:position"]
],
"value": "123 version 2"
}, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const BaseProviderDefinition = {
...changes,
metadataFilters: [
...changes.metadataFilters.filter((filter, filterName) => {

if (filter['@type'] === 'RequiredValidUntil') {
if (!filter.maxValidityInterval || filter.maxValidityInterval === "") {
return false;
Expand Down
13 changes: 8 additions & 5 deletions ui/src/app/metadata/editor/MetadataEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ export function MetadataEditor ({ restore, current, reload }) {
gotoDetail({ refresh: true });
})
.catch((err) => {
notificationDispatch(createNotificationAction(`Updated data with latest changes`, NotificationTypes.INFO))
notificationDispatch(
createNotificationAction(`${err.errorCode > 1 ? `${err.errorCode} - ` : ''} ${translator(err.errorMessage)}`, err.errorCode === 1 ? NotificationTypes.INFO : NotificationTypes.ERROR)
);
if (err.errorCode === 1) {
setTimeout(() => {
window.location.reload();
}, 500);
}
});
};

Expand Down Expand Up @@ -83,10 +90,6 @@ export function MetadataEditor ({ restore, current, reload }) {

const canFilter = restore ? false : FilterableProviders.indexOf(definition.type) > -1;

React.useEffect(() => {
dispatch(setFormDataAction(current));
}, [current, dispatch])

return (
<div className="container-fluid p-3">
<Prompt
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/metadata/hooks/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export function useMetadataUpdater (path, current, cancel) {
resolve(await update(p, resolution));
}, (err) => {
cancel && cancel();
reject(err);
reject({ errorCode: 1, errorMessage: 'Updated data with latest changes - Reloading' });
}));
});
}
Expand Down

0 comments on commit c54a6f1

Please sign in to comment.