@wa008/ui-audit-mcp 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -3,98 +3,98 @@ export const DIMENSIONS = [
|
|
|
3
3
|
{
|
|
4
4
|
id: "overlap",
|
|
5
5
|
name: "Element Overlap & Safe Areas",
|
|
6
|
-
description: "You are a user
|
|
7
|
-
"Evaluate the screen from the perspective of a real human user trying to read and tap efficiently.\n" +
|
|
6
|
+
description: "You are evaluating this screen as a real user trying to read content and tap buttons efficiently.\n" +
|
|
8
7
|
"Assume there ARE overlap issues until you have visually scanned the entire screen.\n\n" +
|
|
9
8
|
"CHECK FOR VISUAL INTERFERENCE & COGNITIVE NOISE:\n" +
|
|
10
|
-
"1. SYSTEM EDGE INTERFERENCE (CRITICAL): Scan the very top, bottom, and corners. Do any app elements (
|
|
11
|
-
"2. INTERACTIVE CROWDING: Are
|
|
12
|
-
"3.
|
|
13
|
-
"4. MODAL/POPUP OBSTRUCTION: If a popup or
|
|
14
|
-
"SCORING ATTITUDE: Focus on
|
|
15
|
-
"NOTE: Do NOT evaluate
|
|
16
|
-
scoringGuide: "0-2: Severe visual
|
|
17
|
-
"3-4: Elements don't
|
|
18
|
-
"5-6: All elements are separate, but touch targets
|
|
19
|
-
"7-8: Clean separation. No visual interference.
|
|
20
|
-
"9-10: Perfect
|
|
9
|
+
"1. SYSTEM EDGE INTERFERENCE (CRITICAL): Scan the very top, bottom, and corners of the screen. Do any app elements (buttons, icons, avatars, titles) visually touch, overlap with, or sit uncomfortably close to system indicators (time, battery, signal, notch/Dynamic Island, home indicator bar)? If a user might confuse an app element with a system element, or accidentally tap the wrong one, this is a CRITICAL BUG.\n" +
|
|
10
|
+
"2. INTERACTIVE CROWDING: Are any two tappable elements (buttons, links, cards) so close together that a user with a normal-sized finger might accidentally tap the wrong one? Are touch targets dangerously close to screen edges where system gestures occur?\n" +
|
|
11
|
+
"3. CONTENT COLLISION: Do any visible elements (text, images, floating buttons, badges) visually overlap each other, making any of them harder to read, recognize, or tap? Two elements occupying the same visual space is always a bug.\n" +
|
|
12
|
+
"4. MODAL/POPUP OBSTRUCTION: If a popup, sheet, or overlay is present, does it cover essential information that the user still needs to see, such as the content they are acting upon?\n\n" +
|
|
13
|
+
"SCORING ATTITUDE: Focus on what a real user would EXPERIENCE. If something 'feels' too close or visually confusing, it is an overlap failure. When in doubt, score LOW.\n" +
|
|
14
|
+
"NOTE: Do NOT evaluate spacing consistency (layout), color choices (style), or text meaning (info_clarity).",
|
|
15
|
+
scoringGuide: "0-2: Severe visual collision. Elements clearly overlap each other or invade system areas (e.g., a button sitting on top of the status bar), causing immediate confusion or making the interface unusable.\n" +
|
|
16
|
+
"3-4: Elements don't directly collide, but are awkwardly close to each other or to system edges, creating noticeable visual noise or high accidental-tap risk.\n" +
|
|
17
|
+
"5-6: All elements are visually separate, but some touch targets feel uncomfortably close. A careful user would be fine, but a hurried user might mis-tap.\n" +
|
|
18
|
+
"7-8: Clean separation throughout. No visual interference. The app clearly respects system boundaries and provides comfortable touch targets.\n" +
|
|
19
|
+
"9-10: Perfect separation — generous spacing between all interactive elements, completely unambiguous visual boundaries across the entire screen.",
|
|
21
20
|
},
|
|
22
21
|
{
|
|
23
22
|
id: "layout",
|
|
24
23
|
name: "Layout & Spatial Balance",
|
|
25
|
-
description: "You are
|
|
24
|
+
description: "You are evaluating this screen as a real user who expects a well-organized, visually balanced interface.\n" +
|
|
26
25
|
"Assume the layout has issues until you verify otherwise.\n\n" +
|
|
27
26
|
"CHECK EACH ASPECT:\n" +
|
|
28
|
-
"1. LETTERBOXING: Does the app appear to run inside a smaller box with black
|
|
29
|
-
"2. SCREEN UTILIZATION: Is there a large empty area that serves no purpose? Is content crammed into only
|
|
30
|
-
"3. ALIGNMENT: Pick any two similar elements (e.g., two cards, two labels). Are their
|
|
31
|
-
"4. SPACING: Are gaps between elements consistent?
|
|
32
|
-
"5. RESPONSIVE FIT: Does the layout feel
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
27
|
+
"1. LETTERBOXING: Does the app appear to run inside a smaller box with black or empty bars on any side? This is score 0, no exceptions.\n" +
|
|
28
|
+
"2. SCREEN UTILIZATION: Is there a large empty area that serves no purpose? Is content crammed into only part of the screen while the rest is wasted? A user should feel the app was designed for this exact screen size.\n" +
|
|
29
|
+
"3. ALIGNMENT: Pick any two similar elements (e.g., two cards, two labels). Are their edges aligned? Are the gaps between them equal? Visible misalignment = deduction.\n" +
|
|
30
|
+
"4. SPACING CONSISTENCY: Are gaps between elements consistent? If the space between Card A and Card B looks visibly different from the space between Card B and Card C, that is a problem.\n" +
|
|
31
|
+
"5. RESPONSIVE FIT: Does the layout feel natural for this screen size, or does it look stretched, squished, or designed for a different device?\n" +
|
|
32
|
+
"6. CONTENT OVERFLOW: Does any content look like it has outgrown its container? Look for: text that wraps unexpectedly causing one card to be noticeably taller than its neighbor in a grid, content that appears cut off at a container edge, or scrollable areas that clip content in a way that confuses the user about whether more content exists.\n\n" +
|
|
33
|
+
"SCORING ATTITUDE: Do not be generous. A layout that 'looks fine at a glance' but has visible imperfections upon closer inspection is a 6, not an 8.\n" +
|
|
34
|
+
"NOTE: Do NOT evaluate element collision (that is overlap), color choices (that is style), or text meaning (that is info_clarity).",
|
|
35
|
+
scoringGuide: "0-2: Letterboxing detected, or layout is severely broken (elements piled on top of each other, massive unusable empty areas, content pushed off-screen).\n" +
|
|
36
|
+
"3-4: Major layout issues — clearly uneven spacing, significant misalignment, or large wasted areas that make the app feel unfinished.\n" +
|
|
37
|
+
"5-6: Layout is functional but has noticeable imperfections — some uneven spacing, minor alignment issues, or one area that feels out of balance.\n" +
|
|
38
38
|
"7-8: Well-structured layout with only very minor imperfections that require careful inspection to notice.\n" +
|
|
39
39
|
"9-10: Flawless — pixel-perfect alignment, perfectly consistent spacing, optimal screen utilization. Extremely rare.",
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
id: "info_clarity",
|
|
43
43
|
name: "Information Clarity & Readability",
|
|
44
|
-
description: "You are
|
|
45
|
-
"
|
|
44
|
+
description: "You are evaluating this screen as a FIRST-TIME user who has never seen this app before.\n" +
|
|
45
|
+
"Your goal is to determine how quickly and easily a new user could understand this screen.\n\n" +
|
|
46
46
|
"CHECK EACH ASPECT:\n" +
|
|
47
|
-
"1. FIRST IMPRESSION: Within 2 seconds of looking at this screen, can you tell what it does and what the main action is? If
|
|
48
|
-
"2. BUTTON
|
|
49
|
-
"3. HIERARCHY: Is the most important element (title,
|
|
50
|
-
"4. TEXT
|
|
51
|
-
"5. CONTRAST:
|
|
52
|
-
"6. ICON MEANING: Are there any icons without labels
|
|
53
|
-
"SCORING ATTITUDE: If any single element
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"9-10: Crystal clear — perfect hierarchy, unambiguous labels, no truncation, excellent contrast. Every element self-explanatory.",
|
|
47
|
+
"1. FIRST IMPRESSION: Within 2 seconds of looking at this screen, can you tell what it does and what the main action is? If it takes effort to figure out the screen's purpose, that is a problem.\n" +
|
|
48
|
+
"2. BUTTON & LABEL CLARITY: Read every button, link, and label. Would a first-time user immediately understand what each one does? Vague labels like 'Go' or unlabeled icon-only buttons are problematic.\n" +
|
|
49
|
+
"3. VISUAL HIERARCHY: Is the most important element (page title, primary action button) visually the most prominent? Or do secondary elements compete for the user's attention?\n" +
|
|
50
|
+
"4. TEXT COMPLETENESS: Is any text cut off with '...' (truncation), overflowing its container, or so small that a user would struggle to read it? Even one truncated label that hides meaningful information = deduction.\n" +
|
|
51
|
+
"5. READABILITY & CONTRAST: Can all text be comfortably read against its background? Pay special attention to small text, light-colored text on light backgrounds, or text placed over images.\n" +
|
|
52
|
+
"6. ICON MEANING: Are there any icons without text labels whose meaning might be ambiguous to a new user? A trash can icon is universally understood; a custom abstract icon is not.\n\n" +
|
|
53
|
+
"SCORING ATTITUDE: If any single element would make a first-time user pause and wonder 'what does this do?', cap the score at 7. Multiple confusing elements = score 5 or below.\n" +
|
|
54
|
+
"NOTE: Do NOT evaluate spacing (layout), visual collision (overlap), or color harmony (style).",
|
|
55
|
+
scoringGuide: "0-2: The screen's purpose is unclear, the primary action is missing or hidden, or labels are severely misleading.\n" +
|
|
56
|
+
"3-4: The core purpose is guessable but requires effort. Multiple labels or icons are ambiguous.\n" +
|
|
57
|
+
"5-6: Generally understandable but 1-2 elements are confusing (ambiguous icon, truncated text hiding important info, weak visual hierarchy).\n" +
|
|
58
|
+
"7-8: Clear and well-organized with only one very minor issue. A first-time user would understand the screen immediately.\n" +
|
|
59
|
+
"9-10: Crystal clear — perfect hierarchy, every label self-explanatory, no truncation, excellent contrast. A user of any background would instantly understand this screen.",
|
|
61
60
|
},
|
|
62
61
|
{
|
|
63
62
|
id: "style",
|
|
64
63
|
name: "Visual Style & Consistency",
|
|
65
|
-
description: "You are
|
|
66
|
-
"
|
|
64
|
+
description: "You are evaluating this screen as a user who expects a polished, professionally designed app.\n" +
|
|
65
|
+
"Your job is to find visual inconsistencies and rendering defects that make the app look unfinished.\n\n" +
|
|
67
66
|
"CHECK EACH ASPECT:\n" +
|
|
68
|
-
"1. COLOR PALETTE: Count the number of distinct colors used. Do they feel intentional and harmonious, or random?\n" +
|
|
69
|
-
"2. TYPOGRAPHY: Are
|
|
70
|
-
"3. COMPONENT
|
|
71
|
-
"4. ICONOGRAPHY: Are all icons
|
|
72
|
-
"5. POLISH: Does
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
67
|
+
"1. COLOR PALETTE: Count the number of distinct colors used. Do they feel intentional and harmonious, or random and clashing?\n" +
|
|
68
|
+
"2. TYPOGRAPHY: Are font sizes used consistently? Are there mixed font weights that don't follow a clear hierarchy? More than 2-3 font sizes without a clear reason is a problem.\n" +
|
|
69
|
+
"3. COMPONENT CONSISTENCY: Compare all elements of the same type. Do all buttons have the same shape, size, and styling? Do all cards have the same shadows, borders, and corner radius? Any difference between similar components = deduction.\n" +
|
|
70
|
+
"4. ICONOGRAPHY: Are all icons visually consistent (all outline style OR all filled style, consistent stroke width and sizing)? Mixing styles within the same screen = deduction.\n" +
|
|
71
|
+
"5. POLISH & FINISH: Does the app look professionally designed, or does it feel like an unfinished prototype? Placeholder content (e.g., 'Lorem ipsum', default system icons used inappropriately) = major deduction.\n" +
|
|
72
|
+
"6. RENDERING INTEGRITY: Inspect each UI element individually for visual defects. Look for: a visible ring, halo, or unintended border of a different color around an element (e.g., a white circle visible behind a colored circular button — this means the element was not built cleanly), mismatched shapes within a single component, clipping artifacts that cut off part of an icon or image, or any visual glitch that makes a component look broken. Even 1-2 pixels of visible defect = deduction.\n\n" +
|
|
73
|
+
"SCORING ATTITUDE: Consistency is binary — if two buttons of the same type look different, they are inconsistent, period. A single rendering defect on any element caps the score at 7.\n" +
|
|
74
|
+
"NOTE: Do NOT evaluate text meaning (info_clarity), spatial arrangement (layout), or element collision (overlap).",
|
|
75
|
+
scoringGuide: "0-2: No design system — clashing colors, random fonts, inconsistent components everywhere, or multiple rendering defects.\n" +
|
|
76
|
+
"3-4: Some design intent visible but multiple clear inconsistencies (different button styles, mixed icon sets, visible rendering glitches).\n" +
|
|
77
|
+
"5-6: Basic consistency exists but with noticeable deviations or at least one obvious rendering defect.\n" +
|
|
78
|
+
"7-8: Strong consistency with only 1 minor deviation or subtle defect requiring careful inspection.\n" +
|
|
79
|
+
"9-10: Pixel-perfect design system adherence. Every element cohesive and cleanly rendered. Extremely rare.",
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
id: "action_result",
|
|
83
83
|
name: "Action Result Verification",
|
|
84
|
-
description: "You are
|
|
85
|
-
"The step's expectedOutcome describes what SHOULD have happened. Compare the screenshot against it.\n\n" +
|
|
84
|
+
description: "You are evaluating whether the action the user just performed actually produced the expected result.\n" +
|
|
85
|
+
"The step's expectedOutcome describes what SHOULD have happened. Compare the current screenshot against it.\n\n" +
|
|
86
86
|
"CHECK EACH ASPECT:\n" +
|
|
87
|
-
"1.
|
|
88
|
-
"2. STATE CHANGE: If the action should
|
|
89
|
-
"3. ERROR
|
|
90
|
-
"4. NO RESPONSE: Does the screen look identical to before the action? If
|
|
91
|
-
"SCORING ATTITUDE: If the expectedOutcome is not clearly achieved, score LOW. Partial success is still a problem.\n" +
|
|
92
|
-
"If this step is a pure observation
|
|
93
|
-
scoringGuide: "0-2: Action clearly failed — wrong screen, error dialog, crash, or no
|
|
94
|
-
"3-4: Action had some effect but the result does not match expectedOutcome (e.g., navigated to wrong tab).\n" +
|
|
95
|
-
"5-6: Action partially achieved the goal but with unexpected side effects
|
|
96
|
-
"7-8: Action succeeded — the expected screen
|
|
97
|
-
"9-10: Action fully succeeded — screenshot
|
|
87
|
+
"1. CORRECT DESTINATION: If the user tapped a navigation element, did the correct screen appear? Landing on the wrong screen = score 0.\n" +
|
|
88
|
+
"2. VISIBLE STATE CHANGE: If the action should have added, removed, toggled, or updated something, is that change clearly visible in the screenshot? The user should be able to confirm the action worked.\n" +
|
|
89
|
+
"3. ERROR INDICATORS: Are there any error dialogs, crash screens, blank white screens, or infinite loading spinners? These all indicate the action failed.\n" +
|
|
90
|
+
"4. NO VISIBLE RESPONSE: Does the screen look identical to before the action was performed? If nothing changed, the action likely failed or missed its target.\n\n" +
|
|
91
|
+
"SCORING ATTITUDE: If the expectedOutcome is not clearly achieved in the screenshot, score LOW. Partial success is still a problem — the user expects the action to fully work.\n" +
|
|
92
|
+
"If this step is a pure observation with no expectedOutcome specified, score 10.",
|
|
93
|
+
scoringGuide: "0-2: Action clearly failed — wrong screen, error dialog, crash, blank screen, or no visible response at all.\n" +
|
|
94
|
+
"3-4: Action had some effect but the result does not match the expectedOutcome (e.g., navigated to the wrong tab, wrong data displayed).\n" +
|
|
95
|
+
"5-6: Action partially achieved the goal but with unexpected side effects, missing expected elements, or incomplete state changes.\n" +
|
|
96
|
+
"7-8: Action succeeded — the expected screen or state is present but with minor discrepancies from the expectedOutcome.\n" +
|
|
97
|
+
"9-10: Action fully succeeded — the screenshot clearly and completely matches the expectedOutcome. Or this is a pure observation step with no expectedOutcome.",
|
|
98
98
|
},
|
|
99
99
|
];
|
|
100
100
|
export const REQUIRED_DIMS = DIMENSIONS.map(d => d.id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist.js","sourceRoot":"","sources":["../../../src/evaluation/checklist.ts"],"names":[],"mappings":"AAEA,+DAA+D;AAC/D,MAAM,CAAC,MAAM,UAAU,GAAoB;IACvC;QACI,EAAE,EAAE,SAAS;QACb,IAAI,EAAE,8BAA8B;QACpC,WAAW,EACP,
|
|
1
|
+
{"version":3,"file":"checklist.js","sourceRoot":"","sources":["../../../src/evaluation/checklist.ts"],"names":[],"mappings":"AAEA,+DAA+D;AAC/D,MAAM,CAAC,MAAM,UAAU,GAAoB;IACvC;QACI,EAAE,EAAE,SAAS;QACb,IAAI,EAAE,8BAA8B;QACpC,WAAW,EACP,qGAAqG;YACrG,wFAAwF;YACxF,oDAAoD;YACpD,iaAAia;YACja,kQAAkQ;YAClQ,2OAA2O;YAC3O,2LAA2L;YAC3L,2KAA2K;YAC3K,4GAA4G;QAChH,YAAY,EACR,6MAA6M;YAC7M,iKAAiK;YACjK,6JAA6J;YAC7J,gJAAgJ;YAChJ,kJAAkJ;KACzJ;IACD;QACI,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,0BAA0B;QAChC,WAAW,EACP,4GAA4G;YAC5G,8DAA8D;YAC9D,sBAAsB;YACtB,0IAA0I;YAC1I,4NAA4N;YAC5N,0KAA0K;YAC1K,6LAA6L;YAC7L,kJAAkJ;YAClJ,4VAA4V;YAC5V,uJAAuJ;YACvJ,mIAAmI;QACvI,YAAY,EACR,4JAA4J;YAC5J,yIAAyI;YACzI,oJAAoJ;YACpJ,6GAA6G;YAC7G,qHAAqH;KAC5H;IACD;QACI,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,mCAAmC;QACzC,WAAW,EACP,2FAA2F;YAC3F,+FAA+F;YAC/F,sBAAsB;YACtB,qMAAqM;YACrM,4MAA4M;YAC5M,kLAAkL;YAClL,4NAA4N;YAC5N,iMAAiM;YACjM,yLAAyL;YACzL,mLAAmL;YACnL,+FAA+F;QACnG,YAAY,EACR,qHAAqH;YACrH,mGAAmG;YACnG,+IAA+I;YAC/I,4HAA4H;YAC5H,4KAA4K;KACnL;IACD;QACI,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,4BAA4B;QAClC,WAAW,EACP,iGAAiG;YACjG,yGAAyG;YACzG,sBAAsB;YACtB,gIAAgI;YAChI,oLAAoL;YACpL,kPAAkP;YAClP,oLAAoL;YACpL,wNAAwN;YACxN,ifAAif;YACjf,0LAA0L;YAC1L,kHAAkH;QACtH,YAAY,EACR,6HAA6H;YAC7H,8IAA8I;YAC9I,0GAA0G;YAC1G,sGAAsG;YACtG,2GAA2G;KAClH;IACD;QACI,EAAE,EAAE,eAAe;QACnB,IAAI,EAAE,4BAA4B;QAClC,WAAW,EACP,wGAAwG;YACxG,gHAAgH;YAChH,sBAAsB;YACtB,0IAA0I;YAC1I,6MAA6M;YAC7M,6JAA6J;YAC7J,mKAAmK;YACnK,kLAAkL;YAClL,iFAAiF;QACrF,YAAY,EACR,gHAAgH;YAChH,2IAA2I;YAC3I,qIAAqI;YACrI,0HAA0H;YAC1H,+JAA+J;KACtK;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-log.d.ts","sourceRoot":"","sources":["../../../src/logger/audit-log.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAA8B,MAAM,aAAa,CAAC;AAmBnE,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAMzD;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAG5C;AAED,wBAAgB,WAAW,IAAI,QAAQ,EAAE,CAexC;
|
|
1
|
+
{"version":3,"file":"audit-log.d.ts","sourceRoot":"","sources":["../../../src/logger/audit-log.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAA8B,MAAM,aAAa,CAAC;AAmBnE,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAMzD;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAG5C;AAED,wBAAgB,WAAW,IAAI,QAAQ,EAAE,CAexC;AAcD,wBAAgB,UAAU,CACtB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,KAAK,GAAG,OAAO,GAAG,YAAY,EAC1C,cAAc,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EACtC,eAAe,CAAC,EAAE,MAAM,GACzB,IAAI,CAyBN;AAED,wBAAgB,WAAW,CACvB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACf,IAAI,CAiBN"}
|
|
@@ -46,6 +46,15 @@ export function readAllLogs() {
|
|
|
46
46
|
}
|
|
47
47
|
return logs;
|
|
48
48
|
}
|
|
49
|
+
function getLocalTimestamp() {
|
|
50
|
+
const now = new Date();
|
|
51
|
+
const tzOffset = now.getTimezoneOffset() * 60000;
|
|
52
|
+
const localISOTime = (new Date(now.getTime() - tzOffset)).toISOString().slice(0, -1);
|
|
53
|
+
const offset = -now.getTimezoneOffset();
|
|
54
|
+
const sign = offset >= 0 ? '+' : '-';
|
|
55
|
+
const pad = (n) => String(Math.floor(Math.abs(n))).padStart(2, '0');
|
|
56
|
+
return `${localISOTime}${sign}${pad(offset / 60)}:${pad(offset % 60)}`;
|
|
57
|
+
}
|
|
49
58
|
export function recordStep(caseName, stepIndex, description, actionType, screenshotPath, coordinates, expectedOutcome) {
|
|
50
59
|
let log = readLog(caseName);
|
|
51
60
|
if (!log) {
|
|
@@ -62,7 +71,7 @@ export function recordStep(caseName, stepIndex, description, actionType, screens
|
|
|
62
71
|
screenshotPath,
|
|
63
72
|
coordinates,
|
|
64
73
|
expectedOutcome,
|
|
65
|
-
timestamp:
|
|
74
|
+
timestamp: getLocalTimestamp(),
|
|
66
75
|
evaluations: existingStep ? existingStep.evaluations : {},
|
|
67
76
|
currentDimIndex: existingStep && existingStep.currentDimIndex !== undefined ? existingStep.currentDimIndex : 0,
|
|
68
77
|
evaluationToken: existingStep ? existingStep.evaluationToken : undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-log.js","sourceRoot":"","sources":["../../../src/logger/audit-log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AAGpB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,eAAe,CAAC,CAAC;AAC1D,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC5C,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;AAE1D,2BAA2B;AAC3B,SAAS,UAAU;IACf,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;Q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