-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
34 lines (32 loc) · 910 Bytes
/
Jenkinsfile
File metadata and controls
34 lines (32 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
pipeline {
agent { any {} }
stages {
stage('e2e-tests') {
steps {
sh '''
dotnet new console -n PlayWright --force
cd PlayWright
dotnet add package Microsoft.Playwright
dotnet build
pwsh bin/Debug/netcoreapp3.1/playwright.ps1 install
cat << EOF > Program.cs
using Microsoft.Playwright;
using System.Threading.Tasks;
class Program
{
public static async Task Main()
{
using var playwright = await Playwright.CreateAsync();
await using var browser = await playwright.Chromium.LaunchAsync();
var page = await browser.NewPageAsync();
await page.GotoAsync("https://playwright.dev/dotnet");
await page.ScreenshotAsync(new PageScreenshotOptions { Path = "screenshot.png" });
}
}
EOF
dotnet run
'''
}
}
}
}