Skip to content

Commit

Permalink
Fix index path (#12256)
Browse files Browse the repository at this point in the history
* Fix index path

* Fix index tests
  • Loading branch information
mlqn authored Feb 6, 2024
1 parent f73ce31 commit cac55a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -305,7 +306,7 @@ public bool TryGetFrontendVersion(AltinnRepoEditingContext altinnRepoEditingCont

try
{
indexFilePath = altinnAppGitRepository.FindFiles(new[] { "App/Views/Home/Index.cshtml" }).FirstOrDefault();
indexFilePath = altinnAppGitRepository.FindFiles(new[] { "App/views/Home/Index.cshtml" }).FirstOrDefault();
}
catch (DirectoryNotFoundException)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public async Task GetAppVersion_GivenCsProjFile_ShouldReturnOK(string org, strin
{ "[[appLibVersion]]", backendVersion }, { "[[frontendVersion]]", frontendVersion }
};
await AddCsProjToRepo("App/App.csproj", csprojTemplate, replacements);
await AddFrontendIndexToRepo("App/Views/Home/Index.cshtml", indesCshtmlTemplate, replacements);
await AddFrontendIndexToRepo("App/views/Home/Index.cshtml", indesCshtmlTemplate, replacements);

string url = VersionPrefix(org, targetRepository);

Expand Down Expand Up @@ -101,7 +101,7 @@ public async Task GetAppVersion_GivenIndexFileWithoutFrontendVersion_ShouldRetur
await CopyRepositoryForTest(org, app, developer, targetRepository);
await AddCsProjToRepo("App/App.csproj", csprojTemplate,
new Dictionary<string, string>() { { "[[appLibVersion]]", backendVersion } });
await AddFrontendIndexToRepo("App/Views/Home/Index.cshtml", indesCshtmlTemplate);
await AddFrontendIndexToRepo("App/views/Home/Index.cshtml", indesCshtmlTemplate);
string url = VersionPrefix(org, targetRepository);

using var response = await HttpClient.GetAsync(url);
Expand Down

0 comments on commit cac55a0

Please sign in to comment.