From b415043b4e8169d5b2ce90d52995e63158dd60db Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Wed, 5 Mar 2025 16:37:38 +0100 Subject: [PATCH] Add E2E test for browser extension credential create flow (#643) --- .../chrome/src/contentScript/Popup.ts | 1 + .../src/shared/__tests__/AppInfo.test.ts | 1 + docs/misc/release/create-new-release.md | 3 +- .../Main/Layout/DbStatusIndicator.razor | 2 +- .../Common/BrowserExtensionPlaywrightTest.cs | 175 +++++++++++++++ .../Tests/Extensions/ChromeExtensionTests.cs | 210 ++++++++---------- 6 files changed, 267 insertions(+), 125 deletions(-) create mode 100644 src/Tests/AliasVault.E2ETests/Common/BrowserExtensionPlaywrightTest.cs diff --git a/browser-extensions/chrome/src/contentScript/Popup.ts b/browser-extensions/chrome/src/contentScript/Popup.ts index 86b509474..a1b3f2816 100644 --- a/browser-extensions/chrome/src/contentScript/Popup.ts +++ b/browser-extensions/chrome/src/contentScript/Popup.ts @@ -866,6 +866,7 @@ export async function createEditNamePopup(defaultName: string): Promise { // Create modal overlay const overlay = document.createElement('div'); + overlay.id = 'aliasvault-create-popup'; overlay.style.cssText = ` position: fixed; top: 0; diff --git a/browser-extensions/chrome/src/shared/__tests__/AppInfo.test.ts b/browser-extensions/chrome/src/shared/__tests__/AppInfo.test.ts index caa6f464c..6b72cceae 100644 --- a/browser-extensions/chrome/src/shared/__tests__/AppInfo.test.ts +++ b/browser-extensions/chrome/src/shared/__tests__/AppInfo.test.ts @@ -30,6 +30,7 @@ describe('AppInfo', () => { it('should reject lower versions', () => { expect(AppInfo.versionGreaterThanOrEqualTo('1.0.0', '1.0.1')).toBe(false); + expect(AppInfo.versionGreaterThanOrEqualTo('1.0.0', '1.4.1')).toBe(false); expect(AppInfo.versionGreaterThanOrEqualTo('1.4.0', '1.5.0')).toBe(false); expect(AppInfo.versionGreaterThanOrEqualTo('1.9.9', '2.0.0')).toBe(false); }); diff --git a/docs/misc/release/create-new-release.md b/docs/misc/release/create-new-release.md index 76efc9b0e..963f73d51 100644 --- a/docs/misc/release/create-new-release.md +++ b/docs/misc/release/create-new-release.md @@ -11,7 +11,8 @@ Follow the steps in the checklist below to prepare a new release. ## Versioning client and server - [ ] Update ./src/Shared/AliasVault.Shared.Core/AppInfo.cs and update major/minor/patch to the new version. This version will be shown in the client and admin app footer. This version should be equal to the git release tag. -- [ ] Update ./src/Shared/AliasVault.Shared.Core/AppInfo.cs with the minimum supported client versions (in case API output breaks earlier client versions). +- [ ] Update ./src/Shared/AliasVault.Shared.Core/AppInfo.cs with the minimum supported client versions. + - In case API output breaks earlier client versions and/or this version of the client/API will upgrade the client vault model to a new major version. - [ ] Update ./install.sh `@version` in header if the install script has changed. This allows the install script to self-update when running the `./install.sh update` command on default installations. - [ ] Update README.md install.sh download link to point to the new release version diff --git a/src/AliasVault.Client/Main/Layout/DbStatusIndicator.razor b/src/AliasVault.Client/Main/Layout/DbStatusIndicator.razor index 13df07eb0..568e35754 100644 --- a/src/AliasVault.Client/Main/Layout/DbStatusIndicator.razor +++ b/src/AliasVault.Client/Main/Layout/DbStatusIndicator.razor @@ -5,7 +5,7 @@ @if (!Loading) { -