POLISH-1: e2e mock accepts canonical '=' (and legacy '==') equals operator [QA-1 coordination]
This commit is contained in:
@@ -20,7 +20,9 @@ const newId = (prefix: string) => `${prefix}-e2e-${++seq}`
|
||||
/** Gridify-Escapes entfernen (\, vor Sonderzeichen). */
|
||||
const unescapeGridify = (s: string) => s.replace(/\\(.)/g, '$1')
|
||||
|
||||
/** Mini-Gridify: genau die Ausdrücke, die die App baut (==, contains, ',', '|'). */
|
||||
/** Mini-Gridify: genau die Ausdrücke, die die App baut (=, contains, ',', '|').
|
||||
* Gleichheit akzeptiert '=' (kanonisch) UND '==' (alt) — POLISH-1 stellte den
|
||||
* Client auf Gridifys echtes '=' um; der Mock bleibt für beide robust. */
|
||||
function matchesFilter(row: Row, filter: string | null): boolean {
|
||||
if (!filter) return true
|
||||
return filter.split(',').every((andPart) =>
|
||||
@@ -31,7 +33,7 @@ function matchesFilter(row: Row, filter: string | null): boolean {
|
||||
.toLowerCase()
|
||||
.includes(unescapeGridify(m[2]).toLowerCase())
|
||||
}
|
||||
m = cond.match(/^(\w+)==(.*)$/)
|
||||
m = cond.match(/^(\w+)==?(.*)$/)
|
||||
if (m) return String(row[m[1]] ?? '') === unescapeGridify(m[2])
|
||||
return true
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user