Change StepId to GUID.

This commit is contained in:
Haiping Chen 2024-06-01 21:15:47 -05:00
parent 83065b3186
commit 89cad4ebcc
4 changed files with 12 additions and 1 deletions

View file

@ -4,4 +4,5 @@ public enum BroswerActionEnum
{
Click = 1,
InputText = 2,
Typing = 3,
}

View file

@ -7,5 +7,5 @@ public class MessageInfo
public string ContextId { get; set; } = null!;
public string? MessageId { get; set; }
public string? TaskId { get; set; }
public int StepNum { get; set; }
public string StepId { get; set; } = Guid.NewGuid().ToString();
}

View file

@ -95,12 +95,14 @@ public class UserController : ControllerBase
return UserViewModel.FromUser(user);
}
[AllowAnonymous]
[HttpGet("/user/name/existing")]
public async Task<bool> VerifyUserNameExisting([FromQuery] string userName)
{
return await _userService.VerifyUserNameExisting(userName);
}
[AllowAnonymous]
[HttpGet("/user/email/existing")]
public async Task<bool> VerifyEmailExisting([FromQuery] string email)
{

View file

@ -34,5 +34,13 @@ public partial class PlaywrightWebDriver
await locator.PressAsync(action.PressKey);
}
}
else if (action.Action == BroswerActionEnum.Typing)
{
await locator.PressSequentiallyAsync(action.Content);
if (action.PressKey != null)
{
await locator.PressAsync(action.PressKey);
}
}
}
}