diff --git a/test/E2ETests/DeploymentUtility.cs b/test/E2ETests/DeploymentUtility.cs
index beb2d2df3f..c954f38305 100644
--- a/test/E2ETests/DeploymentUtility.cs
+++ b/test/E2ETests/DeploymentUtility.cs
@@ -150,6 +150,8 @@ namespace E2ETests
var watchResult = dbWatch.WaitForChanged(WatcherChangeTypes.Created, 60 * 1000);
if (watchResult.ChangeType == WatcherChangeTypes.Created)
{
+ //This event is fired immediately after the localdb file is created. Give it a while to finish populating data and start the application.
+ Thread.Sleep(2 * 1000);
Console.WriteLine("Database file created '{0}'. Proceeding with the tests.", identityDBFullPath);
}
else
diff --git a/test/E2ETests/SmokeTests.cs b/test/E2ETests/SmokeTests.cs
index 3140ca4281..07390d531c 100644
--- a/test/E2ETests/SmokeTests.cs
+++ b/test/E2ETests/SmokeTests.cs
@@ -406,7 +406,7 @@ namespace E2ETests
var responseContent = response.Content.ReadAsStringAsync().Result;
Assert.Contains(albumName, responseContent, StringComparison.OrdinalIgnoreCase);
Assert.Contains("http://myapp/testurl", responseContent, StringComparison.OrdinalIgnoreCase);
- Assert.Contains("Edit", responseContent, StringComparison.OrdinalIgnoreCase);
+ Assert.Contains(string.Format("Edit", albumId), responseContent, StringComparison.OrdinalIgnoreCase);
Assert.Contains("Back to List", responseContent, StringComparison.OrdinalIgnoreCase);
}