mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Final tweaks and test fix
This commit is contained in:
@@ -212,8 +212,6 @@ namespace BTCPayServer.Tests
|
|||||||
{
|
{
|
||||||
Assert.True(Driver.FindElement(By.Id("LightningNodeType-Internal")).Enabled, "Usage of the internal Lightning node is disabled.");
|
Assert.True(Driver.FindElement(By.Id("LightningNodeType-Internal")).Enabled, "Usage of the internal Lightning node is disabled.");
|
||||||
Driver.FindElement(By.CssSelector("label[for=\"LightningNodeType-Internal\"]")).Click();
|
Driver.FindElement(By.CssSelector("label[for=\"LightningNodeType-Internal\"]")).Click();
|
||||||
|
|
||||||
Driver.FindElement(By.Id("saveInternal")).Click();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -222,10 +220,9 @@ namespace BTCPayServer.Tests
|
|||||||
|
|
||||||
Driver.FindElement(By.Id("test")).Click();
|
Driver.FindElement(By.Id("test")).Click();
|
||||||
Assert.Contains("Connection to the Lightning node successful.", FindAlertMessage().Text);
|
Assert.Contains("Connection to the Lightning node successful.", FindAlertMessage().Text);
|
||||||
|
|
||||||
Driver.FindElement(By.Id("saveCustom")).Click();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Driver.FindElement(By.Id("save")).Click();
|
||||||
Assert.Contains($"{cryptoCode} Lightning node updated.", FindAlertMessage().Text);
|
Assert.Contains($"{cryptoCode} Lightning node updated.", FindAlertMessage().Text);
|
||||||
|
|
||||||
var enabled = Driver.FindElement(By.Id($"{cryptoCode}LightningEnabled"));
|
var enabled = Driver.FindElement(By.Id($"{cryptoCode}LightningEnabled"));
|
||||||
|
|||||||
@@ -1006,7 +1006,7 @@ namespace BTCPayServer.Tests
|
|||||||
}, "save", "BTC").GetAwaiter().GetResult());
|
}, "save", "BTC").GetAwaiter().GetResult());
|
||||||
|
|
||||||
// Make sure old connection string format does not work
|
// Make sure old connection string format does not work
|
||||||
Assert.IsType<ViewResult>(storeController.SetupLightningNode(user.StoreId,
|
Assert.IsType<RedirectToActionResult>(storeController.SetupLightningNode(user.StoreId,
|
||||||
new LightningNodeViewModel { ConnectionString = tester.MerchantCharge.Client.Uri.AbsoluteUri },
|
new LightningNodeViewModel { ConnectionString = tester.MerchantCharge.Client.Uri.AbsoluteUri },
|
||||||
"save", "BTC").GetAwaiter().GetResult());
|
"save", "BTC").GetAwaiter().GetResult());
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
margin-right: 2rem;
|
margin-right: 2rem;
|
||||||
color: var(--btcpay-color-warning);
|
color: var(--btcpay-color-warning);
|
||||||
}
|
}
|
||||||
|
#save { min-width: 7rem; }
|
||||||
#InternalSetup, #CustomSetup, #LightningNodeType-Internal, #LightningNodeType-Custom { display: none; }
|
#InternalSetup, #CustomSetup, #LightningNodeType-Internal, #LightningNodeType-Custom { display: none; }
|
||||||
#LightningNodeType-Internal:checked + * + * + * + #InternalSetup,
|
#LightningNodeType-Internal:checked + * + * + * + #InternalSetup,
|
||||||
#LightningNodeType-Custom:checked + * + *+ #CustomSetup { display: block; }
|
#LightningNodeType-Custom:checked + * + *+ #CustomSetup { display: block; }
|
||||||
@@ -80,7 +81,6 @@
|
|||||||
@if (Model.CanUseInternalNode)
|
@if (Model.CanUseInternalNode)
|
||||||
{
|
{
|
||||||
<p class="my-4">That's it, no need to configure anything else.</p>
|
<p class="my-4">That's it, no need to configure anything else.</p>
|
||||||
<button id="saveInternal" name="command" type="submit" value="save" class="btn btn-primary mr-2">Use internal node</button>
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -152,7 +152,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<button id="saveCustom" name="command" type="submit" value="save" class="btn btn-primary mr-2">Use custom node</button>
|
</div>
|
||||||
|
<div class="text-left">
|
||||||
|
<button id="save" name="command" type="submit" value="save" class="btn btn-primary mr-2">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -112,15 +112,15 @@
|
|||||||
@if (isSetUp)
|
@if (isSetUp)
|
||||||
{
|
{
|
||||||
<span class="smMaxWidth text-truncate text-secondary mr-3">@scheme.Address</span>
|
<span class="smMaxWidth text-truncate text-secondary mr-3">@scheme.Address</span>
|
||||||
|
<a class="text-secondary"
|
||||||
|
asp-controller="PublicLightningNodeInfo"
|
||||||
|
asp-action="ShowLightningNodeInfo"
|
||||||
|
asp-route-cryptoCode="@scheme.CryptoCode"
|
||||||
|
asp-route-storeId="@Model.Id"
|
||||||
|
target="_blank">
|
||||||
|
Public Node Info
|
||||||
|
</a>
|
||||||
}
|
}
|
||||||
<a class="text-secondary"
|
|
||||||
asp-controller="PublicLightningNodeInfo"
|
|
||||||
asp-action="ShowLightningNodeInfo"
|
|
||||||
asp-route-cryptoCode="@scheme.CryptoCode"
|
|
||||||
asp-route-storeId="@Model.Id"
|
|
||||||
target="_blank">
|
|
||||||
Public Node Info
|
|
||||||
</a>
|
|
||||||
</span>
|
</span>
|
||||||
<span class="d-flex align-items-center fw-semibold">
|
<span class="d-flex align-items-center fw-semibold">
|
||||||
<form method="post"
|
<form method="post"
|
||||||
|
|||||||
Reference in New Issue
Block a user