diff --git a/BTCPayServer.Tests/SeleniumTester.cs b/BTCPayServer.Tests/SeleniumTester.cs index 3cd12046a..2c4f82e50 100644 --- a/BTCPayServer.Tests/SeleniumTester.cs +++ b/BTCPayServer.Tests/SeleniumTester.cs @@ -403,9 +403,9 @@ namespace BTCPayServer.Tests public void GoToWalletSettings(string cryptoCode = "BTC") { Driver.FindElement(By.Id($"StoreNav-Wallet{cryptoCode}")).Click(); - if (Driver.PageSource.Contains("id=\"SectionNav-Settings\"")) + if (Driver.PageSource.Contains("id=\"WalletNav-Settings\"")) { - Driver.FindElement(By.Id("SectionNav-Settings")).Click(); + Driver.FindElement(By.Id("WalletNav-Settings")).Click(); } } @@ -565,7 +565,7 @@ namespace BTCPayServer.Tests Driver.Navigate().GoToUrl(new Uri(ServerUri, $"wallets/{walletId}")); if (navPages != WalletsNavPages.Transactions) { - Driver.FindElement(By.Id($"SectionNav-{navPages}")).Click(); + Driver.FindElement(By.Id($"WalletNav-{navPages}")).Click(); } } diff --git a/BTCPayServer.Tests/SeleniumTests.cs b/BTCPayServer.Tests/SeleniumTests.cs index f58b12e9e..9b3d5ec93 100644 --- a/BTCPayServer.Tests/SeleniumTests.cs +++ b/BTCPayServer.Tests/SeleniumTests.cs @@ -998,13 +998,13 @@ namespace BTCPayServer.Tests //let's test quickly the receive wallet page s.Driver.FindElement(By.Id($"StoreNav-Wallet{cryptoCode}")).Click(); - s.Driver.FindElement(By.Id("SectionNav-Send")).Click(); + s.Driver.FindElement(By.Id("WalletNav-Send")).Click(); s.Driver.FindElement(By.Id("SignTransaction")).Click(); //you cannot use the Sign with NBX option without saving private keys when generating the wallet. Assert.DoesNotContain("nbx-seed", s.Driver.PageSource); - s.Driver.FindElement(By.Id("SectionNav-Receive")).Click(); + s.Driver.FindElement(By.Id("WalletNav-Receive")).Click(); //generate a receiving address s.Driver.FindElement(By.CssSelector("button[value=generate-new-address]")).Click(); Assert.True(s.Driver.FindElement(By.ClassName("qr-container")).Displayed); @@ -1071,20 +1071,19 @@ namespace BTCPayServer.Tests Assert.Contains("m/84'/1'/0'", s.Driver.FindElement(By.Id("AccountKeys_0__AccountKeyPath")).GetAttribute("value")); - s.Driver.FindElement(By.Id($"StoreNav-Wallet{cryptoCode}")).Click(); - // Make sure we can rescan, because we are admin! - s.Driver.FindElement(By.Id("SectionNav-Rescan")).Click(); + s.Driver.FindElement(By.Id("ActionsDropdownToggle")).Click(); + s.Driver.FindElement(By.Id("Rescan")).Click(); Assert.Contains("The batch size make sure", s.Driver.PageSource); // Check the tx sent earlier arrived - s.Driver.FindElement(By.Id("SectionNav-Transactions")).Click(); + s.Driver.FindElement(By.Id($"StoreNav-Wallet{cryptoCode}")).Click(); var walletTransactionLink = s.Driver.Url; Assert.Contains(tx.ToString(), s.Driver.PageSource); // Send to bob - s.Driver.FindElement(By.Id("SectionNav-Send")).Click(); + s.Driver.FindElement(By.Id("WalletNav-Send")).Click(); var bob = new Key().PubKey.Hash.GetAddress(Network.RegTest); SetTransactionOutput(s, 0, bob, 1); s.Driver.FindElement(By.Id("SignTransaction")).Click(); @@ -1096,7 +1095,7 @@ namespace BTCPayServer.Tests Assert.Equal(walletTransactionLink, s.Driver.Url); s.Driver.FindElement(By.Id($"StoreNav-Wallet{cryptoCode}")).Click(); - s.Driver.FindElement(By.Id("SectionNav-Send")).Click(); + s.Driver.FindElement(By.Id("WalletNav-Send")).Click(); var jack = new Key().PubKey.Hash.GetAddress(Network.RegTest); SetTransactionOutput(s, 0, jack, 0.01m); @@ -1113,7 +1112,7 @@ namespace BTCPayServer.Tests bip21 += "&label=Solid Snake&message=Snake? Snake? SNAAAAKE!"; var parsedBip21 = new BitcoinUrlBuilder(bip21, Network.RegTest); s.Driver.FindElement(By.Id($"StoreNav-Wallet{cryptoCode}")).Click(); - s.Driver.FindElement(By.Id("SectionNav-Send")).Click(); + s.Driver.FindElement(By.Id("WalletNav-Send")).Click(); s.Driver.FindElement(By.Id("bip21parse")).Click(); s.Driver.SwitchTo().Alert().SendKeys(bip21); s.Driver.SwitchTo().Alert().Accept(); diff --git a/BTCPayServer/Components/MainNav/MainNav.cs b/BTCPayServer/Components/MainNav/MainNav.cs index b0e09c120..b315dfb93 100644 --- a/BTCPayServer/Components/MainNav/MainNav.cs +++ b/BTCPayServer/Components/MainNav/MainNav.cs @@ -19,7 +19,6 @@ namespace BTCPayServer.Components.MainNav { public class MainNav : ViewComponent { - private const string RootName = "Global"; private readonly AppService _appService; private readonly StoreRepository _storeRepo; private readonly UIStoresController _storesController; diff --git a/BTCPayServer/Components/WalletNav/Default.cshtml b/BTCPayServer/Components/WalletNav/Default.cshtml new file mode 100644 index 000000000..29ebfc770 --- /dev/null +++ b/BTCPayServer/Components/WalletNav/Default.cshtml @@ -0,0 +1,29 @@ +@using BTCPayServer.Views.Stores +@using BTCPayServer.Client +@using BTCPayServer.Views.Wallets +@using BTCPayServer.Abstractions.Extensions +@inject BTCPayNetworkProvider _btcPayNetworkProvider + +@model BTCPayServer.Components.WalletNav.WalletNavViewModel +@addTagHelper *, BundlerMinifier.TagHelpers + +
+ +