Skip to content

Commit

Permalink
Add Tests project for Access (#1118)
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad authored Jan 30, 2024
1 parent 60a0209 commit 0a03ce3
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
-e ConnectionStrings__DefaultConnection="Host=localhost;Username=postgres;Password=trs;Database=trs"
timeout-minutes: 5

- name: API Tests
- name: API tests
uses: ./.github/workflows/actions/test
with:
test_project_path: TeachingRecordSystem/tests/TeachingRecordSystem.Api.Tests
Expand All @@ -104,7 +104,7 @@ jobs:
-e ConnectionStrings__DefaultConnection="Host=localhost;Username=postgres;Password=trs;Database=trs"
timeout-minutes: 5

- name: Support UI Tests
- name: Support UI tests
uses: ./.github/workflows/actions/test
with:
test_project_path: TeachingRecordSystem/tests/TeachingRecordSystem.SupportUi.Tests
Expand All @@ -114,6 +114,16 @@ jobs:
-e ConnectionStrings__DefaultConnection="Host=localhost;Username=postgres;Password=trs;Database=trs"
timeout-minutes: 5

- name: Authorize access to a teaching record tests
uses: ./.github/workflows/actions/test
with:
test_project_path: TeachingRecordSystem/tests/TeachingRecordSystem.AuthorizeAccessToATeachingRecordTests
report_name: "Authorize access to a teaching record test results"
dotnet_test_args: >-
--no-build
-e ConnectionStrings__DefaultConnection="Host=localhost;Username=postgres;Password=trs;Database=trs"
timeout-minutes: 5

- name: Install Playwright
run: pwsh ./tests/TeachingRecordSystem.SupportUi.EndToEndTests/bin/Release/net8.0/playwright.ps1 install
working-directory: TeachingRecordSystem
Expand Down
15 changes: 15 additions & 0 deletions TeachingRecordSystem/TeachingRecordSystem.sln
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeachingRecordSystem.FormFl
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeachingRecordSystem.FormFlow.Tests", "tests\TeachingRecordSystem.FormFlow.Tests\TeachingRecordSystem.FormFlow.Tests.csproj", "{8F71F933-72A9-4512-89A1-B28ACEC38BC4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TeachingRecordSystem.AuthorizeAccessToATeachingRecordTests", "tests\TeachingRecordSystem.AuthorizeAccessToATeachingRecordTests\TeachingRecordSystem.AuthorizeAccessToATeachingRecordTests.csproj", "{08E99A19-AD1F-4F95-BF13-31248D486799}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -249,6 +251,18 @@ Global
{8F71F933-72A9-4512-89A1-B28ACEC38BC4}.Release|x64.Build.0 = Release|Any CPU
{8F71F933-72A9-4512-89A1-B28ACEC38BC4}.Release|x86.ActiveCfg = Release|Any CPU
{8F71F933-72A9-4512-89A1-B28ACEC38BC4}.Release|x86.Build.0 = Release|Any CPU
{08E99A19-AD1F-4F95-BF13-31248D486799}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08E99A19-AD1F-4F95-BF13-31248D486799}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08E99A19-AD1F-4F95-BF13-31248D486799}.Debug|x64.ActiveCfg = Debug|Any CPU
{08E99A19-AD1F-4F95-BF13-31248D486799}.Debug|x64.Build.0 = Debug|Any CPU
{08E99A19-AD1F-4F95-BF13-31248D486799}.Debug|x86.ActiveCfg = Debug|Any CPU
{08E99A19-AD1F-4F95-BF13-31248D486799}.Debug|x86.Build.0 = Debug|Any CPU
{08E99A19-AD1F-4F95-BF13-31248D486799}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08E99A19-AD1F-4F95-BF13-31248D486799}.Release|Any CPU.Build.0 = Release|Any CPU
{08E99A19-AD1F-4F95-BF13-31248D486799}.Release|x64.ActiveCfg = Release|Any CPU
{08E99A19-AD1F-4F95-BF13-31248D486799}.Release|x64.Build.0 = Release|Any CPU
{08E99A19-AD1F-4F95-BF13-31248D486799}.Release|x86.ActiveCfg = Release|Any CPU
{08E99A19-AD1F-4F95-BF13-31248D486799}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -270,6 +284,7 @@ Global
{960D652A-7CB1-4EB5-9813-0CEC0BC6AB6C} = {837E2941-F1CC-41EF-A652-B605101B2E84}
{3B40F089-387D-4721-A79D-1C39E682D550} = {837E2941-F1CC-41EF-A652-B605101B2E84}
{8F71F933-72A9-4512-89A1-B28ACEC38BC4} = {91DCFC76-6636-4AC1-B81C-7F8AE1F22116}
{08E99A19-AD1F-4F95-BF13-31248D486799} = {91DCFC76-6636-4AC1-B81C-7F8AE1F22116}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61D239F9-888B-4D01-84BC-9276C92383EA}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global using Xunit;
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\TeachingRecordSystem.AuthorizeAccessToATeacherRecord\TeachingRecordSystem.AuthorizeAccessToATeacherRecord.csproj" />
<ProjectReference Include="..\TeachingRecordSystem.TestCommon\TeachingRecordSystem.TestCommon.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace TeachingRecordSystem.AuthorizeAccessToATeachingRecordTests;

public class UnitTest1
{
[Fact]
public void Test1()
{

}
}

0 comments on commit 0a03ce3

Please sign in to comment.