Skip to content

Commit

Permalink
test: search highlight rendering test
Browse files Browse the repository at this point in the history
  • Loading branch information
johanlahti committed Apr 25, 2023
1 parent b1a755c commit cb46013
Showing 1 changed file with 160 additions and 0 deletions.
160 changes: 160 additions & 0 deletions test/rendering/listbox/__fixtures__/single_column_search_highlight.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
const fixture = {
getLayout: () => ({
qInfo: {
qId: '6622e035-c257-46a8-a741-ae0a0282b1cb',
qType: 'listbox',
},
qMeta: {
privileges: ['read', 'update', 'delete'],
},
qSelectionInfo: {},
qListObject: {
qSize: {
qcx: 1,
qcy: 17,
},
qDimensionInfo: {
qFallbackTitle: 'Basket Product Group Desc',
qApprMaxGlyphCount: 19,
qCardinal: 17,
qSortIndicator: 'A',
qGroupFallbackTitles: ['Basket Product Group Desc'],
qGroupPos: 0,
qStateCounts: {
qLocked: 0,
qSelected: 0,
qOption: 17,
qDeselected: 0,
qAlternative: 0,
qExcluded: 0,
qSelectedExcluded: 0,
qLockedExcluded: 0,
},
qTags: ['$ascii', '$text'],
qDimensionType: 'D',
qGrouping: 'N',
qNumFormat: {
qType: 'U',
qnDec: 0,
qUseThou: 0,
},
qIsAutoFormat: true,
qGroupFieldDefs: ['Basket Product Group Desc'],
qMin: 0,
qMax: 0,
qAttrExprInfo: [],
qAttrDimInfo: [],
qCardinalities: {
qCardinal: 17,
qHypercubeCardinal: 0,
qAllValuesCardinal: -1,
},
qLibraryId: 'XGvpzM',
title: 'Basket Product Group Desc',
coloring: {
changeHash: '0.45993295453224325',
hasValueColors: false,
},
autoSort: true,
cId: 'AHjFGWn',
textAlign: {
auto: false,
align: 'left',
},
},
qExpressions: [],
qDataPages: [],
showTitles: true,
title: '',
subtitle: '',
footnote: '',
disableNavMenu: false,
showDetails: true,
showDetailsExpression: false,
qOtherTotalSpec: {},
},
showTitles: true,
title: 'Basket Product Group Desc',
subtitle: '',
footnote: '',
disableNavMenu: false,
showDetails: true,
showDetailsExpression: false,
visualization: 'listbox',
layoutOptions: {
dataLayout: 'singleColumn',
maxVisibleRows: {
auto: false,
maxRows: 10,
},
maxVisibleColumns: {
auto: false,
},
},
frequencyMax: null,
}),
getListObjectData: () => [
{
qMatrix: [
[
{
qText:
'- Beer and Wine\n - Beer and Wine\n - Beer and Wine\n - Beer_and_Wine\n - Beer and Wine\n - Beer and Wine\n - Beer and Wine\n - Beer and Wine\n - Beer and Wine',
qNum: 'NaN',
qElemNumber: 2,
qState: 'O',
qHighlightRanges: {
qRanges: [
{
qCharPos: 7,
qCharCount: 3,
},
{
qCharPos: 32,
qCharCount: 3,
},
{
qCharPos: 57,
qCharCount: 3,
},
{
qCharPos: 82,
qCharCount: 3,
},
{
qCharPos: 107,
qCharCount: 3,
},
{
qCharPos: 132,
qCharCount: 3,
},
{
qCharPos: 157,
qCharCount: 3,
},
{
qCharPos: 182,
qCharCount: 3,
},
{
qCharPos: 207,
qCharCount: 3,
},
],
},
},
],
],
qTails: [],
qArea: {
qLeft: 0,
qTop: 0,
qWidth: 1,
qHeight: 1,
},
},
],
};

export default fixture;

0 comments on commit cb46013

Please sign in to comment.