diff --git a/app/Http/Controllers/BuildController.php b/app/Http/Controllers/BuildController.php index 19ac0e99f2..5155b2dfd3 100644 --- a/app/Http/Controllers/BuildController.php +++ b/app/Http/Controllers/BuildController.php @@ -117,6 +117,7 @@ public function summary(int $build_id): View } return $this->vue('build-summary', 'Build Summary', [ + 'project-id' => $this->project->Id, 'build-id' => $this->build->Id, 'previous-build-id' => $previous_buildid, 'next-build-id' => $next_buildid, diff --git a/graphql/schema.graphql b/graphql/schema.graphql index b5cf15209d..ef47af8d78 100644 --- a/graphql/schema.graphql +++ b/graphql/schema.graphql @@ -805,7 +805,7 @@ type Build { # TODO: Determine if there are more specific values we can use for this "Type." - buildType: String! @rename(attribute: "type") + buildType: String! @rename(attribute: "type") @filterable "The version of CTest used to generate this build. Example: ctest-2.9.20091218" generator: String! @filterable @@ -920,7 +920,7 @@ type Build { files: [UploadedFile!]! @hasMany(relation: "uploadedFiles", type: CONNECTION, scopes: ["files"]) @orderBy(column: "id", direction: ASC) - subProject: SubProject! @belongsTo + subProject: SubProject @belongsTo configure: Configure @hasOneThrough @@ -1433,9 +1433,9 @@ type UploadedFile @model(class: "App\\Models\\UploadFile") { # TODO: add the rest of the fields once types and relationships are solidified. type SubProject { "Unique primary key." - id: ID! + id: ID! @filterable - name: String! + name: String! @filterable } diff --git a/resources/js/vue/components/BuildSummary.vue b/resources/js/vue/components/BuildSummary.vue index 87615e789e..caadd2acf8 100644 --- a/resources/js/vue/components/BuildSummary.vue +++ b/resources/js/vue/components/BuildSummary.vue @@ -418,20 +418,6 @@
- -
- History -
- - - Show Build History - -
-
-
-
- Graphs -
- - -
- -
-
- - -
- -
-
- - -
- -
-
- - -
- -
+
+
+ Build History + + + Show History + +
+
+ +
-
diff --git a/tests/Browser/Pages/BuildSummaryPageTest.php b/tests/Browser/Pages/BuildSummaryPageTest.php index 1ca65ac1ce..a950835b45 100644 --- a/tests/Browser/Pages/BuildSummaryPageTest.php +++ b/tests/Browser/Pages/BuildSummaryPageTest.php @@ -64,6 +64,33 @@ public function testShowsBuildName(): void }); } + public function testShowsHistoryLink(): void + { + $buildName = 'TestBuild_' . Str::uuid()->toString(); + $buildType = 'Nightly'; + $startTime = '2024-03-15T08:30:00+00:00'; + + /** @var Build $build */ + $build = $this->project->builds()->create([ + 'siteid' => $this->site->id, + 'name' => $buildName, + 'type' => $buildType, + 'starttime' => $startTime, + 'uuid' => Str::uuid()->toString(), + ]); + + $this->browse(function (Browser $browser) use ($build, $buildName, $buildType, $startTime): void { + $browser->visit("/builds/{$build->id}") + ->waitForText('Show History') + ->assertAttributeContains('@build-history-link', 'href', 'project=' . urlencode($this->project->name)) + ->assertAttributeContains('@build-history-link', 'href', 'value1=' . urlencode($this->site->name)) + ->assertAttributeContains('@build-history-link', 'href', 'value2=' . $buildName) + ->assertAttributeContains('@build-history-link', 'href', 'value3=' . $buildType) + ->assertAttributeContains('@build-history-link', 'href', 'value4=' . $startTime) + ; + }); + } + public function testShowsComments(): void { /** @var Build $build */