Aktualisiere Version auf 1.1.2, füge Unterstützung für die Auflösung interner WSS-IDs über die TaxonomyHiddenList hinzu und verbessere die Handhabung von Kategoriewerten im Accordion-WebPart
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import { getAccordionCategoryValues } from '../src/webparts/accordion/AccordionCategoryValues';
|
||||
import {
|
||||
getAccordionCategoryValues,
|
||||
replaceAccordionCategoryIds
|
||||
} from '../src/webparts/accordion/AccordionCategoryValues';
|
||||
|
||||
let passed: number = 0;
|
||||
function assertValues(actual: string[], expected: string[], message: string): void {
|
||||
@@ -25,5 +28,7 @@ assertValues(getAccordionCategoryValues({ results: ['General', 'General', 'News'
|
||||
['General', 'News'], 'Choice values were not retained and de-duplicated.');
|
||||
assertValues(getAccordionCategoryValues('Policies; Benefits', true),
|
||||
['Policies', 'Benefits'], 'FieldValuesAsText taxonomy labels were not split.');
|
||||
assertValues(replaceAccordionCategoryIds(['1', '2'], { '1': 'Policies', '2': 'Benefits' }),
|
||||
['Policies', 'Benefits'], 'WSS IDs were not replaced with TaxonomyHiddenList labels.');
|
||||
|
||||
console.log('Accordion category value tests passed:', passed);
|
||||
|
||||
@@ -18,8 +18,8 @@ var component = read('src/webparts/accordion/components/Accordion.tsx');
|
||||
var sanitizer = read('src/webparts/accordion/AccordionHtmlSanitizer.ts');
|
||||
var styles = read('src/webparts/accordion/components/Accordion.module.scss');
|
||||
|
||||
assert(packageJson.version === '1.1.1', 'Package version must be 1.1.1.');
|
||||
assert(solution.version === '1.1.1.0', 'Solution version must be 1.1.1.0.');
|
||||
assert(packageJson.version === '1.1.2', 'Package version must be 1.1.2.');
|
||||
assert(solution.version === '1.1.2.0', 'Solution version must be 1.1.2.0.');
|
||||
assert(solution.includeClientSideAssets === true, 'Client-side assets must be included.');
|
||||
assert(solution.skipFeatureDeployment === true, 'Solution must support central deployment.');
|
||||
assert(packageJson.name === 'accordion-web-part' && solution.name === 'accordion-web-part' &&
|
||||
@@ -44,6 +44,10 @@ assert(dataService.indexOf("'TaxonomyFieldType'") >= 0 &&
|
||||
assert(dataService.indexOf('FieldValuesAsText/') >= 0 &&
|
||||
dataService.indexOf('itemCategoryValues') >= 0 && categoryValues.indexOf('splitPlainSemicolon') >= 0,
|
||||
'Managed Metadata labels must be resolved instead of displaying WSS IDs.');
|
||||
assert(dataService.indexOf("getbytitle('TaxonomyHiddenList')") >= 0 &&
|
||||
dataService.indexOf('loadTaxonomyLabels') >= 0 &&
|
||||
categoryValues.indexOf('replaceAccordionCategoryIds') >= 0,
|
||||
'Numeric WSS IDs must be resolved through the site collection TaxonomyHiddenList.');
|
||||
assert(component.indexOf('items[i].categories') >= 0 && component.indexOf('nameIndex') >= 0,
|
||||
'Multi-value category grouping is missing.');
|
||||
assert(component.indexOf("aria-expanded={open}") >= 0 && component.indexOf("role='region'") >= 0,
|
||||
|
||||
Reference in New Issue
Block a user