mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Make selenium work on CI
This commit is contained in:
@@ -34,7 +34,14 @@ namespace BTCPayServer.Tests
|
|||||||
ChromeOptions options = new ChromeOptions();
|
ChromeOptions options = new ChromeOptions();
|
||||||
options.AddArguments("headless"); // Comment to view browser
|
options.AddArguments("headless"); // Comment to view browser
|
||||||
options.AddArguments("window-size=1200x600"); // Comment to view browser
|
options.AddArguments("window-size=1200x600"); // Comment to view browser
|
||||||
Driver = new ChromeDriver(Directory.GetCurrentDirectory(), options);
|
if (Server.PayTester.InContainer)
|
||||||
|
{
|
||||||
|
Driver = new OpenQA.Selenium.Remote.RemoteWebDriver(new Uri("http://selenium:4444/wd/hub"), options);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Driver = new ChromeDriver(Directory.GetCurrentDirectory(), options);
|
||||||
|
}
|
||||||
Driver.Navigate().GoToUrl(Server.PayTester.ServerUri);
|
Driver.Navigate().GoToUrl(Server.PayTester.ServerUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ services:
|
|||||||
- "80"
|
- "80"
|
||||||
links:
|
links:
|
||||||
- dev
|
- dev
|
||||||
|
- selenium
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "tests:127.0.0.1"
|
- "tests:127.0.0.1"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -53,7 +54,6 @@ services:
|
|||||||
- lightning-charged
|
- lightning-charged
|
||||||
- customer_lnd
|
- customer_lnd
|
||||||
- merchant_lnd
|
- merchant_lnd
|
||||||
- selenium
|
|
||||||
|
|
||||||
devlnd:
|
devlnd:
|
||||||
image: btcpayserver/bitcoin:0.18.0
|
image: btcpayserver/bitcoin:0.18.0
|
||||||
@@ -288,6 +288,8 @@ services:
|
|||||||
|
|
||||||
selenium:
|
selenium:
|
||||||
image: selenium/standalone-chrome
|
image: selenium/standalone-chrome
|
||||||
|
expose:
|
||||||
|
- "4444"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
bitcoin_datadir:
|
bitcoin_datadir:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
dotnet test --filter Fast=Fast --no-build
|
dotnet test --filter Fast=Fast --no-build
|
||||||
# dotnet test --filter Selenium=Selenium --no-build -v n
|
dotnet test --filter Selenium=Selenium --no-build -v n
|
||||||
dotnet test --filter Integration=Integration --no-build -v n
|
dotnet test --filter Integration=Integration --no-build -v n
|
||||||
if [[ "$TESTS_RUN_EXTERNAL_INTEGRATION" == "true" ]]; then
|
if [[ "$TESTS_RUN_EXTERNAL_INTEGRATION" == "true" ]]; then
|
||||||
dotnet test --filter ExternalIntegration=ExternalIntegration --no-build -v n
|
dotnet test --filter ExternalIntegration=ExternalIntegration --no-build -v n
|
||||||
|
|||||||
Reference in New Issue
Block a user