diff --git a/mobile/rpc-foundation/goldens/tk-item-detail-github-reactions.json b/mobile/rpc-foundation/goldens/tk-item-detail-github-reactions.json new file mode 100644 index 00000000000..fbf340a4a62 --- /dev/null +++ b/mobile/rpc-foundation/goldens/tk-item-detail-github-reactions.json @@ -0,0 +1,255 @@ +{ + "operation": "tasks.item-detail-github", + "family": "tasks.item-detail-github", + "namedDeltas": [], + "runnerVersion": 1, + "baseline": "4b876758d3158a8eb6b798055d8db7c58d1cd4a9", + "lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571", + "recorderSha256": "d4fa125899cd863c03dbf96657d46b8c7d6c0ccf522b342bc4f164ed1e3becfe", + "adapterSha256": "c0ef16b959002e4a3c5347114a0844b95670e274ef010d910b6671ac5f49e783", + "scenarioSha256": "885dafb68162f5777fc050af34dbe3443940d041a45bfb18c51dfcf433ed54f3", + "platform": "darwin", + "scenarioVersion": 1, + "projectionVersion": 2, + "goldenFormatVersion": 5, + "values": { + "19e10d5e8599": { + "error": "", + "item": { + "provider": "github", + "source": { + "id": "github:pr:12", + "labels": ["bug"], + "latestReviews": [], + "number": 12, + "repoId": "repo-1", + "reviewDecision": { + "$rpc": "null" + }, + "reviewRequests": [], + "state": "open", + "type": "pr" + }, + "title": "A pull request" + }, + "items": [ + { + "provider": "github", + "source": { + "id": "github:pr:12", + "labels": ["bug"], + "latestReviews": [], + "number": 12, + "repoId": "repo-1", + "reviewDecision": { + "$rpc": "null" + }, + "reviewRequests": [], + "state": "open", + "type": "pr" + }, + "title": "A pull request" + } + ], + "loading": false, + "payload": { + "assignees": ["octocat"], + "baseSha": "base-sha", + "body": "body", + "checks": [], + "comments": [ + { + "author": "octocat", + "authorAvatarUrl": "", + "body": "a review comment", + "createdAt": "2020-01-01T00:00:00.000Z", + "id": 901, + "reactions": [ + { + "content": "+1", + "count": 3 + }, + { + "content": "heart", + "count": 1 + } + ], + "url": "https://github.com/owner/repo/pull/12#issuecomment-901" + } + ], + "files": [], + "headSha": "head-sha", + "labels": ["bug"], + "latestReviews": [], + "provider": "github", + "pullRequestId": "PR_kwDO", + "reviewDecision": "APPROVED", + "reviewRequests": [] + } + }, + "264010756b38": { + "name": "detailLoading", + "ordinal": 3, + "value": true + }, + "33614c90b6eb": { + "name": "detailPayload", + "ordinal": 1, + "value": { + "$rpc": "null" + } + }, + "3e81549611f6": { + "name": "github.workItemDetails#1", + "ordinal": 4, + "args": [ + { + "name": "method", + "value": "github.workItemDetails" + }, + { + "name": "params", + "value": { + "number": 12, + "repo": "id:repo-1", + "type": "pr" + } + }, + { + "name": "options", + "value": { + "timeoutMs": 30000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "assignees": ["octocat"], + "baseSha": "base-sha", + "body": "body", + "checks": [], + "comments": [ + { + "author": "octocat", + "authorAvatarUrl": "", + "body": "a review comment", + "createdAt": "2020-01-01T00:00:00.000Z", + "id": 901, + "reactions": [ + { + "content": "+1", + "count": 3 + }, + { + "content": "heart", + "count": 1 + } + ], + "url": "https://github.com/owner/repo/pull/12#issuecomment-901" + } + ], + "files": [], + "headSha": "head-sha", + "item": { + "labels": ["bug"], + "latestReviews": [], + "reviewDecision": "APPROVED", + "reviewRequests": [] + }, + "pullRequestId": "PR_kwDO" + } + } + } + }, + "5d06a9d9f7ea": { + "name": "github.workItemDetails#1", + "ordinal": 5, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.workItemDetails\",\"params\":{\"repo\":\"id:repo-1\",\"number\":12,\"type\":\"pr\"}}" + }, + "7816d31432b8": { + "name": "detailLoading", + "ordinal": 7, + "value": false + }, + "a4f1a8696a24": { + "name": "detailError", + "ordinal": 2, + "value": "" + }, + "e56f8c6b3c42": { + "name": "detailPayload", + "ordinal": 6, + "value": { + "assignees": ["octocat"], + "baseSha": "base-sha", + "body": "body", + "checks": [], + "comments": [ + { + "author": "octocat", + "authorAvatarUrl": "", + "body": "a review comment", + "createdAt": "2020-01-01T00:00:00.000Z", + "id": 901, + "reactions": [ + { + "content": "+1", + "count": 3 + }, + { + "content": "heart", + "count": 1 + } + ], + "url": "https://github.com/owner/repo/pull/12#issuecomment-901" + } + ], + "files": [], + "headSha": "head-sha", + "labels": ["bug"], + "latestReviews": [], + "provider": "github", + "pullRequestId": "PR_kwDO", + "reviewDecision": "APPROVED", + "reviewRequests": [] + } + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + } + }, + "recording": { + "scenario": "tk-item-detail-github-reactions", + "checkpoints": [ + { + "id": "mounted", + "observation": { + "sender": ["3e81549611f6"], + "payloads": ["5d06a9d9f7ea"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "19e10d5e8599", + "effects": [ + "33614c90b6eb", + "a4f1a8696a24", + "264010756b38", + "e56f8c6b3c42", + "7816d31432b8" + ] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/tk-item-detail-gitlab-reactions.json b/mobile/rpc-foundation/goldens/tk-item-detail-gitlab-reactions.json new file mode 100644 index 00000000000..a944da396f0 --- /dev/null +++ b/mobile/rpc-foundation/goldens/tk-item-detail-gitlab-reactions.json @@ -0,0 +1,303 @@ +{ + "operation": "tasks.item-detail-gitlab", + "family": "tasks.item-detail-gitlab", + "namedDeltas": [], + "runnerVersion": 1, + "baseline": "4b876758d3158a8eb6b798055d8db7c58d1cd4a9", + "lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571", + "recorderSha256": "d4fa125899cd863c03dbf96657d46b8c7d6c0ccf522b342bc4f164ed1e3becfe", + "adapterSha256": "c0ef16b959002e4a3c5347114a0844b95670e274ef010d910b6671ac5f49e783", + "scenarioSha256": "c49d2df6c31f37c488ce9d29a801dd8ad0aa668ae380fc60b1f790ef508281d8", + "platform": "darwin", + "scenarioVersion": 1, + "projectionVersion": 2, + "goldenFormatVersion": 5, + "values": { + "04f934425ed7": { + "error": "", + "item": { + "provider": "gitlab", + "source": { + "checksSummary": { + "failed": 0, + "neutral": 0, + "passed": 0, + "pending": 0, + "state": "none", + "total": 0 + }, + "id": "gitlab:issue:4", + "labels": ["bug"], + "mergeable": "MERGEABLE", + "number": 4, + "projectRef": "group/project", + "repoId": "repo-1", + "reviewDecision": "approved", + "reviewerCount": 0, + "state": "opened", + "type": "issue" + }, + "title": "A GitLab issue" + }, + "items": [ + { + "provider": "gitlab", + "source": { + "checksSummary": { + "failed": 0, + "neutral": 0, + "passed": 0, + "pending": 0, + "state": "none", + "total": 0 + }, + "id": "gitlab:issue:4", + "labels": ["bug"], + "mergeable": "MERGEABLE", + "number": 4, + "projectRef": "group/project", + "repoId": "repo-1", + "reviewDecision": "approved", + "reviewerCount": 0, + "state": "opened", + "type": "issue" + }, + "title": "A GitLab issue" + } + ], + "loading": false, + "payload": { + "assignees": [], + "body": "body", + "comments": [ + { + "author": "octocat", + "authorAvatarUrl": "", + "body": "a discussion note", + "createdAt": "2020-01-01T00:00:00.000Z", + "id": 901, + "reactions": [ + { + "count": 2, + "name": "thumbsup" + } + ], + "url": "https://gitlab.example.com/group/project/-/issues/4#note_901" + } + ], + "labels": ["bug"], + "pipelineJobs": [], + "provider": "gitlab" + } + }, + "1dc35b955ad0": { + "name": "gitlab.workItemDetails#1", + "ordinal": 5, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"gitlab.workItemDetails\",\"params\":{\"repo\":\"id:repo-1\",\"iid\":4,\"type\":\"issue\",\"projectRef\":\"group/project\"}}" + }, + "264010756b38": { + "name": "detailLoading", + "ordinal": 3, + "value": true + }, + "33614c90b6eb": { + "name": "detailPayload", + "ordinal": 1, + "value": { + "$rpc": "null" + } + }, + "5737a5c49d39": { + "name": "gitlab.workItemDetails#1", + "ordinal": 4, + "args": [ + { + "name": "method", + "value": "gitlab.workItemDetails" + }, + { + "name": "params", + "value": { + "iid": 4, + "projectRef": "group/project", + "repo": "id:repo-1", + "type": "issue" + } + }, + { + "name": "options", + "value": { + "timeoutMs": 30000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "approvalState": { + "approvalsLeft": 0, + "approvalsRequired": 1 + }, + "assignees": [], + "body": "body", + "comments": [ + { + "author": "octocat", + "authorAvatarUrl": "", + "body": "a discussion note", + "createdAt": "2020-01-01T00:00:00.000Z", + "id": 901, + "reactions": [ + { + "count": 2, + "name": "thumbsup" + } + ], + "url": "https://gitlab.example.com/group/project/-/issues/4#note_901" + } + ], + "item": { + "labels": ["bug"], + "mergeable": "MERGEABLE" + }, + "pipelineJobs": [], + "reviewers": [] + } + } + } + }, + "5a29c0f1892b": { + "name": "actionItem", + "ordinal": 7, + "value": { + "provider": "gitlab", + "source": { + "checksSummary": { + "failed": 0, + "neutral": 0, + "passed": 0, + "pending": 0, + "state": "none", + "total": 0 + }, + "id": "gitlab:issue:4", + "labels": ["bug"], + "mergeable": "MERGEABLE", + "number": 4, + "projectRef": "group/project", + "repoId": "repo-1", + "reviewDecision": "approved", + "reviewerCount": 0, + "state": "opened", + "type": "issue" + }, + "title": "A GitLab issue" + } + }, + "8ccd4fa759a5": { + "name": "detailLoading", + "ordinal": 9, + "value": false + }, + "a4f1a8696a24": { + "name": "detailError", + "ordinal": 2, + "value": "" + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "f960b61daf75": { + "name": "detailPayload", + "ordinal": 6, + "value": { + "assignees": [], + "body": "body", + "comments": [ + { + "author": "octocat", + "authorAvatarUrl": "", + "body": "a discussion note", + "createdAt": "2020-01-01T00:00:00.000Z", + "id": 901, + "reactions": [ + { + "count": 2, + "name": "thumbsup" + } + ], + "url": "https://gitlab.example.com/group/project/-/issues/4#note_901" + } + ], + "labels": ["bug"], + "pipelineJobs": [], + "provider": "gitlab" + } + }, + "fa9ae39d069e": { + "name": "items", + "ordinal": 8, + "value": [ + { + "provider": "gitlab", + "source": { + "checksSummary": { + "failed": 0, + "neutral": 0, + "passed": 0, + "pending": 0, + "state": "none", + "total": 0 + }, + "id": "gitlab:issue:4", + "labels": ["bug"], + "mergeable": "MERGEABLE", + "number": 4, + "projectRef": "group/project", + "repoId": "repo-1", + "reviewDecision": "approved", + "reviewerCount": 0, + "state": "opened", + "type": "issue" + }, + "title": "A GitLab issue" + } + ] + } + }, + "recording": { + "scenario": "tk-item-detail-gitlab-reactions", + "checkpoints": [ + { + "id": "mounted", + "observation": { + "sender": ["5737a5c49d39"], + "payloads": ["1dc35b955ad0"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "04f934425ed7", + "effects": [ + "33614c90b6eb", + "a4f1a8696a24", + "264010756b38", + "f960b61daf75", + "5a29c0f1892b", + "fa9ae39d069e", + "8ccd4fa759a5" + ] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/pilot-scenarios.json b/mobile/rpc-foundation/pilot-scenarios.json index b886a90c4b2..c8dde092fa4 100644 --- a/mobile/rpc-foundation/pilot-scenarios.json +++ b/mobile/rpc-foundation/pilot-scenarios.json @@ -11179,6 +11179,69 @@ } ] }, + { + "id": "tk-item-detail-github-reactions", + "operation": "tasks.item-detail-github", + "version": 1, + "family": "tasks.item-detail-github", + "sites": ["mobile/src/tasks/use-mobile-tasks-item-detail-loading.tsx"], + "schedules": [], + "steps": [ + { + "action": "mount", + "id": "mount" + }, + { + "complete": "github.workItemDetails#1", + "params": { + "number": 12, + "repo": "id:repo-1", + "type": "pr" + }, + "reply": { + "ok": true, + "result": { + "body": "body", + "comments": [ + { + "id": 901, + "author": "octocat", + "authorAvatarUrl": "", + "body": "a review comment", + "createdAt": "2020-01-01T00:00:00.000Z", + "url": "https://github.com/owner/repo/pull/12#issuecomment-901", + "reactions": [ + { + "content": "+1", + "count": 3 + }, + { + "content": "heart", + "count": 1 + } + ] + } + ], + "item": { + "labels": ["bug"], + "reviewDecision": "APPROVED", + "reviewRequests": [], + "latestReviews": [] + }, + "assignees": ["octocat"], + "headSha": "head-sha", + "baseSha": "base-sha", + "pullRequestId": "PR_kwDO", + "checks": [], + "files": [] + } + } + }, + { + "checkpoint": "mounted" + } + ] + }, { "id": "tk-item-detail-gitlab", "operation": "tasks.item-detail-gitlab", @@ -11223,6 +11286,65 @@ } ] }, + { + "id": "tk-item-detail-gitlab-reactions", + "operation": "tasks.item-detail-gitlab", + "version": 1, + "family": "tasks.item-detail-gitlab", + "sites": ["mobile/src/tasks/use-mobile-tasks-item-detail-loading.tsx"], + "schedules": [], + "steps": [ + { + "action": "mount", + "id": "mount" + }, + { + "complete": "gitlab.workItemDetails#1", + "params": { + "iid": 4, + "projectRef": "group/project", + "repo": "id:repo-1", + "type": "issue" + }, + "reply": { + "ok": true, + "result": { + "body": "body", + "comments": [ + { + "id": 901, + "author": "octocat", + "authorAvatarUrl": "", + "body": "a discussion note", + "createdAt": "2020-01-01T00:00:00.000Z", + "url": "https://gitlab.example.com/group/project/-/issues/4#note_901", + "reactions": [ + { + "name": "thumbsup", + "count": 2 + } + ] + } + ], + "item": { + "labels": ["bug"], + "mergeable": "MERGEABLE" + }, + "assignees": [], + "pipelineJobs": [], + "reviewers": [], + "approvalState": { + "approvalsRequired": 1, + "approvalsLeft": 0 + } + } + } + }, + { + "checkpoint": "mounted" + } + ] + }, { "id": "tk-item-detail-linear", "operation": "tasks.item-detail-linear",