mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 14:20:42 +08:00
Add visual test for outdated reviews
This commit is contained in:
committed by
Skyler Grey
parent
144fc42970
commit
9586853a99
@@ -245,12 +245,24 @@ export async function createSourceBrowsingFixture(
|
||||
await bob.stopNode();
|
||||
}
|
||||
|
||||
export async function createCobsFixture(peer: RadiclePeer) {
|
||||
export async function createCobsFixture(
|
||||
peerManager: PeerManager,
|
||||
peer: RadiclePeer,
|
||||
) {
|
||||
await peer.rad(["follow", peer.nodeId, "--alias", "palm"]);
|
||||
await Fs.mkdir(Path.join(tmpDir, "repos", "cobs"));
|
||||
const { repoFolder, defaultBranch } = await createRepo(peer, {
|
||||
const { repoFolder, rid, defaultBranch } = await createRepo(peer, {
|
||||
name: "cobs",
|
||||
});
|
||||
const eve = await peerManager.createPeer({
|
||||
name: "eve",
|
||||
gitOptions: gitOptions["eve"],
|
||||
});
|
||||
await eve.startNode({
|
||||
node: { ...defaultConfig.node, connect: [peer.address], alias: "eve" },
|
||||
});
|
||||
await eve.rad(["clone", rid], { cwd: eve.checkoutPath });
|
||||
|
||||
const issueOne = await issue.create(
|
||||
peer,
|
||||
"This `title` has **markdown**",
|
||||
@@ -474,7 +486,7 @@ export async function createCobsFixture(peer: RadiclePeer) {
|
||||
["patch", "label", patchThree, "--add", "documentation"],
|
||||
createOptions(repoFolder, 1),
|
||||
);
|
||||
await peer.rad(
|
||||
await eve.rad(
|
||||
["patch", "review", patchThree, "-m", "This looks better"],
|
||||
createOptions(repoFolder, 2),
|
||||
);
|
||||
@@ -612,6 +624,15 @@ export const gitOptions = {
|
||||
GIT_COMMITTER_EMAIL: "bob@radicle.xyz",
|
||||
GIT_COMMITTER_DATE: "1671627600",
|
||||
},
|
||||
|
||||
eve: {
|
||||
GIT_AUTHOR_NAME: "Eve Johnson",
|
||||
GIT_AUTHOR_EMAIL: "eve@radicle.xyz",
|
||||
GIT_AUTHOR_DATE: "1671125284",
|
||||
GIT_COMMITTER_NAME: "Eve Johnson",
|
||||
GIT_COMMITTER_EMAIL: "eve@radicle.xyz",
|
||||
GIT_COMMITTER_DATE: "1671627600",
|
||||
},
|
||||
};
|
||||
export const defaultConfig: Config = {
|
||||
publicExplorer: "https://app.radicle.xyz/nodes/$host/$rid$path",
|
||||
|
||||
@@ -92,7 +92,7 @@ export default async function globalSetup(): Promise<() => void> {
|
||||
console.log("Creating markdown fixture");
|
||||
await createMarkdownFixture(palm);
|
||||
console.log("Creating cobs fixture");
|
||||
await createCobsFixture(palm);
|
||||
await createCobsFixture(peerManager, palm);
|
||||
console.log("All fixtures created");
|
||||
} catch (error) {
|
||||
console.log("");
|
||||
|
||||
Reference in New Issue
Block a user