8589 Commits

Author SHA1 Message Date
Abhijay Jain
65dc0a761d (Refactor) : Converted Selenium test for CanUseRoleManager and Others to playwright (#6996)
* refactor: resovled merge conflict

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* (Refactor): Removed Selenium Test for CanUseRoleManager

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* Refactor : removed spacing and extra alert message

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* (Test):Converted/Added Playwright Test for CanSigninWithLoginCode

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* (Refactor): Removed Selenium Test for CanSigninWithLoginCode

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* fix: updated UIServerController.Roles.cs to handle storeID

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* refactor : updated some minor nits

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* Fix: Preserve store context when deleting server-wide roles from store page

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* refactor: fix auth mismatch in role Edit/Remove links for store context

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

---------

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
2025-11-27 18:47:32 +09:00
psam21
ab6aa1e920 Fix clipboard copy for fiat amounts and other numeric values (#7011)
Co-authored-by: rockstardev <5191402+rockstardev@users.noreply.github.com>
2025-11-26 23:02:09 -06:00
Abhijay Jain
03349b6ffe feat : add functionality to download language pack (#6943)
* refactor : added link to translations files

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* feat : added ability to download langauge pack

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* refactor: removed link for the edit page

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* refactor: server-side downloading instead of JavaScript

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* refactor : addressed request changes

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* refactor: updated GetDictionary method and other changes

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

---------

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
2025-11-26 22:26:24 +09:00
monicamuyama
5a487985f4 Issue 6918 re enable plugin (#6930)
* Added the enable button on disabled plugins

* Added the disable function and button for installed plugins

* Changes based on the coderabbitai comments

* Removed markers and added the disable in the same if block as the unistall

* Hide the uninstall button when plugin is queued for enabling

* Removed the duplicate enale function

* Removed the disable button for installed plugins

* Removed the disableplugin functions as they are no longer needed

* Trigger CI pipeline after dotnet restore

* reverted the git ignore
2025-11-21 05:23:12 -06:00
Nicolas Dorier
0a518320ea Fix missing assignation 2025-11-21 10:28:57 +09:00
Nicolas Dorier
b4154bed2f Merge branch 'test-load-context' 2025-11-21 09:11:12 +09:00
Nicolas Dorier
e002f59f4c Tests: All plugin integration tests to resolve plugin's types
Reported by @napoly

In an integration test for a plugin, attempt to resolve a type provided by that plugin using `BTCPayServerTester`.

For example:
```
tester.GetService<MoneroRPCProvider>();
```

The type should be resolved successfully.

The type fails to resolve.

During the test run, the dotnet runtime attempts to load `MoneroRPCProvider` in the default load context (`AssemblyLoadContext.Default`). It locates the plugin assembly in the test directory and loads it there.

In contrast, when BTCPay Server loads a plugin, it creates a dedicated plugin load context, and the plugin’s `MoneroRPCProvider` is loaded inside that context. This results in two distinct `MoneroRPCProvider` types: one in the default context and one in the plugin context.

This PR forces the plugin context, during integration tests, to load the types it resolves into the default assembly context rather than its own. This prevents duplicate type definitions.

As a side effect, behavior may differ slightly between running BTCPay Server normally and running tests, but this should be acceptable in most cases.

Relevant discussion: #6851
2025-11-21 09:11:01 +09:00
Nicolas Dorier
4e34a185b8 Fix flacky CanUseForms 2025-11-21 09:08:23 +09:00
Nicolas Dorier
50b5c9a2b9 Merge branch 'pending-invoice' 2025-11-19 15:01:02 +09:00
Nicolas Dorier
2f8be8c9f0 Add a 'Pending invoice' pill in portal subscription when invoice processing 2025-11-19 15:00:39 +09:00
Nicolas Dorier
0e649a68bf Add buyerEmail to invoice metadata created by suscribers 2025-11-19 14:46:00 +09:00
Nicolas Dorier
414c71ec09 Merge branch 'validate-scope' 2025-11-18 18:46:14 +09:00
Nicolas Dorier
6b76af4363 Improve test 2025-11-18 18:45:59 +09:00
Nicolas Dorier
f8b971fb33 Merge pull request #7004 from NicolasDorier/fix-css
Fix: SVG icons stop displaying when served from cache (#7003)
2025-11-18 18:32:29 +09:00
Nicolas Dorier
c97ddd168c Fix: SVG icons stop displaying when served from cache (#7003)
See #7003

The fix seems to be to just reinsert the svg into the page once it is
loaded. This is probably a browser bug...
2025-11-18 18:32:10 +09:00
Nicolas Dorier
ccbc061434 Remove LocalBTCPayClient 2025-11-18 15:24:08 +09:00
Nicolas Dorier
749c772218 Validate scopes of service injections in tests 2025-11-15 22:46:14 +09:00
Nicolas Dorier
62552a7bfe Merge pull request #7000 from NicolasDorier/fix-linkgenerator
Fix: Spurious EF error on CallbackGenerator
2025-11-14 23:00:57 +09:00
Nicolas Dorier
c9dcd4f0a4 Fix: Spurious EF error on CallbackGenerator 2025-11-14 22:48:18 +09:00
Nicolas Dorier
01f478e680 Merge pull request #6997 from NicolasDorier/loginrules
Feature: Plugin can extend whether an account can login or not
2025-11-14 22:22:48 +09:00
Nicolas Dorier
41f5588257 Feature: Plugin can extend whether an account can login or not 2025-11-14 18:00:20 +09:00
Nicolas Dorier
a914d798f3 Fix CI: Unsupported repository version 1. Only versions up to 0 are supported. 2025-11-14 16:34:59 +09:00
Nicolas Dorier
2926dc402b Fix node menu link style 2025-11-14 09:01:30 +09:00
Nicolas Dorier
f3184c35b4 Merge pull request #6995 from Abhijay007/SeleniumToPlaywright/CanChangeUserRolesAndOthers
(Refactor) : Converted Selenium test for `CanAccessUserStoreAsAdmin` and Others to playwright
2025-11-13 22:18:31 +09:00
Abhijay007
cc0570f0ef refactor : addressed requested changes
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
2025-11-13 13:12:32 +00:00
Abhijay007
1bbb95084e refactor : addressed requested changes
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
2025-11-13 12:50:27 +00:00
Abhijay007
f26f42ba05 refactor: updated test
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
2025-11-13 10:57:28 +00:00
Abhijay jain
da53f3a580 (Refactor): Removed Selenium Test for CanChangeUserRoles
Signed-off-by: Abhijay jain <Abhijay007j@gmail.com>
2025-11-13 10:32:17 +00:00
Abhijay jain
89acda4f3e (Test):Converted/Added Playwright Test for CanChangeUserRoles
Signed-off-by: Abhijay jain <Abhijay007j@gmail.com>
2025-11-13 10:31:11 +00:00
Abhijay jain
edac1e7e5d (Refactor): Removed Selenium Test for CanAccessUserStoreAsAdmin
Signed-off-by: Abhijay jain <Abhijay007j@gmail.com>
2025-11-13 10:30:52 +00:00
Abhijay jain
bb7d14f71f (Test):Converted/Added Playwright Test for CanAccessUserStoreAsAdmin
Signed-off-by: Abhijay jain <Abhijay007j@gmail.com>
2025-11-13 10:30:34 +00:00
Nicolas Dorier
4afb608eb8 Merge pull request #6990 from NicolasDorier/email-test
Refactor: Move all email tests to same class EmailTests
2025-11-12 17:06:00 +09:00
Nicolas Dorier
955dd63512 Refactor: Move all email tests to same class EmailTests 2025-11-12 16:11:56 +09:00
Nicolas Dorier
c06617a498 Merge pull request #6988 from NicolasDorier/ui-extension-registry
Refactor: Add UIExtensionsRegistry
2025-11-12 12:07:11 +09:00
Nicolas Dorier
2bfcaaea7d Merge pull request #6987 from NicolasDorier/refact-mails
Refactor: Move email services to the email plugin directory
2025-11-12 11:55:30 +09:00
Nicolas Dorier
52a73d4dd3 Refactor: Add UIExtensionsRegistry
The component UIExtensionPoint was injecting IEnumerable<IUIExtension>
and then filtering on those.
As the number of IUIExtension grows, this operation grows at O(n).

Now we use UIExtensionsRegistry instead which use lookups. O(1)
2025-11-12 11:52:08 +09:00
Nicolas Dorier
b6c635c29b Refactor: Move email services to the email plugin directory 2025-11-12 11:35:04 +09:00
Nicolas Dorier
666896df5c Merge pull request #6979 from NicolasDorier/server-email-rules
Add Server Email Rules
2025-11-12 08:52:23 +09:00
Nicolas Dorier
46156a5a39 Remove the store invitation notification to store owners 2025-11-12 08:49:48 +09:00
Nicolas Dorier
894643c5a3 Fix: When running more than one test in a test run, only the first would load plugins correctly (#6985)
Reported by @napoly.

## Actual behavior

Two tests were created. When we would run the tests through the runner,
ASP.NET wouldn't find the registered view of the plugin.

## Expected behavior

The second test should works find, ASP.NET should properly find the
views of the plugin when there are more than one test in the same test
run.

## Cause

If we detected that a plugin assemly was already in the AppDomain, then
we were not loading the ApplicationParts of such assembly.
This wasn't the case for the first test run, but would be after.

The reason for initially doing this was that long time ago, we would
test plugins by referencing them from BTCPaySevrer project. But since
this is not how we are doing things anymore, I think it is safe to
remove this "Feature".
This feature was broken anyway since we started loading plugins in their
own context, but this wouldn't happen with the old way of referencing
plugins from BTCPayServer. (#6851)
2025-11-12 00:15:31 +09:00
Abhijay Jain
2ca06c6614 (Refactor) : Converted Selenium test for CanCreateStores and Others to playwright (#6938)
* refactor : resolved merge conflicts

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* (Refactor): Removed Selenium Test for CanCreateStores

Signed-off-by: Abhijay jain <Abhijay007j@gmail.com>

* (Test):Converted/Added Playwright Test for CanUseCoinSelection

Signed-off-by: Abhijay jain <Abhijay007j@gmail.com>

* (Refactor): Removed Selenium Test for CanUseCoinSelection

Signed-off-by: Abhijay jain <Abhijay007j@gmail.com>

* refactor: resolved merge conflicts

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* refactor: resolved merge conflicts

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* refactor : resolved minor issues

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* refactor : updated tests

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* refactor: updated test

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* refactor: addressed requested changes

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

* refactor: addressed requested changes

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>

---------

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Signed-off-by: Abhijay jain <Abhijay007j@gmail.com>
2025-11-11 10:26:45 +09:00
Nicolas Dorier
3948eb13cd Add default server email rules in migration 2025-11-10 17:24:27 +09:00
Nicolas Dorier
dcf60e20b9 Add CC and BCC to emails 2025-11-10 17:24:27 +09:00
Nicolas Dorier
d7fcd55707 Add invite and confirmation emails 2025-11-10 17:24:27 +09:00
Nicolas Dorier
88d3e7ad55 Fix: Rich TextBox (Summernote) not saving changes in code-view
The richtext box had an annoying bug: If you switch to code view, modify
the code then save, the changes would be ignored.

One had to switch back to preview mode prior to save. (See
summernote/summernote#94 for more details)
2025-11-10 17:24:27 +09:00
Nicolas Dorier
b7aed3e3d8 Add Server Email Rules 2025-11-10 17:24:27 +09:00
Abhijay Jain
999bd4db41 (Refactor) : Converted Selenium test for CanUsePairing and Others to playwright (#6927) 2025-11-05 17:24:58 +09:00
Nicolas Dorier
849b27cf49 Do not save cache of rates in the database (#6978)
We were previously saving the rates in the database in a JSONB blob
column. However, the volume of data ise consequential enough for
provoking timeouts during update.

Due to how postgres works, this also create bloat in the database that
isn't cleaned immediately.

This PR fixes this issue by saving the cache in files instead.
2025-11-05 16:54:34 +09:00
Nicolas Dorier
1411745265 Refactor ToggleUser->SetDisabled (#6975) 2025-11-05 09:39:33 +09:00
Nicolas Dorier
5a5b0c21a4 Fix: Denied 403 page if denied access to default store (#6976)
If a user go to store A, then lose access to store A, any attempt to
browse the home page will return a 403 error.

The user would then get stuck, unable to select a new store until he
clears the cache.
2025-11-05 09:26:36 +09:00