test(e2e): guard ApiSurfaceFixture partial-init delete + seal TransportImportTests (final review nits)
This commit is contained in:
@@ -28,7 +28,12 @@ public sealed class ApiSurfaceFixture : IAsyncLifetime
|
||||
}
|
||||
catch
|
||||
{
|
||||
await CliRunner.DeleteApiMethodAsync(MethodId);
|
||||
// Partial-init guard: MethodId is non-zero only if CreateApiMethodAsync succeeded,
|
||||
// so skip the delete when nothing was created (avoids a phantom delete --id 0).
|
||||
if (MethodId != 0)
|
||||
{
|
||||
await CliRunner.DeleteApiMethodAsync(MethodId);
|
||||
}
|
||||
Available = false;
|
||||
throw;
|
||||
}
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.Transport;
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[Collection("Playwright")]
|
||||
public class TransportImportTests
|
||||
public sealed class TransportImportTests
|
||||
{
|
||||
private readonly PlaywrightFixture _fixture;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user