Add NS8 local production smoke
This commit is contained in:
+3
-3
@@ -1,6 +1,6 @@
|
||||
# v1 iPhone SSH dogfood receipt
|
||||
|
||||
Use this when closing #41. Do not mark the dogfood complete unless the edit was made from a real iPhone SSH terminal session.
|
||||
Use this when closing #41 or NS8 hardening slice #56 under parent #43. Do not mark the dogfood complete unless the edit was made from a real iPhone SSH terminal session.
|
||||
|
||||
## Before the iPhone session
|
||||
|
||||
@@ -30,7 +30,7 @@ Pick one small real repository fix that can be judged without a desktop IDE:
|
||||
|
||||
Do not use this receipt for a simulated fixture-only edit, a desktop terminal edit, or an edit made outside the iPhone SSH session.
|
||||
|
||||
## Receipt to paste into #41
|
||||
## Receipt to paste into #41 and/or #56
|
||||
|
||||
```text
|
||||
DOGFOOD RECEIPT
|
||||
@@ -53,4 +53,4 @@ DOGFOOD RECEIPT
|
||||
|
||||
## Close rule
|
||||
|
||||
Close #41 only when the pasted receipt confirms a real iPhone SSH edit and any blocking v1 findings are either fixed in committed code or explicitly deferred as non-blocking for PRODUCT.md v1 proof.
|
||||
Close #41/#56 only when the pasted receipt confirms a real iPhone SSH edit and any blocking v1 findings are either fixed in committed code or explicitly deferred as non-blocking for PRODUCT.md v1 proof.
|
||||
|
||||
@@ -188,3 +188,68 @@ fn freeRows(rows: [][]const u8) void {
|
||||
for (rows) |row| allocator.free(row);
|
||||
allocator.free(rows);
|
||||
}
|
||||
|
||||
test "regular: ns8 local production smoke covers editor workflow before real-device dogfood" {
|
||||
var client = try tui.Client.initWithIo(allocator, .{ .width = 39, .height = 8 }, std.testing.io);
|
||||
defer client.deinit();
|
||||
|
||||
try client.handleTraceLine("repo_file src/main.zig=pub fn main() void { needle(); }\n");
|
||||
try client.handleTraceLine("repo_file README.md=needle docs\n");
|
||||
try client.handleTraceLine("file_picker");
|
||||
try client.handleTraceLine("list_filter src/main");
|
||||
try client.handleTraceLine("file_open_selected");
|
||||
try client.handleTraceLine("key end");
|
||||
try client.handleInput("i");
|
||||
try client.handleInput("X");
|
||||
try client.handleTraceLine("key escape");
|
||||
try client.handleTraceLine("save_without_format");
|
||||
try std.testing.expect(std.mem.indexOf(u8, try client.saved(), "X") != null);
|
||||
|
||||
try client.handleTraceLine("search_text needle");
|
||||
{
|
||||
const frame = try client.render(allocator);
|
||||
defer allocator.free(frame);
|
||||
try std.testing.expect(std.mem.indexOf(u8, frame, "src/main.zig") != null);
|
||||
try std.testing.expect(frameLinesFit(frame, 39));
|
||||
}
|
||||
|
||||
try client.handleTraceLine("panel_close");
|
||||
try client.handleTraceLine("diagnostic_fixture zls|2|src/main.zig|0|3|warning|demo");
|
||||
try client.handleInput(" ");
|
||||
try client.handleInput("d");
|
||||
{
|
||||
const frame = try client.render(allocator);
|
||||
defer allocator.free(frame);
|
||||
try std.testing.expect(std.mem.indexOf(u8, frame, "diag:fresh:zls") != null);
|
||||
try std.testing.expect(frameLinesFit(frame, 39));
|
||||
}
|
||||
|
||||
try client.handleTraceLine("panel_close");
|
||||
try client.handleTraceLine("key escape");
|
||||
try client.handleInput(" ");
|
||||
try client.handleInput("t");
|
||||
try client.handleInput("x");
|
||||
{
|
||||
const frame = try client.render(allocator);
|
||||
defer allocator.free(frame);
|
||||
try std.testing.expect(std.mem.indexOf(u8, frame, "job:status:cancelled:user") != null);
|
||||
try std.testing.expect(frameLinesFit(frame, 39));
|
||||
}
|
||||
|
||||
var guarded = try tui.Client.init(allocator, .{ .width = 39, .height = 8 });
|
||||
defer guarded.deinit();
|
||||
try guarded.handleTraceLine("open abc");
|
||||
try guarded.handleTraceLine("language_edit zls|format|1|0|3|ZLS");
|
||||
try guarded.handleTraceLine("language_edit prettier|format|1|0|3|PRETTY");
|
||||
try guarded.handleTraceLine("save");
|
||||
try std.testing.expectError(tui.Error.NothingSaved, guarded.saved());
|
||||
const guarded_frame = try guarded.render(allocator);
|
||||
defer allocator.free(guarded_frame);
|
||||
try std.testing.expect(std.mem.indexOf(u8, guarded_frame, "action:format:provider") != null);
|
||||
}
|
||||
|
||||
fn frameLinesFit(frame: []const u8, width: usize) bool {
|
||||
var lines = std.mem.splitScalar(u8, frame, '\n');
|
||||
while (lines.next()) |line| if (line.len > width) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user