Codebasis als Dateien ins Arbeitsrepo statt als Gitlink

QuellCode/CentronERP war nur als Gitlink (Submodul-Referenz auf 79c1142)
getrackt, ohne .gitmodules und ohne erreichbares Remote. Der
Untersuchungsgegenstand der Versuchsreihe war damit nicht reproduzierbar
gesichert: Ein Klon haette ein leeres Verzeichnis erhalten, und die Belege
der 3.287 Anforderungen waeren nicht ueberpruefbar gewesen.

Umstellung:
- Historie nach c:\DEV\CentronERP_git_snapshot_79c1142 ausgelagert
  (vollstaendig lesbar, enthaelt 79c1142 und Vorgaenger 89ccfd6)
- Gitlink aus dem Index entfernt
- Dateiinhalt aufgenommen: 24.557 Dateien, rund 333 MB

Die verschachtelte .gitignore der Codebasis gilt weiter, Build-Artefakte
bleiben ausgeschlossen. Details in Versuche/Versuch_01/_Codebasis-Nachweis.md
This commit is contained in:
Christoph Schwörer
2026-08-26 07:43:51 +02:00
parent 18edae75b6
commit f045b99a25
24664 changed files with 5846716 additions and 1 deletions
@@ -0,0 +1,53 @@
using Microsoft.Playwright;
using Microsoft.Playwright.NUnit;
using PlaywrightTests.Utilities;
namespace PlaywrightTests;
[Parallelizable(ParallelScope.Self)]
[TestFixture]
[Category("CustomerTickets")]
public class CustomerTicketsTest : PageTest
{
[SetUp]
public async Task Setup()
{
await Context.Tracing.StartAsync(new()
{
Title = $"{TestContext.CurrentContext.Test.ClassName}.{TestContext.CurrentContext.Test.Name}",
Screenshots = true,
Snapshots = true,
Sources = true
});
}
[TearDown]
public async Task TearDown()
{
await Context.Tracing.StopAsync(new()
{
Path = Path.Combine(
TestContext.CurrentContext.WorkDirectory,
"playwright-traces",
$"{TestContext.CurrentContext.Test.ClassName}.{TestContext.CurrentContext.Test.Name}.zip"
)
});
}
[Test]
public async Task CheckViews()
{
await Auth.Login(Page);
await Page.GetByRole(AriaRole.Link, new() { Name = " Kunden" }).ClickAsync();
await Page.GetByRole(AriaRole.Link, new() { Name = "Barkunde" }).ClickAsync();
await Page.Locator("#main").GetByText("Tickets").ClickAsync();
await Expect(Page.Locator("body")).ToContainTextAsync("Nur eigene");
await Page.GetByRole(AriaRole.Cell, new() { Name = "Barkunde" }).First.ClickAsync();
await Page.GetByRole(AriaRole.Cell, new() { Name = "Barkunde" }).Nth(1).ClickAsync();
await Page.GetByRole(AriaRole.Cell, new() { Name = "Barkunde" }).Nth(2).ClickAsync();
await Page.GetByText("Zurück zur Liste").ClickAsync();
await Page.GetByRole(AriaRole.Link, new() { Name = "c-entron software GmbH" }).ClickAsync();
await Page.Locator("#main").GetByText("Tickets").ClickAsync();
await Page.GetByRole(AriaRole.Cell, new() { Name = "No data to display" }).ClickAsync();
}
}
@@ -0,0 +1,60 @@
using Microsoft.Playwright;
using Microsoft.Playwright.NUnit;
using PlaywrightTests.Utilities;
namespace PlaywrightTests;
[Parallelizable(ParallelScope.Self)]
[TestFixture]
[Category("version2")]
public class EmailTests : PageTest
{
[SetUp]
public async Task Setup()
{
await Context.Tracing.StartAsync(new()
{
Title = $"{TestContext.CurrentContext.Test.ClassName}.{TestContext.CurrentContext.Test.Name}",
Screenshots = true,
Snapshots = true,
Sources = true
});
}
[TearDown]
public async Task TearDown()
{
await Context.Tracing.StopAsync(new()
{
Path = Path.Combine(
TestContext.CurrentContext.WorkDirectory,
"playwright-traces",
$"{TestContext.CurrentContext.Test.ClassName}.{TestContext.CurrentContext.Test.Name}.zip"
)
});
}
[Test]
public async Task CheckEmails()
{
await Auth.Login(Page);
await Page.GetByRole(AriaRole.Link, new() { Name = " Tickets" }).ClickAsync();
await Page.GetByRole(AriaRole.Gridcell, new() { Name = "New Task", Exact = true }).First.ClickAsync();
await Page.GetByRole(AriaRole.Button, new() { Name = "E-Mail", Exact = true }).ClickAsync();
var fileChooser = await Page.RunAndWaitForFileChooserAsync(async () =>
{
await Page.GetByRole(AriaRole.Button, new() { Name = "Datei hinzufügen" }).ClickAsync();
});
await fileChooser.SetFilesAsync("../../../../../global.json");
await Expect(Page.Locator("#email-content")).ToContainTextAsync("global.json");
await Page.Locator("//div[@id='email-content']/div[2]").ClickAsync();
await Page.Locator("//div[@id='email-content']/div[2]//input").FillAsync("test@c-entron.de");
await Page.Locator("//div[@id='email-content']/div[2]//input").PressAsync("Enter");
await Page.GetByRole(AriaRole.Button, new() { Name = " Senden" }).ClickAsync();
await Expect(Page.GetByText("E-Mail schreiben")).ToBeHiddenAsync();
await Page.GotoAsync("http://localhost:1080/");
await Expect(Page.Locator("tbody")).ToContainTextAsync("Informationen zu Ihrem Ticket, Nummer: 12002");
await Page.GetByRole(AriaRole.Cell, new() { Name = "Informationen zu Ihrem Ticket" }).ClickAsync();
await Expect(Page.Locator("dl")).ToContainTextAsync("global.json");
}
}
@@ -0,0 +1,61 @@
using Microsoft.Playwright;
using Microsoft.Playwright.NUnit;
using PlaywrightTests.Utilities;
namespace PlaywrightTests;
[Parallelizable(ParallelScope.Self)]
[TestFixture]
[Category("default")]
public class ExampleTests : PageTest
{
[SetUp]
public async Task Setup()
{
await Context.Tracing.StartAsync(new()
{
Title = $"{TestContext.CurrentContext.Test.ClassName}.{TestContext.CurrentContext.Test.Name}",
Screenshots = true,
Snapshots = true,
Sources = true
});
}
[TearDown]
public async Task TearDown()
{
await Context.Tracing.StopAsync(new()
{
Path = Path.Combine(
TestContext.CurrentContext.WorkDirectory,
"playwright-traces",
$"{TestContext.CurrentContext.Test.ClassName}.{TestContext.CurrentContext.Test.Name}.zip"
)
});
}
[Test]
public async Task Login()
{
await Auth.Login(Page);
}
[Test]
public async Task CreateTicket()
{
await Auth.Login(Page);
await Page.GetByRole(AriaRole.Button, new() { Name = "Toggle Dropdown" }).ClickAsync();
await Page.GetByText("Neues Ticket").ClickAsync();
await Page.GetByPlaceholder("Kundensuche").ClickAsync();
await Page.GetByPlaceholder("Kundensuche").FillAsync("Kunde");
await Page.GetByPlaceholder("Kundensuche").PressAsync("Tab");
await Page.GetByRole(AriaRole.Option, new() { Name = " 2 - Barkunde Barkunde," }).Locator("div").Nth(1).ClickAsync();
await Page.GetByPlaceholder("Titel eingeben").ClickAsync();
await Page.GetByPlaceholder("Titel eingeben").FillAsync("A New Task For The Test");
var page1 = await Page.RunAndWaitForPopupAsync(async () =>
{
await Page.GetByRole(AriaRole.Button, new() { Name = "Ticket anlegen" }).ClickAsync();
});
await Expect(page1.Locator("#main")).ToContainTextAsync("hat das Ticket angelegt");
}
}
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="10.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.5.1" />
<PackageReference Include="Microsoft.Playwright.NUnit" Version="1.59.0" />
<PackageReference Include="NUnit" Version="4.5.1" />
<PackageReference Include="NUnit.Analyzers" Version="4.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="6.2.0" />
</ItemGroup>
<ItemGroup>
<Using Include="NUnit.Framework" />
</ItemGroup>
</Project>
@@ -0,0 +1,45 @@
using Microsoft.Playwright;
using Microsoft.Playwright.NUnit;
using PlaywrightTests.Utilities;
namespace PlaywrightTests;
[Parallelizable(ParallelScope.Self)]
[TestFixture]
[Category("version2")]
public class TicketTests : PageTest
{
[SetUp]
public async Task Setup()
{
await Context.Tracing.StartAsync(new()
{
Title = $"{TestContext.CurrentContext.Test.ClassName}.{TestContext.CurrentContext.Test.Name}",
Screenshots = true,
Snapshots = true,
Sources = true
});
}
[TearDown]
public async Task TearDown()
{
await Context.Tracing.StopAsync(new()
{
Path = Path.Combine(
TestContext.CurrentContext.WorkDirectory,
"playwright-traces",
$"{TestContext.CurrentContext.Test.ClassName}.{TestContext.CurrentContext.Test.Name}.zip"
)
});
}
[Test]
public async Task CheckTickets()
{
await Auth.Login(Page);
await Page.GetByRole(AriaRole.Link, new() { Name = " Tickets" }).ClickAsync();
var options = new LocatorAssertionsToBeVisibleOptions {Timeout = 10_000};
await Expect(Page.GetByRole(AriaRole.Button, new() { Name = "Neue View erstellen" })).ToBeVisibleAsync(options);
}
}
@@ -0,0 +1,47 @@
using Microsoft.Playwright;
namespace PlaywrightTests.Utilities;
public static class Auth
{
private static LocatorAssertionsToContainTextOptions TenSTextTimeout => new() { Timeout = 10_000 };
private static LocatorAssertionsToBeVisibleOptions TenSLocatorAssertTimeout => new() { Timeout = 10_000 };
public static async Task Login(IPage page, AvailableEmployeeForTests user = AvailableEmployeeForTests.Admin)
{
await page.GotoAsync("http://localhost:8050/auth");
var (username, password) = GetCredentials(user);
await page.GetByPlaceholder("Benutzername").ClickAsync();
await page.GetByPlaceholder("Benutzername").FillAsync(username);
await page.GetByPlaceholder("Passwort").ClickAsync();
await page.GetByPlaceholder("Passwort").FillAsync(password);
await page.GetByRole(AriaRole.Button, new() { Name = "Anmelden" }).ClickAsync();
await Assertions.Expect(page.GetByRole(AriaRole.Heading)).ToContainTextAsync("Hallo, c-entron Administrator!", TenSTextTimeout);
}
public static async Task LoginWebAccount(IPage page, AvailableWebAccountForTests user = AvailableWebAccountForTests.Playwright)
{
await page.GotoAsync("http://localhost:8050/auth");
var (username, password) = GetCredentials(user);
await page.GetByPlaceholder("Benutzername").ClickAsync();
await page.GetByPlaceholder("Benutzername").FillAsync(username);
await page.GetByPlaceholder("Passwort").ClickAsync();
await page.GetByPlaceholder("Passwort").FillAsync(password);
await page.GetByRole(AriaRole.Button, new() { Name = "Anmelden" }).ClickAsync();
await Assertions.Expect(page.Locator("a").Filter(new() { HasText = "Receipts" })).ToBeVisibleAsync(TenSLocatorAssertTimeout);
await Assertions.Expect(page.Locator("a").Filter(new() { HasText = "Tickets" })).ToBeVisibleAsync(TenSLocatorAssertTimeout);
}
public static ValueTuple<string, string> GetCredentials(AvailableEmployeeForTests employee) => employee switch
{
AvailableEmployeeForTests.Admin => new ValueTuple<string, string>("admin", "1"),
_ => throw new ArgumentOutOfRangeException(nameof(employee), employee, null)
};
private static ValueTuple<string, string> GetCredentials(AvailableWebAccountForTests webAccount) => webAccount switch
{
AvailableWebAccountForTests.Playwright => new ValueTuple<string, string>("Playwright", "playwright"),
AvailableWebAccountForTests.Alpha => new ValueTuple<string, string>("alphauser", "alphapassword"),
AvailableWebAccountForTests.Beta => new ValueTuple<string, string>("betauser", "betapassword"),
AvailableWebAccountForTests.Gamma => new ValueTuple<string, string>("gammauser", "gammapassword"),
_ => throw new ArgumentOutOfRangeException(nameof(webAccount), webAccount, null)
};
}
@@ -0,0 +1,7 @@
namespace PlaywrightTests.Utilities;
public enum AvailableEmployeeForTests
{
Admin
}
@@ -0,0 +1,18 @@
namespace PlaywrightTests.Utilities;
public enum AvailableWebAccountForTests
{
Playwright,
/// <summary>
/// Alpha user is only available in version2 db
/// </summary>
Alpha,
/// <summary>
/// Beta user is only available in version2 db
/// </summary>
Beta,
/// <summary>
/// Gamma user is only available in version2 db
/// </summary>
Gamma,
}
@@ -0,0 +1,54 @@
using Microsoft.Playwright;
using Microsoft.Playwright.NUnit;
using PlaywrightTests.Utilities;
namespace PlaywrightTests;
[Parallelizable(ParallelScope.Self)]
[TestFixture]
[Category("views")]
public class ViewTests : PageTest
{
[SetUp]
public async Task Setup()
{
await Context.Tracing.StartAsync(new()
{
Title = $"{TestContext.CurrentContext.Test.ClassName}.{TestContext.CurrentContext.Test.Name}",
Screenshots = true,
Snapshots = true,
Sources = true
});
}
[TearDown]
public async Task TearDown()
{
await Context.Tracing.StopAsync(new()
{
Path = Path.Combine(
TestContext.CurrentContext.WorkDirectory,
"playwright-traces",
$"{TestContext.CurrentContext.Test.ClassName}.{TestContext.CurrentContext.Test.Name}.zip"
)
});
}
[Test]
public async Task CheckCreateAndDeleteView()
{
await Auth.Login(Page);
await Page.GetByRole(AriaRole.Link, new() { Name = " Tickets" }).ClickAsync();
await Expect(Page.GetByRole(AriaRole.Button, new() { Name = "Neue View erstellen" })).ToBeVisibleAsync();
await Page.GetByRole(AriaRole.Button, new() { Name = "Neue View erstellen" }).ClickAsync();
await Page.Locator("input[name=\"new-view-name\"]").ClickAsync();
await Page.Locator("input[name=\"new-view-name\"]").FillAsync("Test view");
await Page.GetByLabel("Neue View erstellen").GetByRole(AriaRole.Button, new() { Name = "View speichern" }).ClickAsync();
await Expect(Page.GetByText("Test view", new () { Exact = true })).ToBeVisibleAsync();
await Page.Locator("#edit-ticket-view-icon-button").ClickAsync();
await Page.GetByRole(AriaRole.Gridcell, new() { Name = "Delete" }).Locator("div").Nth(0).ClickAsync();
await Page.Locator("dxbl-modal-root").ClickAsync();
await Page.GetByRole(AriaRole.Button, new() { Name = "Yes" }).ClickAsync();
await Expect(Page.GetByText("Tickets View 'Test view' wurde gelöscht.")).ToBeVisibleAsync();
}
}
@@ -0,0 +1,143 @@
using System.Text.RegularExpressions;
using Microsoft.Playwright;
using Microsoft.Playwright.NUnit;
using PlaywrightTests.Utilities;
namespace PlaywrightTests;
[Parallelizable(ParallelScope.Self)]
[TestFixture]
[Category("version2")]
public class WebaccountTests : PageTest
{
private static LocatorClickOptions TenSLocatorTimout => new() {Timeout = 10_000};
private static LocatorAssertionsToBeVisibleOptions TenSLocatorAssertTimout => new() {Timeout = 10_000};
[SetUp]
public async Task Setup()
{
await Context.Tracing.StartAsync(new()
{
Title = $"{TestContext.CurrentContext.Test.ClassName}.{TestContext.CurrentContext.Test.Name}",
Screenshots = true,
Snapshots = true,
Sources = true
});
}
[TearDown]
public async Task TearDown()
{
await Context.Tracing.StopAsync(new()
{
Path = Path.Combine(
TestContext.CurrentContext.WorkDirectory,
"playwright-traces",
$"{TestContext.CurrentContext.Test.ClassName}.{TestContext.CurrentContext.Test.Name}.zip"
)
});
}
[Test]
public async Task Login()
{
await Auth.LoginWebAccount(Page);
}
[Test]
public async Task CheckWebAccount()
{
await Auth.LoginWebAccount(Page);
await Page.Locator("a").Filter(new() { HasText = "Shop" }).ClickAsync();
await Expect(Page.GetByText("Wartung Printer laut Vertrag")).ToBeVisibleAsync(TenSLocatorAssertTimout);
await Page.GetByRole(AriaRole.Button, new() { Name = "Add to cart" }).ClickAsync();
await Expect(Page.GetByText("The article has been added to")).ToBeVisibleAsync();
await Page.Locator("li").Filter(new() { HasText = "Cart" }).ClickAsync();
await Page.GetByRole(AriaRole.Button, new() { Name = "Request approval" }).ClickAsync();
await Expect(Page.Locator("b")).ToContainTextAsync("Waiting for approval");
await Page.GetByRole(AriaRole.Button, new() { Name = "Approve", Exact = true }).ClickAsync();
await Expect(Page.GetByText("The cart was approved and is")).ToBeVisibleAsync();
await Expect(Page.Locator("b")).ToContainTextAsync("Ready for order");
}
[Test]
public async Task CheckWebAccountTickets()
{
await Auth.LoginWebAccount(Page);
await Page.GetByRole(AriaRole.Link, new() { Name = " Tickets" }).ClickAsync();
await Expect(Page.GetByText("Ticketname")).ToBeVisibleAsync();
await Expect(Page.GetByText("Status")).ToBeVisibleAsync();
await Expect(Page.GetByText("Nummer")).ToBeVisibleAsync();
await Expect(Page.GetByText("Erstellt am")).ToBeVisibleAsync();
await Expect(Page.GetByRole(AriaRole.Cell, new() { Name = "12001" })).ToBeVisibleAsync();
await Expect(Page.GetByRole(AriaRole.Cell, new() { Name = "12002" })).ToBeVisibleAsync();
await Expect(Page.GetByRole(AriaRole.Cell, new() { Name = "12003" })).ToBeVisibleAsync();
}
[Test]
public async Task CheckWebAccountTicketViews()
{
await Auth.LoginWebAccount(Page);
await Page.GetByRole(AriaRole.Link, new() { Name = " Tickets" }).ClickAsync();
await Expect(Page.Locator("div").Filter(new() { HasTextRegex = new Regex("^Offen$") })).ToBeVisibleAsync();
await Expect(Page.GetByText("Abgeschlossene")).ToBeVisibleAsync();
await Expect(Page.GetByText("Ausstehende")).ToBeVisibleAsync();
await Expect(Page.GetByText("Abgelehnte")).ToBeVisibleAsync();
}
[Test]
public async Task CheckWebAccountReceipts()
{
await Auth.LoginWebAccount(Page);
await Page.Locator("a").Filter(new() { HasText = "Receipts" }).ClickAsync();
await Expect(Page.GetByRole(AriaRole.Listitem).Filter(new() { HasText = "All" })).ToBeVisibleAsync();
await Expect(Page.GetByRole(AriaRole.Listitem).Filter(new() { HasText = "Offers" })).ToBeVisibleAsync();
await Expect(Page.GetByRole(AriaRole.Listitem).Filter(new() { HasText = "Orders" })).ToBeVisibleAsync();
await Expect(Page.GetByRole(AriaRole.Listitem).Filter(new() { HasText = "Delivery notes" })).ToBeVisibleAsync();
await Expect(Page.GetByRole(AriaRole.Listitem).Filter(new() { HasText = "Invoices" })).ToBeVisibleAsync();
await Expect(Page.GetByRole(AriaRole.Listitem).Filter(new() { HasText = "Credit notes" })).ToBeVisibleAsync();
await Expect(Page.Locator(".grid")).ToBeVisibleAsync();
await Page.GetByRole(AriaRole.Listitem).Filter(new() { HasText = "All" }).ClickAsync();
await Expect(Page.Locator(".grid")).ToBeVisibleAsync();
await Page.GetByRole(AriaRole.Listitem).Filter(new() { HasText = "Offers" }).ClickAsync();
await Expect(Page.Locator(".grid")).ToBeVisibleAsync();
await Page.GetByRole(AriaRole.Listitem).Filter(new() { HasText = "Orders" }).ClickAsync();
await Expect(Page.Locator(".grid")).ToBeVisibleAsync();
await Page.GetByRole(AriaRole.Listitem).Filter(new() { HasText = "Orders" }).ClickAsync();
await Expect(Page.Locator(".grid")).ToBeVisibleAsync();
await Page.GetByRole(AriaRole.Listitem).Filter(new() { HasText = "Invoices" }).ClickAsync();
await Expect(Page.Locator(".grid")).ToBeVisibleAsync();
await Page.GetByRole(AriaRole.Listitem).Filter(new() { HasText = "Credit notes" }).ClickAsync();
await Expect(Page.Locator(".grid")).ToBeVisibleAsync();
}
[Test]
public async Task CheckWebAccountTicketsCanSeeDisabled()
{
await Auth.LoginWebAccount(Page, AvailableWebAccountForTests.Alpha);
await Page.GetByRole(AriaRole.Link, new() { Name = " Tickets" }).ClickAsync();
await Expect(Page.GetByRole(AriaRole.Cell, new() { Name = "No data to display" })).ToBeVisibleAsync(TenSLocatorAssertTimout);
await Page.Locator("div").Filter(new() { HasTextRegex = new Regex("^Abgeschlossene$") }).ClickAsync();
await Expect(Page.GetByRole(AriaRole.Cell, new() { Name = "No data to display" })).ToBeVisibleAsync();
}
[Test]
public async Task CheckWebAccountTicketsCanSeeEnabled()
{
await Auth.LoginWebAccount(Page, AvailableWebAccountForTests.Beta);
await Page.GetByRole(AriaRole.Link, new() { Name = " Tickets" }).ClickAsync();
await Expect(Page.GetByRole(AriaRole.Cell, new() { Name = "Open Beta Ticket" })).ToBeVisibleAsync(TenSLocatorAssertTimout);
await Page.Locator("div").Filter(new() { HasTextRegex = new Regex("^Abgeschlossene$") }).ClickAsync();
await Expect(Page.GetByRole(AriaRole.Cell, new() { Name = "Closed Beta Ticket" })).ToBeVisibleAsync();
}
[Test]
public async Task CheckWebAccountTicketsAfter240101()
{
await Auth.LoginWebAccount(Page, AvailableWebAccountForTests.Gamma);
await Page.GetByRole(AriaRole.Link, new() { Name = " Tickets" }).ClickAsync();
await Expect(Page.GetByRole(AriaRole.Cell, new() { Name = "Open Gamma Ticket - after" })).ToBeVisibleAsync(TenSLocatorAssertTimout);
await Page.Locator("div").Filter(new() { HasTextRegex = new Regex("^Abgeschlossene$") }).ClickAsync();
await Expect(Page.GetByRole(AriaRole.Cell, new() { Name = "Closed Gamma Ticket - after" })).ToBeVisibleAsync();
}
}