From 52c3e8f53c6beded28654862bb7668470d3ac03a Mon Sep 17 00:00:00 2001 From: Asaf Korem Date: Sun, 22 Sep 2024 11:34:59 +0300 Subject: [PATCH] another attempt --- detox/test/e2e/utils/snapshot.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/detox/test/e2e/utils/snapshot.js b/detox/test/e2e/utils/snapshot.js index 3ed8a32016..55683fab85 100644 --- a/detox/test/e2e/utils/snapshot.js +++ b/detox/test/e2e/utils/snapshot.js @@ -65,14 +65,14 @@ async function expectViewHierarchySnapshotToMatch(viewHierarchy, snapshotName) { async function expectSnapshotToMatch(value, snapshotName, _ignoreWhiteSpace = true) { const snapshotPath = `./e2e/assets/${snapshotName}.${rnMinorVer}.${device.getPlatform()}.txt`; - await execSync(`git checkout -b snapshot-${snapshotName} || git checkout snapshot-${snapshotName} && git rebase master`); + await execSync('git fetch origin'); + await execSync(`git checkout -b snapshot-${snapshotName} || git checkout snapshot-${snapshotName}`); await fs.writeFile(snapshotPath, value, 'utf8'); - await execSync(`git add ${snapshotPath}`); - await execSync(`git commit -m "snapshot ${snapshotName}"`); - // set upstream to origin - await execSync(`git push --set-upstream origin snapshot-${snapshotName}`); + // print filename and its contents: + console.log(`Snapshot file: ${snapshotPath}`); + console.log(value); } module.exports = {