зеркало из https://github.com/golang/pkgsite.git
content,internal/frontend: fix directories tests
The frontend server tests are currently testing the old directories section, not the one with experiment directory-tree. Change-Id: Ieb03cf5ace4fc36ac2ee5ac39086418ff0a12566 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/297212 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
This commit is contained in:
Родитель
5382f3daf4
Коммит
efb0c4dfd7
|
@ -36,14 +36,8 @@
|
|||
{{if .Details.SourceFiles}}
|
||||
{{block "unit_files" .Details}}{{end}}
|
||||
{{end}}
|
||||
{{if (.Experiments.IsActive "directory-tree")}}
|
||||
{{if .Details.Directories}}
|
||||
{{block "unit_directories" .Details}}{{end}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{if (or .Details.Subdirectories .Details.NestedModules)}}
|
||||
{{block "legacy_unit_directories" .Details}}{{end}}
|
||||
{{end}}
|
||||
{{if .Details.Directories}}
|
||||
{{block "unit_directories" .Details}}{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="UnitDetails-meta" role="complementary" aria-label="links">
|
||||
|
|
|
@ -805,7 +805,7 @@ func serverTestCases() []serverTestCase {
|
|||
pagecheck.UnitHeader(v2pkgV100, versioned, isPackage),
|
||||
pagecheck.UnitReadme(),
|
||||
pagecheck.UnitDoc(),
|
||||
pagecheck.UnitDirectories(fmt.Sprintf("/%s@%s/%s/directory/hello", v2pkgV100.ModulePath, v2pkgV100.Version, v2pkgV100.Suffix), "directory/hello"),
|
||||
pagecheck.UnitDirectories(fmt.Sprintf("/%s@%s/%s/directory/hello", v2pkgV100.ModulePath, v2pkgV100.Version, v2pkgV100.Suffix), "hello"),
|
||||
pagecheck.CanonicalURLPath("/github.com/v2major/module_name@v1.0.0/bar")),
|
||||
},
|
||||
{
|
||||
|
@ -816,7 +816,7 @@ func serverTestCases() []serverTestCase {
|
|||
pagecheck.UnitHeader(&v2pkgV1Buz, versioned, isPackage),
|
||||
pagecheck.UnitReadme(),
|
||||
pagecheck.UnitDoc(),
|
||||
pagecheck.UnitDirectories(fmt.Sprintf("/%s@%s/%s/directory/hello", v2pkgV1Buz.ModulePath, v2pkgV1Buz.Version, v2pkgV1Buz.Suffix), "directory/hello"),
|
||||
pagecheck.UnitDirectories(fmt.Sprintf("/%s@%s/%s/directory/hello", v2pkgV1Buz.ModulePath, v2pkgV1Buz.Version, v2pkgV1Buz.Suffix), "hello"),
|
||||
pagecheck.CanonicalURLPath("/github.com/v2major/module_name@v1.0.0/buz")),
|
||||
},
|
||||
{
|
||||
|
@ -827,7 +827,7 @@ func serverTestCases() []serverTestCase {
|
|||
pagecheck.UnitHeader(v2pkgV200, versioned, isPackage),
|
||||
pagecheck.UnitReadme(),
|
||||
pagecheck.UnitDoc(),
|
||||
pagecheck.UnitDirectories(fmt.Sprintf("/%s@%s/%s/directory/hello", v2pkgV200.ModulePath, v2pkgV200.Version, v2pkgV200.Suffix), "directory/hello"),
|
||||
pagecheck.UnitDirectories(fmt.Sprintf("/%s@%s/%s/directory/hello", v2pkgV200.ModulePath, v2pkgV200.Version, v2pkgV200.Suffix), "hello"),
|
||||
pagecheck.CanonicalURLPath("/github.com/v2major/module_name/v2@v2.0.0/bar")),
|
||||
},
|
||||
{
|
||||
|
@ -838,7 +838,7 @@ func serverTestCases() []serverTestCase {
|
|||
pagecheck.UnitHeader(pkgV100, versioned, isPackage),
|
||||
pagecheck.UnitReadme(),
|
||||
pagecheck.UnitDoc(),
|
||||
pagecheck.UnitDirectories(fmt.Sprintf("/%s@%s/%s/directory/hello", sample.ModulePath, sample.VersionString, sample.Suffix), "directory/hello"),
|
||||
pagecheck.UnitDirectories(fmt.Sprintf("/%s@%s/%s/directory/hello", sample.ModulePath, sample.VersionString, sample.Suffix), "hello"),
|
||||
pagecheck.CanonicalURLPath("/github.com/valid/module_name@v1.0.0/foo")),
|
||||
},
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче