mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
Make selenium work on CI
This commit is contained in:
parent
522d745883
commit
a1f1e90626
@ -34,7 +34,14 @@ namespace BTCPayServer.Tests
|
||||
ChromeOptions options = new ChromeOptions();
|
||||
options.AddArguments("headless"); // 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);
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,7 @@ services:
|
||||
- "80"
|
||||
links:
|
||||
- dev
|
||||
- selenium
|
||||
extra_hosts:
|
||||
- "tests:127.0.0.1"
|
||||
volumes:
|
||||
@ -53,7 +54,6 @@ services:
|
||||
- lightning-charged
|
||||
- customer_lnd
|
||||
- merchant_lnd
|
||||
- selenium
|
||||
|
||||
devlnd:
|
||||
image: btcpayserver/bitcoin:0.18.0
|
||||
@ -288,6 +288,8 @@ services:
|
||||
|
||||
selenium:
|
||||
image: selenium/standalone-chrome
|
||||
expose:
|
||||
- "4444"
|
||||
|
||||
volumes:
|
||||
bitcoin_datadir:
|
||||
|
@ -2,7 +2,7 @@
|
||||
set -e
|
||||
|
||||
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
|
||||
if [[ "$TESTS_RUN_EXTERNAL_INTEGRATION" == "true" ]]; then
|
||||
dotnet test --filter ExternalIntegration=ExternalIntegration --no-build -v n
|
||||
|
Loading…
Reference in New Issue
Block a user