╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─────────╮ │src/test/event.zig│ ╰──────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │66 }, │ │67 }, │ │68 .{ │ │69 - .id = std.fmt.bytesToHex(evt.Event.randomId(prng.random()), .lower), │ │70 - .data = .{ │ │69 + .id = std.fmt.bytesToHex(evt.EventWithId.randomId(prng.random()), .lower), │ │70 + .event = .{ │ │71 .issue = .{ │ │72 .title = "Search results ignore archived project filter", │ │73 .description = "Filtering search results to active projects still returns issues from archived projects. Apply the archived flag before ranking results.",│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │76 }, │ │77 }, │ │78 .{ │ │79 - .id = std.fmt.bytesToHex(evt.Event.randomId(prng.random()), .lower), │ │80 - .data = .{ │ │79 + .id = std.fmt.bytesToHex(evt.EventWithId.randomId(prng.random()), .lower), │ │80 + .event = .{ │ │81 .issue = .{ │ │82 .title = "Issue list does not persist selected sort order", │ │83 .description = "Changing the issue list sort order is lost after refresh. Store the selected sort field and direction with the user's view preferences.",│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │149 const first_issue = try evt.read(evt.Issue, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │150 │ │151 // the description was correctly edited │ │152 - try std.testing.expectEqualStrings(events_to_consume[1].data.issue.?.description, first_issue.description); │ │152 + try std.testing.expectEqualStrings(events_to_consume[1].event.issue.?.description, first_issue.description);│ │153 │ │154 // the tags were correctly edited │ │155 - try std.testing.expectEqualStrings(events_to_consume[1].data.issue.?.tags, first_issue.tags); │ │155 + try std.testing.expectEqualStrings(events_to_consume[1].event.issue.?.tags, first_issue.tags); │ │156 } │ │157 │ │158 // │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │159 // add another event │ │160 // │ │161 │ │162 - const events_to_consume2 = [_]evt.Event{ │ │162 + const events_to_consume2 = [_]evt.EventWithId{ │ │163 .{ │ │164 - .id = std.fmt.bytesToHex(evt.Event.randomId(prng.random()), .lower), │ │165 - .data = .{ │ │164 + .id = std.fmt.bytesToHex(evt.EventWithId.randomId(prng.random()), .lower), │ │165 + .event = .{ │ │166 .issue = .{ │ │167 .title = "Double clicking causes the form to submit twice", │ │168 .description = "When I double click the post button I see duplicate posts.",│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────╮ │214 // rebase the branch so it no longer includes the edit event│ │215 // │ │216 │ │217 - const events_to_consume3 = [_]evt.Event{ │ │217 + const events_to_consume3 = [_]evt.EventWithId{ │ │218 events_to_consume[2], │ │219 events_to_consume[3], │ │220 }; │ ╰─────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │285 const first_issue = try evt.read(evt.Issue, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │286 │ │287 // the description is no longer edited │ │288 - try std.testing.expectEqualStrings(events_to_consume[0].data.issue.?.description, first_issue.description); │ │288 + try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.description, first_issue.description); │ │289 │ │290 // the tags are no longer edited │ │291 - try std.testing.expectEqualStrings(events_to_consume[0].data.issue.?.tags, first_issue.tags); │ │291 + try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.tags, first_issue.tags); │ │292 │ │293 // an event added by the second push is no longer there because it was wiped out by the rebase │ │294 try std.testing.expect(null == try event_id_to_issue.getCursor(hash.hashInt(repo_opts.hash, &events_to_consume2[0].id)));│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │399 │ │400 var prng = std.Random.DefaultPrng.init(std.testing.random_seed); │ │401 │ │402 - const events_to_consume = [_]evt.Event{ │ │402 + const events_to_consume = [_]evt.EventWithId{ │ │403 .{ │ │404 - .id = std.fmt.bytesToHex(evt.Event.randomId(prng.random()), .lower), │ │405 - .data = .{ │ │404 + .id = std.fmt.bytesToHex(evt.EventWithId.randomId(prng.random()), .lower), │ │405 + .event = .{ │ │406 .issue = .{ │ │407 .title = "Login form clears password on validation error", │ │408 .description = "Submitting an invalid email address resets the password field. Preserve the field value and show an inline validation message.",│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │411 }, │ │412 }, │ │413 .{ │ │414 - .id = std.fmt.bytesToHex(evt.Event.randomId(prng.random()), .lower), │ │415 - .data = .{ │ │414 + .id = std.fmt.bytesToHex(evt.EventWithId.randomId(prng.random()), .lower), │ │415 + .event = .{ │ │416 .issue = .{ │ │417 .title = "Search results ignore archived project filter", │ │418 .description = "Filtering search results to active projects still returns issues from archived projects. Apply the archived flag before ranking results.",│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │421 }, │ │422 }, │ │423 .{ │ │424 - .id = std.fmt.bytesToHex(evt.Event.randomId(prng.random()), .lower), │ │425 - .data = .{ │ │424 + .id = std.fmt.bytesToHex(evt.EventWithId.randomId(prng.random()), .lower), │ │425 + .event = .{ │ │426 .issue = .{ │ │427 .title = "Issue list does not persist selected sort order", │ │428 .description = "Changing the issue list sort order is lost after refresh. Store the selected sort field and direction with the user's view preferences.",│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │495 const first_issue_map = try Repo.DB.HashMap(.read_only).init(first_issue_cursor); │ │496 const first_issue = try evt.read(evt.Issue, Repo.DB, repo_opts.hash, &arena, first_issue_map); │ │497 │ │498 - try std.testing.expectEqualStrings(events_to_consume[0].data.issue.?.description, first_issue.description); │ │499 - try std.testing.expectEqualStrings(events_to_consume[0].data.issue.?.tags, first_issue.tags); │ │498 + try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.description, first_issue.description);│ │499 + try std.testing.expectEqualStrings(events_to_consume[0].event.issue.?.tags, first_issue.tags); │ │500 } │ │501 │ │502 // │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯