From 1c2bbd042da56df82309eb158ebed00ff4e393fd Mon Sep 17 00:00:00 2001 From: Kacper Michalik Date: Thu, 2 Nov 2023 10:40:49 +0100 Subject: [PATCH] fix: backwards test for prod versions --- .github/workflows/check-visual-regression.yml | 2 +- packages/common/package-lock.json | 107 +----------------- .../src/tests/backwardsCompatibility.test.ts | 6 +- 3 files changed, 6 insertions(+), 109 deletions(-) diff --git a/.github/workflows/check-visual-regression.yml b/.github/workflows/check-visual-regression.yml index 1edc35e5d6..e597f7e1a7 100644 --- a/.github/workflows/check-visual-regression.yml +++ b/.github/workflows/check-visual-regression.yml @@ -17,7 +17,7 @@ jobs: - name: "Print OS" run: echo ${{ matrix.os }} - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 # Required to retrieve git history diff --git a/packages/common/package-lock.json b/packages/common/package-lock.json index c09c2b950a..e8072bf098 100644 --- a/packages/common/package-lock.json +++ b/packages/common/package-lock.json @@ -11,8 +11,7 @@ "dependencies": { "@peculiar/webcrypto": "1.4.3", "cross-env": "^5.2.0", - "debug": "^4.3.1", - "pkijs": "^3.0.8" + "debug": "^4.3.1" }, "devDependencies": { "@types/jest": "^26.0.23", @@ -4563,63 +4562,6 @@ "node": ">=8" } }, - "node_modules/pkijs": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/pkijs/-/pkijs-3.0.15.tgz", - "integrity": "sha512-n7nAl9JpqdeQsjy+rPmswkmZ3oO/Fu5uN9me45PPQVdWjd0X7HKfL8+HYwfxihqoDSSPUIajkOcqFxEUxMqhwQ==", - "dependencies": { - "asn1js": "^3.0.5", - "bytestreamjs": "^2.0.0", - "pvtsutils": "^1.3.2", - "pvutils": "^1.1.3", - "tslib": "^2.4.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/pkijs/node_modules/asn1js": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", - "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", - "dependencies": { - "pvtsutils": "^1.3.2", - "pvutils": "^1.1.3", - "tslib": "^2.4.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/pkijs/node_modules/bytestreamjs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/bytestreamjs/-/bytestreamjs-2.0.1.tgz", - "integrity": "sha512-U1Z/ob71V/bXfVABvNr/Kumf5VyeQRBEm6Txb0PQ6S7V5GpBM3w4Cbqz/xPDicR5tN0uvDifng8C+5qECeGwyQ==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/pkijs/node_modules/pvtsutils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", - "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", - "dependencies": { - "tslib": "^2.6.1" - } - }, - "node_modules/pkijs/node_modules/pvutils": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", - "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/pkijs/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -9896,53 +9838,6 @@ "find-up": "^4.0.0" } }, - "pkijs": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/pkijs/-/pkijs-3.0.15.tgz", - "integrity": "sha512-n7nAl9JpqdeQsjy+rPmswkmZ3oO/Fu5uN9me45PPQVdWjd0X7HKfL8+HYwfxihqoDSSPUIajkOcqFxEUxMqhwQ==", - "requires": { - "asn1js": "^3.0.5", - "bytestreamjs": "^2.0.0", - "pvtsutils": "^1.3.2", - "pvutils": "^1.1.3", - "tslib": "^2.4.0" - }, - "dependencies": { - "asn1js": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", - "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", - "requires": { - "pvtsutils": "^1.3.2", - "pvutils": "^1.1.3", - "tslib": "^2.4.0" - } - }, - "bytestreamjs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/bytestreamjs/-/bytestreamjs-2.0.1.tgz", - "integrity": "sha512-U1Z/ob71V/bXfVABvNr/Kumf5VyeQRBEm6Txb0PQ6S7V5GpBM3w4Cbqz/xPDicR5tN0uvDifng8C+5qECeGwyQ==" - }, - "pvtsutils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", - "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", - "requires": { - "tslib": "^2.6.1" - } - }, - "pvutils": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", - "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==" - }, - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - } - } - }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", diff --git a/packages/e2e-tests/src/tests/backwardsCompatibility.test.ts b/packages/e2e-tests/src/tests/backwardsCompatibility.test.ts index 3a5ebde1a9..cc7c731ee6 100644 --- a/packages/e2e-tests/src/tests/backwardsCompatibility.test.ts +++ b/packages/e2e-tests/src/tests/backwardsCompatibility.test.ts @@ -19,8 +19,8 @@ describe('Backwards Compatibility', () => { let generalChannel: Channel let secondChannel: Channel let messagesToCompare: WebElement[] - let sidebar: Sidebar + const dataDir = `e2e_${(Math.random() * 10 ** 18).toString(36)}` const communityName = 'testcommunity' const ownerUsername = 'bob' @@ -28,6 +28,8 @@ describe('Backwards Compatibility', () => { const loopMessages = 'abc'.split('') const newChannelName = 'mid-night-club' + const isAlpha = process.env.FILE_NAME?.toString().includes('alpha') + beforeAll(async () => { ownerAppOldVersion = new App({ dataDir, fileName: 'Quiet-1.2.0-copy.AppImage' }) }) @@ -147,7 +149,7 @@ describe('Backwards Compatibility', () => { await ownerAppNewVersion.open() }) - if (process.env.TEST_MODE) { + if (process.env.TEST_MODE && isAlpha) { it('Close debug modal', async () => { const debugModal = new DebugModeModal(ownerAppNewVersion.driver) await debugModal.close()