Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEST-282: Adding extension method #200

Merged
merged 6 commits into from
Sep 28, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 3 additions & 1 deletion Lombiq.Tests.UI.Shortcuts/Controllers/TenantsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public async Task<IActionResult> Create(
string urlPrefix,
string recipe,
string connectionString = "",
string databaseProvider = "Sqlite")
string databaseProvider = "Sqlite",
string featureProfile = "")
{
if (_shellHost.TryGetSettings(name, out _)) throw new InvalidOperationException("The tenant already exists.");

Expand All @@ -49,6 +50,7 @@ public async Task<IActionResult> Create(
shellSettings["DatabaseProvider"] = databaseProvider;
shellSettings["Secret"] = Guid.NewGuid().ToString();
shellSettings["RecipeName"] = recipe;
shellSettings["FeatureProfile"] = featureProfile;

await _shellHost.UpdateShellSettingsAsync(shellSettings);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public static async Task CreateAndEnterTenantAsync(
model ??= new CreateTenant();

await context.GoToAsync<TenantsController>(controller =>
controller.Create(name, urlPrefix, recipe, model.ConnectionString, model.DatabaseProvider));
controller.Create(name, urlPrefix, recipe, model.ConnectionString, model.DatabaseProvider, model.FeatureProfile));

await context.SetDropdownByValueAsync(By.Id("culturesList"), model.Language);
await context.ClickAndFillInWithRetriesAsync(By.Id("SiteName"), name);
Expand Down
7 changes: 4 additions & 3 deletions Lombiq.Tests.UI/Models/CreateTenant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ public class CreateTenant
{
public string ConnectionString { get; set; } = string.Empty;
public string DatabaseProvider { get; set; } = "Sqlite";
public string TimeZone { get; set; }
public string Language { get; set; } = "en";
public string UserName { get; set; } = DefaultUser.UserName;
public string Email { get; set; } = DefaultUser.Email;
public string FeatureProfile { get; set; }
public string Language { get; set; } = "en";
public string Password { get; set; } = DefaultUser.Password;
public string TimeZone { get; set; }
public string UserName { get; set; } = DefaultUser.UserName;
}