|
| 1 | +import type { Snap, Member, Store } from "../types/shared"; |
| 2 | + |
| 3 | +export const accountResponse = { |
| 4 | + publisher: { |
| 5 | + email: "john.doe@canonical.com", |
| 6 | + fullname: "John Doe", |
| 7 | + has_stores: true, |
| 8 | + indentity_url: "https://login.ubuntu.com/+id/test-user-id", |
| 9 | + image: null, |
| 10 | + is_canonical: true, |
| 11 | + nickname: "johndoe", |
| 12 | + }, |
| 13 | +}; |
| 14 | + |
| 15 | +export const snapsResponse = [ |
| 16 | + { |
| 17 | + essential: true, |
| 18 | + id: "test-snap-id", |
| 19 | + "latest-release": { |
| 20 | + channel: "stable", |
| 21 | + revision: 2, |
| 22 | + timestamp: "2018-04-01T12:37:37.926251+00:00", |
| 23 | + version: "1.0.2", |
| 24 | + }, |
| 25 | + name: "test-snap-name", |
| 26 | + "other-stores": ["test-other-store-1", "test-other-store-2"], |
| 27 | + private: false, |
| 28 | + store: "test-store-id", |
| 29 | + users: [ |
| 30 | + { |
| 31 | + displayname: "John Doe", |
| 32 | + roles: ["owner"], |
| 33 | + username: "johndoe", |
| 34 | + }, |
| 35 | + ], |
| 36 | + }, |
| 37 | + { |
| 38 | + essential: true, |
| 39 | + id: "test-snap-id-2", |
| 40 | + "latest-release": { |
| 41 | + channel: "stable", |
| 42 | + revision: 2, |
| 43 | + timestamp: "2018-04-01T12:37:37.926251+00:00", |
| 44 | + version: "1.0.2", |
| 45 | + }, |
| 46 | + name: "test-snap-name-2", |
| 47 | + "other-stores": ["test-other-store-1", "test-other-store-2"], |
| 48 | + private: false, |
| 49 | + store: "test-store-id", |
| 50 | + users: [ |
| 51 | + { |
| 52 | + displayname: "John Doe", |
| 53 | + roles: ["owner"], |
| 54 | + username: "johndoe", |
| 55 | + }, |
| 56 | + ], |
| 57 | + }, |
| 58 | + { |
| 59 | + essential: false, |
| 60 | + id: "test-snap-id-included", |
| 61 | + "latest-release": { |
| 62 | + channel: "edge", |
| 63 | + revision: 806, |
| 64 | + timestamp: "2025-02-14T10:47:54.153305+00:00", |
| 65 | + version: "0+git.d2171a4", |
| 66 | + }, |
| 67 | + name: "test-snap-name-included", |
| 68 | + "other-stores": ["test-other-store-3"], |
| 69 | + private: false, |
| 70 | + store: "ubuntu", |
| 71 | + users: [ |
| 72 | + { |
| 73 | + displayname: "Jane Doe", |
| 74 | + roles: ["owner"], |
| 75 | + username: "janedoe", |
| 76 | + }, |
| 77 | + ], |
| 78 | + }, |
| 79 | +] as Snap[]; |
| 80 | + |
| 81 | +export const membersResponse = [ |
| 82 | + { |
| 83 | + displayname: "John Doe", |
| 84 | + email: "john.doe@canonical.com", |
| 85 | + id: "john-doe-id", |
| 86 | + roles: ["admin", "review", "view", "access"], |
| 87 | + username: "johndoe", |
| 88 | + }, |
| 89 | +] as Member[]; |
| 90 | + |
| 91 | +export const storesResponse = [ |
| 92 | + { |
| 93 | + id: "ubuntu", |
| 94 | + name: "Global", |
| 95 | + roles: ["admin", "review", "view", "access"], |
| 96 | + snaps: [], |
| 97 | + }, |
| 98 | + { |
| 99 | + id: "test-store-id", |
| 100 | + name: "Test store", |
| 101 | + roles: ["admin", "review", "view", "access"], |
| 102 | + snaps: [], |
| 103 | + }, |
| 104 | +] as Store[]; |
| 105 | + |
| 106 | +export const searchResponse = [ |
| 107 | + { |
| 108 | + essential: false, |
| 109 | + id: "test-snap-id-search", |
| 110 | + "latest-release": { |
| 111 | + channel: "edge", |
| 112 | + revision: 806, |
| 113 | + timestamp: "2025-02-14T10:47:54.153305+00:00", |
| 114 | + version: "0+git.d2171a4", |
| 115 | + }, |
| 116 | + name: "test-snap-name-search", |
| 117 | + "other-stores": ["test-other-store-3"], |
| 118 | + private: false, |
| 119 | + store: "ubuntu", |
| 120 | + users: [ |
| 121 | + { |
| 122 | + displayname: "Jane Doe", |
| 123 | + roles: ["owner"], |
| 124 | + username: "janedoe", |
| 125 | + }, |
| 126 | + ], |
| 127 | + }, |
| 128 | +] as Snap[]; |
0 commit comments