Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion extension/scripts/run-e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -2021,7 +2021,11 @@ public partial class App : Application
{
var readyFile = Environment.GetEnvironmentVariable("ASPIRE_WINUI_E2E_READY_FILE")
?? throw new InvalidOperationException("ASPIRE_WINUI_E2E_READY_FILE is required.");
File.WriteAllText(readyFile, $"ready:{Environment.ProcessId}");
// Publish the marker atomically: the E2E test polls for this file and asserts on its
// first successful read, so it must never observe a created-but-empty file.
var pendingReadyFile = readyFile + ".tmp";
File.WriteAllText(pendingReadyFile, $"ready:{Environment.ProcessId}");
File.Move(pendingReadyFile, readyFile, overwrite: true);

_window = new Window
{
Expand Down
4 changes: 3 additions & 1 deletion extension/src/test/e2eLaunchProfile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,9 @@ builder.Build().Run();
assert.ok(runner.includes('<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>'));
assert.ok(runner.includes('<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.8.260209005" />'));
assert.ok(runner.includes('<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.7175" />'));
assert.ok(runner.includes('File.WriteAllText(readyFile, $"ready:{Environment.ProcessId}");'));
assert.ok(runner.includes('File.WriteAllText(pendingReadyFile, $"ready:{Environment.ProcessId}");'));
assert.ok(runner.includes('File.Move(pendingReadyFile, readyFile, overwrite: true);'));
assert.ok(!runner.includes('File.WriteAllText(readyFile,'));
assert.ok(spec.includes('this.timeout(1_200_000);'));
assert.ok(spec.includes("const symbol = 'InitializeComponent';"));
assert.ok(spec.includes("name: 'getDefinitions'"));
Expand Down
Loading