mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
test(qa): align Matrix scenario coverage (#112837)
This commit is contained in:
@@ -5,6 +5,17 @@ import {
|
||||
readQaScenarioExecutionConfig,
|
||||
} from "../../scenario-catalog.js";
|
||||
|
||||
const MATRIX_MENTION_GATE_PRIMARY_SCENARIOS = [
|
||||
"matrix-allowbots-default-block",
|
||||
"matrix-allowbots-mentions-mentioned-room",
|
||||
"matrix-allowbots-mentions-unmentioned-open-room-block",
|
||||
"matrix-allowbots-room-override-blocks-account-true",
|
||||
"matrix-allowbots-room-override-enables-account-off",
|
||||
"matrix-allowbots-self-sender-ignored",
|
||||
"matrix-allowbots-true-unmentioned-open-room",
|
||||
"matrix-mention-metadata-spoof-block",
|
||||
] as const;
|
||||
|
||||
function readModuleBinding(
|
||||
scenario: ReturnType<typeof readQaBootstrapScenarioCatalog>["scenarios"][number],
|
||||
) {
|
||||
@@ -128,6 +139,21 @@ describe("Matrix QA Lab scenario flows", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("attributes Matrix admission and media evidence to behavior the flows execute", () => {
|
||||
for (const scenarioId of MATRIX_MENTION_GATE_PRIMARY_SCENARIOS) {
|
||||
expect(readQaScenarioById(scenarioId).coverage, scenarioId).toEqual({
|
||||
primary: ["matrix.mention-gates"],
|
||||
});
|
||||
}
|
||||
expect(readQaScenarioById("matrix-mxid-prefixed-command-block").coverage).toEqual({
|
||||
primary: ["matrix.mention-gates"],
|
||||
secondary: ["channels.channel-native-commands"],
|
||||
});
|
||||
expect(readQaScenarioById("matrix-unsupported-media-safe").coverage).toEqual({
|
||||
primary: ["channels.inbound-media-normalization"],
|
||||
});
|
||||
});
|
||||
|
||||
it("loads the voice preflight provider and media overrides", () => {
|
||||
expect(readQaScenarioById("matrix-voice-preflight-mention").execution).toMatchObject({
|
||||
kind: "flow",
|
||||
|
||||
@@ -4,7 +4,7 @@ scenario:
|
||||
surface: channels
|
||||
coverage:
|
||||
primary:
|
||||
- channels.room-allowlist-access-policy
|
||||
- matrix.mention-gates
|
||||
execution:
|
||||
profiles: { "matrix:all": 36, "matrix:fast": 8, "matrix:transport": 35 }
|
||||
kind: flow
|
||||
|
||||
@@ -4,7 +4,7 @@ scenario:
|
||||
surface: channels
|
||||
coverage:
|
||||
primary:
|
||||
- channels.room-allowlist-access-policy
|
||||
- matrix.mention-gates
|
||||
execution:
|
||||
profiles: { "matrix:all": 38, "matrix:fast": 9, "matrix:transport": 37 }
|
||||
kind: flow
|
||||
|
||||
@@ -4,7 +4,7 @@ scenario:
|
||||
surface: channels
|
||||
coverage:
|
||||
primary:
|
||||
- channels.room-allowlist-access-policy
|
||||
- matrix.mention-gates
|
||||
execution:
|
||||
profiles: { "matrix:all": 39, "matrix:transport": 38 }
|
||||
kind: flow
|
||||
|
||||
@@ -4,7 +4,7 @@ scenario:
|
||||
surface: channels
|
||||
coverage:
|
||||
primary:
|
||||
- channels.room-allowlist-access-policy
|
||||
- matrix.mention-gates
|
||||
execution:
|
||||
profiles: { "matrix:all": 41, "matrix:transport": 40 }
|
||||
kind: flow
|
||||
|
||||
@@ -4,7 +4,7 @@ scenario:
|
||||
surface: channels
|
||||
coverage:
|
||||
primary:
|
||||
- channels.room-allowlist-access-policy
|
||||
- matrix.mention-gates
|
||||
execution:
|
||||
profiles: { "matrix:all": 42, "matrix:transport": 41 }
|
||||
kind: flow
|
||||
|
||||
@@ -4,7 +4,7 @@ scenario:
|
||||
surface: channels
|
||||
coverage:
|
||||
primary:
|
||||
- channels.room-allowlist-access-policy
|
||||
- matrix.mention-gates
|
||||
execution:
|
||||
profiles: { "matrix:all": 43, "matrix:transport": 42 }
|
||||
kind: flow
|
||||
|
||||
@@ -4,7 +4,7 @@ scenario:
|
||||
surface: channels
|
||||
coverage:
|
||||
primary:
|
||||
- channels.room-allowlist-access-policy
|
||||
- matrix.mention-gates
|
||||
execution:
|
||||
profiles: { "matrix:all": 37, "matrix:transport": 36 }
|
||||
kind: flow
|
||||
|
||||
@@ -4,7 +4,7 @@ scenario:
|
||||
surface: channels
|
||||
coverage:
|
||||
primary:
|
||||
- channels.room-allowlist-access-policy
|
||||
- matrix.mention-gates
|
||||
execution:
|
||||
profiles: { "matrix:all": 45, "matrix:transport": 44 }
|
||||
kind: flow
|
||||
|
||||
@@ -4,9 +4,9 @@ scenario:
|
||||
surface: channels
|
||||
coverage:
|
||||
primary:
|
||||
- channels.channel-native-commands
|
||||
secondary:
|
||||
- matrix.mention-gates
|
||||
secondary:
|
||||
- channels.channel-native-commands
|
||||
execution:
|
||||
profiles: { "matrix:all": 44, "matrix:transport": 43 }
|
||||
kind: flow
|
||||
|
||||
@@ -5,8 +5,6 @@ scenario:
|
||||
coverage:
|
||||
primary:
|
||||
- channels.inbound-media-normalization
|
||||
secondary:
|
||||
- matrix.inbound-media-failure-handling
|
||||
execution:
|
||||
profiles: { "matrix:all": 56, "matrix:media": 5 }
|
||||
kind: flow
|
||||
|
||||
Reference in New Issue
Block a user