Skip to content

Commit 065a088

Browse files
Add Playwright.MSTest.v4 (#3221)
Co-authored-by: Max Schmitt <[email protected]>
1 parent 5d6e5c1 commit 065a088

File tree

6 files changed

+602
-2
lines changed

6 files changed

+602
-2
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project Sdk="Microsoft.NET.Sdk">
3+
<PropertyGroup>
4+
<Title>Microsoft.Playwright.MSTest.v4</Title>
5+
<PackageId>Microsoft.Playwright.MSTest.v4</PackageId>
6+
<Summary>A set of helpers and fixtures to enable using Playwright in MSTest 4 tests.</Summary>
7+
<Description>
8+
Playwright enables reliable end-to-end testing for modern web apps. This package brings in additional helpers
9+
and fixtures to enable using it within MSTest.
10+
</Description>
11+
<PackageIcon>icon.png</PackageIcon>
12+
<TargetFramework>netstandard2.0</TargetFramework>
13+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
14+
<RunWithWarnings>true</RunWithWarnings>
15+
<RootNamespace>Microsoft.Playwright.MSTest</RootNamespace>
16+
<ReleaseVersion>0.0.0</ReleaseVersion>
17+
<BuildFromSource>True</BuildFromSource>
18+
<AssemblyName>Microsoft.Playwright.MSTest.v4</AssemblyName>
19+
<PackageOutputPath>./nupkg</PackageOutputPath>
20+
<IsPackable>true</IsPackable>
21+
<Nullable>enable</Nullable>
22+
<!--<EnablePackageValidation>true</EnablePackageValidation>
23+
<PackageValidationBaselineVersion>1.52.0</PackageValidationBaselineVersion>-->
24+
</PropertyGroup>
25+
26+
<Import Project="../Common/Version.props" />
27+
<Import Project="../Common/SignAssembly.props" />
28+
<Import Project="../Common/SignFiles.props" />
29+
<ItemGroup>
30+
<ProjectReference Include="..\Playwright\Playwright.csproj" />
31+
<ProjectReference Include="..\Playwright.TestAdapter\Playwright.TestAdapter.csproj" />
32+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
33+
<PrivateAssets>all</PrivateAssets>
34+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
35+
</PackageReference>
36+
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="1.0.0">
37+
<PrivateAssets>all</PrivateAssets>
38+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
39+
</PackageReference>
40+
<PackageReference Include="MSTest.TestFramework" Version="4.0.0-preview.25372.6" />
41+
</ItemGroup>
42+
<ItemGroup>
43+
<None Include="..\Common\icon.png" Pack="true" Visible="false" PackagePath="icon.png" />
44+
</ItemGroup>
45+
<ItemGroup>
46+
<Compile Include="$(MSBuildThisFileDirectory)..\Playwright.MSTest\*.cs">
47+
<Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
48+
</Compile>
49+
</ItemGroup>
50+
</Project>

src/Playwright.TestingHarnessTest/Playwright.TestingHarnessTest.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" Condition="'$(TEST_MODE)' == 'mstest'" />
1919
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" Condition="'$(TEST_MODE)' == 'mstest'" />
2020

21+
<!-- MSTest v4 -->
22+
<ProjectReference Include="..\Playwright.MSTest.v4\Playwright.MSTest.v4.csproj" Condition="'$(TEST_MODE)' == 'mstest.v4'" />
23+
<PackageReference Include="MSTest.TestAdapter" Version="4.0.0-preview.25372.6" Condition="'$(TEST_MODE)' == 'mstest.v4'" />
24+
<PackageReference Include="MSTest.TestFramework" Version="4.0.0-preview.25372.6" Condition="'$(TEST_MODE)' == 'mstest.v4'" />
25+
2126
<!-- NUnit -->
2227
<ProjectReference Include="..\Playwright.NUnit\Playwright.NUnit.csproj" Condition="'$(TEST_MODE)' == 'nunit'" />
2328
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" Condition="'$(TEST_MODE)' == 'nunit'" />

src/Playwright.TestingHarnessTest/tests/baseTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type RunResult = {
1919

2020
export const test = base.extend<{
2121
proxyServer: ProxyServer;
22-
testMode: 'nunit' | 'mstest' | 'xunit' | 'xunit.v3';
22+
testMode: 'nunit' | 'mstest' | 'mstest.v4' | 'xunit' | 'xunit.v3';
2323
runTest: (files: Record<string, string>, command: string, env?: NodeJS.ProcessEnv) => Promise<RunResult>;
2424
launchServer: (options: { port: number }) => Promise<void>;
2525
server: SimpleServer;

0 commit comments

Comments
 (0)