mirror of https://github.com/coder/coder.git
fix: make build table show empty instead of loading when none are recent (#5666)
* Fix builds to show empty instead of loading * Switch to backend fix * Increase e2e test timeout * Format
This commit is contained in:
parent
a5d39adf3e
commit
627fbe5874
|
@ -907,7 +907,8 @@ func (api *API) convertWorkspaceBuilds(
|
|||
templateVersionByID[templateVersion.ID] = templateVersion
|
||||
}
|
||||
|
||||
var apiBuilds []codersdk.WorkspaceBuild
|
||||
// Should never be nil for API consistency
|
||||
apiBuilds := []codersdk.WorkspaceBuild{}
|
||||
for _, build := range workspaceBuilds {
|
||||
job, exists := jobByID[build.JobID]
|
||||
if !exists {
|
||||
|
|
|
@ -171,6 +171,8 @@ func TestWorkspaceBuilds(t *testing.T) {
|
|||
)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, builds, 0)
|
||||
// Should never be nil for API consistency
|
||||
require.NotNil(t, builds)
|
||||
|
||||
builds, err = client.WorkspaceBuilds(ctx,
|
||||
codersdk.WorkspaceBuildsRequest{WorkspaceID: workspace.ID, Since: database.Now().Add(-time.Hour)},
|
||||
|
|
|
@ -4,7 +4,8 @@ import { SignInPage } from "../pom"
|
|||
import { clickButton, buttons, fillInput } from "../helpers"
|
||||
|
||||
test("Basic flow", async ({ baseURL, page }) => {
|
||||
test.slow()
|
||||
// We're keeping entire flows in one test, which means the test needs extra time.
|
||||
test.setTimeout(120000)
|
||||
await page.goto(baseURL + "/", { waitUntil: "networkidle" })
|
||||
|
||||
// Log-in with the default credentials we set up in the development server
|
||||
|
|
Loading…
Reference in New Issue