Skip to content

Backport Next 15 and React 19 to previous major#9809

Open
AlanBreck wants to merge 10 commits into
keystonejs:backportfrom
AlanBreck:v6-next15
Open

Backport Next 15 and React 19 to previous major#9809
AlanBreck wants to merge 10 commits into
keystonejs:backportfrom
AlanBreck:v6-next15

Conversation

@AlanBreck

Copy link
Copy Markdown
Contributor

This is an initial pass using Claude to port the changes from #9421 into the v6 branch.

@AlanBreck AlanBreck changed the base branch from main to v6 April 13, 2026 21:57
@dcousens

dcousens commented Apr 13, 2026

Copy link
Copy Markdown
Member

@AlanBreck ah this already raises an interesting point, this will need to be a major release of 7.0.0 either way; from a semver point of view; but upgrading should be trivial compared to the main major.

I am happy to continue, with the assumption that the new major in main will go on to be 8.0.0.

@dcousens

Copy link
Copy Markdown
Member

Renamed the target branch to backport

@dcousens dcousens changed the title Use Next 15 and React 19 in v6 branch Backport Next 15 and React 19 to previous major Apr 13, 2026
@AlanBreck

Copy link
Copy Markdown
Contributor Author

I am happy to continue, with the assumption that the new major in main will go on to be 8.0.0.

Sounds great. Thank you for your willingness to work on this!

@MauriceArikoglu

Copy link
Copy Markdown
Contributor

@dcousens whats missing for this to ship? Very much appreciating @AlanBreck for his efforts and would like to offer my help to get this up and running as it would make our life here easier as well 😅

@dcousens

Copy link
Copy Markdown
Member

@AlanBreck is this ready to come out of draft? Where did you end up

@dcousens

Copy link
Copy Markdown
Member

@MauriceArikoglu I have no doubt @AlanBreck would appreciate you pulling down the branch and testing yourself ❤️

@AlanBreck

Copy link
Copy Markdown
Contributor Author

I am happy to continue, with the assumption that the new major in main will go on to be 8.0.0.

I misunderstood happy to continue as taking over the PR, and consequently massively dropped the ball on this. I'm so sorry!

Where I left off was getting tests to pass. I believe one blocker is that React needs to be bumped in the design-system folder (though I'm unsure of why that wasn't an issue in the original PR).

@MauriceArikoglu I have no doubt @AlanBreck would appreciate you pulling down the branch and testing yourself ❤️

Definitely confirmed!

@MauriceArikoglu

Copy link
Copy Markdown
Contributor

@AlanBreck Since you are already pretty deep into the backport, I wouldnt wanna interfere with your code. What I can offer is looking at changes / reviewing or pair programming in a videocall to assist or even work on an unrelated branch on aiding with related topics. I think it doesnt make much sense to dive into your wip though.
Let me know if I can help!

@socket-security

socket-security Bot commented May 14, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​keystatic/​next@​5.0.1 ⏵ 5.0.497 +910067 +386 +1100
Added@​types/​react-dom@​19.2.31001007585100
Updated@​keystatic/​core@​0.5.39 ⏵ 0.5.5096 +710076 +291 -1100
Updated@​keystar/​ui@​0.7.12 ⏵ 0.7.2197 +810077 +384 -8100

View full report

@socket-security

socket-security Bot commented May 14, 2026

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@AlanBreck AlanBreck marked this pull request as ready for review May 14, 2026 20:59
@AlanBreck

AlanBreck commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

@dcousens, I'm getting failing tests on the original backport branch, so I'm not entirely certain what I need to do to verify that all is well with this PR.

@MauriceArikoglu

Copy link
Copy Markdown
Contributor

@dcousens, I'm getting failing tests on the original backport branch, so I'm not entirely certain what I need to do to verify that all is well with this PR.

@AlanBreck I owe you one for pursuing this update / PR

@AlanBreck

Copy link
Copy Markdown
Contributor Author

Hi @dcousens! Just nudging on the above for guidance on tests.

@dcousens

Copy link
Copy Markdown
Member

sorry I missed that request, I am running the CI now to see what comes up

@AlanBreck

Copy link
Copy Markdown
Contributor Author

Thanks, @dcousens! Any guidance on how to proceed with the test results would be greatly appreciated. Thank you!

@AlanBreck

Copy link
Copy Markdown
Contributor Author

Thanks for your work on this, @emmatown! Any direction on those last 3 failing tests?

@MauriceArikoglu

Copy link
Copy Markdown
Contributor

@emmatown @dcousens Any news on the tests?

@dcousens

Copy link
Copy Markdown
Member

@AlanBreck @MauriceArikoglu not yet, are you able to run the tests locally?

@AlanBreck

Copy link
Copy Markdown
Contributor Author

@AlanBreck @MauriceArikoglu not yet, are you able to run the tests locally?

I am, but I wasn't able to get clean running tests for the base branch, so it's difficult to know what exactly is broken due to this PR and what is irrelevant.

@MauriceArikoglu

Copy link
Copy Markdown
Contributor

@AlanBreck I have a fix on my local but cannot commit to your repo. Can you invite me so I can push the fix to your branch here?

@AlanBreck

Copy link
Copy Markdown
Contributor Author

@MauriceArikoglu, just sent an invite.

@MauriceArikoglu

Copy link
Copy Markdown
Contributor

@AlanBreck @MauriceArikoglu not yet, are you able to run the tests locally?

@dcousens yes. i pushed a fix

@AlanBreck

Copy link
Copy Markdown
Contributor Author

@dcousens yes. i pushed a fix

@MauriceArikoglu, I'm still getting a lot of failed tests. Seems that most are related to problems connecting to http://localhost:3000/, which is what I was seeing prior to your commit as well.

@dcousens

Copy link
Copy Markdown
Member

Seems to be resolved! Can we fix the linting and we should be good to land this

@AlanBreck

AlanBreck commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@dcousens yes. i pushed a fix

@MauriceArikoglu, I'm still getting a lot of failed tests. Seems that most are related to problems connecting to http://localhost:3000/, which is what I was seeing prior to your commit as well.

@dcousens, any theories as to why I'd be getting this? Output below:

Output

thrown: "Exceeded timeout of 1200000 ms for a test.
    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

      42 |   } = await spawnCommand3(testProjectPath, ['dev'], 'Admin UI ready'))
      43 |   browser = await chromium.launch()
    > 44 |   page = await browser.newPage()
         | ^
      45 |
      46 |   await loadIndex(page)
      47 | })

      at Object.<anonymous> (tests/admin-ui-tests/live-reloading.test.ts:44:1)

  ● Creating an item with the GraphQL API and navigating to the item page for it

    FetchError: request to http://localhost:3000/api/graphql failed, reason:

      at ClientRequest.<anonymous> (node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/lib/index.js:1501:11)

  ● api routes written with getAdditionalFiles containing [...rest] work

    FetchError: request to http://localhost:3000/api/blah/asdasdas/das/da/sdad failed, reason:

      at ClientRequest.<anonymous> (node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/lib/index.js:1501:11)

  ● changing the label of a field updates in the Admin UI

    TypeError: Cannot read properties of undefined (reading 'waitForSelector')

      75 |
      76 |   // Waiting for the visible label is more reliable than waiting on a fast rebuild log line.
    > 77 |   const element = await page.waitForSelector('label:has-text("Very Important Text") >> .. >> input')
         |                              ^
      78 |   const value = await element.inputValue()
      79 |   expect(value).toBe('blah')
      80 | })

      at Object.<anonymous> (tests/admin-ui-tests/live-reloading.test.ts:77:30)

  ● adding a virtual field

    TypeError: Cannot read properties of undefined (reading 'waitForSelector')

      80 | })
      81 |
    > 82 | test('adding a virtual field', async () => {
         |                              ^
      83 |   const element = await page.waitForSelector('label:has-text("Virtual") >> ..')
      84 |   const value = await element.textContent()
      85 |   expect(value).toBe('Virtualblah')

      at Object.<anonymous> (tests/admin-ui-tests/live-reloading.test.ts:82:30)

  ● a syntax error is shown and doesn't crash the process

    TypeError: Cannot read properties of undefined (reading 'stdout')

      111 | }
      112 |
    > 113 | const cliBinPath = require.resolve('@keystone-6/core/bin/cli.js')
          |       ^
      114 |
      115 | export async function spawnCommand3 (cwd: string, commands: string[], waitOn: string | null = null) {
      116 |   if (!fs.existsSync(cwd)) throw new Error(`No such file or directory ${cwd}`)

      at tests/admin-ui-tests/utils.ts:113:7
      at waitForIO (tests/admin-ui-tests/utils.ts:103:16)
      at Object.<anonymous> (tests/admin-ui-tests/live-reloading.test.ts:110:36)

  ● a runtime error is shown and doesn't crash the process

    TypeError: Cannot read properties of undefined (reading 'stdout')

      111 | }
      112 |
    > 113 | const cliBinPath = require.resolve('@keystone-6/core/bin/cli.js')
          |       ^
      114 |
      115 | export async function spawnCommand3 (cwd: string, commands: string[], waitOn: string | null = null) {
      116 |   if (!fs.existsSync(cwd)) throw new Error(`No such file or directory ${cwd}`)

      at tests/admin-ui-tests/utils.ts:113:7
      at waitForIO (tests/admin-ui-tests/utils.ts:103:16)
      at Object.<anonymous> (tests/admin-ui-tests/live-reloading.test.ts:114:36)

  ● errors can be recovered from

    TypeError: Cannot read properties of undefined (reading 'waitForSelector')

      116 |   await replaceSchema('syntax-error.js')
      117 |   await waitForIO(ksProcess, '✘ [ERROR] Expected ";" but found "const"')
    > 118 | })
          |   ^
      119 |
      120 | test("a runtime error is shown and doesn't crash the process", async () => {
      121 |   await replaceSchema('runtime-error.ts')

      at Object.<anonymous> (tests/admin-ui-tests/live-reloading.test.ts:118:30)


  ● Test suite failed to run

    TypeError: Cannot read properties of undefined (reading 'close')

      121 |   await replaceSchema('runtime-error.ts')
      122 |   await waitForIO(ksProcess, 'ReferenceError: doesNotExist is not defined')
    > 123 | })
          |   ^
      124 |
      125 | test('errors can be recovered from', async () => {
      126 |   await replaceSchema('initial.ts')

      at Object.<anonymous> (tests/admin-ui-tests/live-reloading.test.ts:123:38)

 FAIL  tests/admin-ui-tests/relations.test.ts (1206.56 s)
  ● development › prepare keystone

    thrown: "Exceeded timeout of 1200000 ms for a test.
    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

      83 |     let exit: (() => Promise<void>) | undefined = undefined
      84 |     test('prepare keystone', async () => {
    > 85 |       await (await spawnCommand3(projectDir, ['build'])).exited
         |     ^
      86 |       ;({ exit } = await spawnCommand3(projectDir, ['start'], 'Admin UI ready'))
      87 |     })
      88 |

      at tests/admin-ui-tests/utils.ts:85:5
      at adminUITests (tests/admin-ui-tests/utils.ts:83:3)
      at Object.<anonymous> (tests/admin-ui-tests/relations.test.ts:2:31)

  ● development › browser tests › Creating relation items inline does not submit main form

    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/tasks/create
    Call log:
      - navigating to "http://localhost:3000/tasks/create", waiting until "load"

       8 |   beforeAll(async () => {
       9 |     browser = await browserType.launch()
    > 10 |     page = await browser.newPage()
         |                ^
      11 |   })
      12 |
      13 |   test('Creating relation items inline does not submit main form', async () => {

      at Object.<anonymous> (tests/admin-ui-tests/relations.test.ts:10:16)

  ● production browser tests › prepare keystone

    Error 1

      125 |       if (typeof exitCode === 'number' && exitCode !== 0) return reject(new Error(`Error ${exitCode}`))
      126 |       resolve()
    > 127 |     })
          |       ^
      128 |   })
      129 |
      130 |   return {

      at ChildProcess.<anonymous> (tests/admin-ui-tests/utils.ts:127:73)

  ● production browser tests › browser tests › Creating relation items inline does not submit main form

    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/tasks/create
    Call log:
      - navigating to "http://localhost:3000/tasks/create", waiting until "load"

       8 |   beforeAll(async () => {
       9 |     browser = await browserType.launch()
    > 10 |     page = await browser.newPage()
         |                ^
      11 |   })
      12 |
      13 |   test('Creating relation items inline does not submit main form', async () => {

      at Object.<anonymous> (tests/admin-ui-tests/relations.test.ts:10:16)

 FAIL  tests/admin-ui-tests/init.test.ts (1206.566 s)
  ● development › prepare keystone

    thrown: "Exceeded timeout of 1200000 ms for a test.
    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

      83 |     let exit: (() => Promise<void>) | undefined = undefined
      84 |     test('prepare keystone', async () => {
    > 85 |       await (await spawnCommand3(projectDir, ['build'])).exited
         |     ^
      86 |       ;({ exit } = await spawnCommand3(projectDir, ['start'], 'Admin UI ready'))
      87 |     })
      88 |

      at tests/admin-ui-tests/utils.ts:85:5
      at adminUITests (tests/admin-ui-tests/utils.ts:83:3)
      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:2:31)

  ● development › browser tests › Task List card should be visible

    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/
    Call log:
      - navigating to "http://localhost:3000/", waiting until "load"

      46 |
      47 | export async function deleteAllData (projectDir: string) {
    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)
         |              ^
      49 |
      50 |   const { PrismaClient } = require(path.join(
      51 |     resolvedProjectDir,

      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)
      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)

  ● development › browser tests › Clicking on the logo should return you to the Dashboard route

    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/
    Call log:
      - navigating to "http://localhost:3000/", waiting until "load"

      46 |
      47 | export async function deleteAllData (projectDir: string) {
    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)
         |              ^
      49 |
      50 |   const { PrismaClient } = require(path.join(
      51 |     resolvedProjectDir,

      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)
      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)

  ● development › browser tests › Should see a 404 on request of the /init route

    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/
    Call log:
      - navigating to "http://localhost:3000/", waiting until "load"

      46 |
      47 | export async function deleteAllData (projectDir: string) {
    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)
         |              ^
      49 |
      50 |   const { PrismaClient } = require(path.join(
      51 |     resolvedProjectDir,

      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)
      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)

  ● development › browser tests › List View › If all items are deleted from the last page, users should be redirected to the previous page if one exists

    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/
    Call log:
      - navigating to "http://localhost:3000/", waiting until "load"

      46 |
      47 | export async function deleteAllData (projectDir: string) {
    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)
         |              ^
      49 |
      50 |   const { PrismaClient } = require(path.join(
      51 |     resolvedProjectDir,

      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)
      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)

  ● development › browser tests › List View › If all items are deleted from the last page, users should be redirected to the previous page if one exists

    PrismaClientInitializationError:
    Invalid `prisma.task.deleteMany()` invocation:


    error: Environment variable not found: DATABASE_URL.
      -->  schema.prisma:5
       |
     4 | datasource sqlite {
     5 |   url               = env("DATABASE_URL")
       |

    Validation Error Count: 1

      at Ln.handleRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:8053)
      at Ln.handleAndLogRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:7061)
      at Ln.request (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:6745)
      at l (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:130:9633)

  ● development › browser tests › List View › The page users are redirected to on complete deleletion of the last page, should have items

    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/
    Call log:
      - navigating to "http://localhost:3000/", waiting until "load"

      46 |
      47 | export async function deleteAllData (projectDir: string) {
    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)
         |              ^
      49 |
      50 |   const { PrismaClient } = require(path.join(
      51 |     resolvedProjectDir,

      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)
      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)

  ● development › browser tests › List View › The page users are redirected to on complete deleletion of the last page, should have items

    PrismaClientInitializationError:
    Invalid `prisma.task.deleteMany()` invocation:


    error: Environment variable not found: DATABASE_URL.
      -->  schema.prisma:5
       |
     4 | datasource sqlite {
     5 |   url               = env("DATABASE_URL")
       |

    Validation Error Count: 1

      at Ln.handleRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:8053)
      at Ln.handleAndLogRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:7061)
      at Ln.request (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:6745)
      at l (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:130:9633)

  ● production browser tests › prepare keystone

    Error 1

      125 |       if (typeof exitCode === 'number' && exitCode !== 0) return reject(new Error(`Error ${exitCode}`))
      126 |       resolve()
    > 127 |     })
          |       ^
      128 |   })
      129 |
      130 |   return {

      at ChildProcess.<anonymous> (tests/admin-ui-tests/utils.ts:127:73)

  ● production browser tests › browser tests › Task List card should be visible

    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/
    Call log:
      - navigating to "http://localhost:3000/", waiting until "load"

      46 |
      47 | export async function deleteAllData (projectDir: string) {
    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)
         |              ^
      49 |
      50 |   const { PrismaClient } = require(path.join(
      51 |     resolvedProjectDir,

      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)
      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)

  ● production browser tests › browser tests › Clicking on the logo should return you to the Dashboard route

    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/
    Call log:
      - navigating to "http://localhost:3000/", waiting until "load"

      46 |
      47 | export async function deleteAllData (projectDir: string) {
    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)
         |              ^
      49 |
      50 |   const { PrismaClient } = require(path.join(
      51 |     resolvedProjectDir,

      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)
      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)

  ● production browser tests › browser tests › Should see a 404 on request of the /init route

    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/
    Call log:
      - navigating to "http://localhost:3000/", waiting until "load"

      46 |
      47 | export async function deleteAllData (projectDir: string) {
    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)
         |              ^
      49 |
      50 |   const { PrismaClient } = require(path.join(
      51 |     resolvedProjectDir,

      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)
      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)

  ● production browser tests › browser tests › List View › If all items are deleted from the last page, users should be redirected to the previous page if one exists

    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/
    Call log:
      - navigating to "http://localhost:3000/", waiting until "load"

      46 |
      47 | export async function deleteAllData (projectDir: string) {
    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)
         |              ^
      49 |
      50 |   const { PrismaClient } = require(path.join(
      51 |     resolvedProjectDir,

      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)
      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)

  ● production browser tests › browser tests › List View › If all items are deleted from the last page, users should be redirected to the previous page if one exists

    PrismaClientInitializationError:
    Invalid `prisma.task.deleteMany()` invocation:


    error: Environment variable not found: DATABASE_URL.
      -->  schema.prisma:5
       |
     4 | datasource sqlite {
     5 |   url               = env("DATABASE_URL")
       |

    Validation Error Count: 1

      at Ln.handleRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:8053)
      at Ln.handleAndLogRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:7061)
      at Ln.request (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:6745)
      at l (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:130:9633)

  ● production browser tests › browser tests › List View › The page users are redirected to on complete deleletion of the last page, should have items

    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/
    Call log:
      - navigating to "http://localhost:3000/", waiting until "load"

      46 |
      47 | export async function deleteAllData (projectDir: string) {
    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)
         |              ^
      49 |
      50 |   const { PrismaClient } = require(path.join(
      51 |     resolvedProjectDir,

      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)
      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)

  ● production browser tests › browser tests › List View › The page users are redirected to on complete deleletion of the last page, should have items

    PrismaClientInitializationError:
    Invalid `prisma.task.deleteMany()` invocation:


    error: Environment variable not found: DATABASE_URL.
      -->  schema.prisma:5
       |
     4 | datasource sqlite {
     5 |   url               = env("DATABASE_URL")
       |

    Validation Error Count: 1

      at Ln.handleRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:8053)
      at Ln.handleAndLogRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:7061)
      at Ln.request (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:6745)
      at l (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:130:9633)

 FAIL  tests/admin-ui-tests/list-view-crud.test.ts (1219.738 s)
  ● development › prepare keystone

    thrown: "Exceeded timeout of 1200000 ms for a test.
    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

      83 |     let exit: (() => Promise<void>) | undefined = undefined
      84 |     test('prepare keystone', async () => {
    > 85 |       await (await spawnCommand3(projectDir, ['build'])).exited
         |     ^
      86 |       ;({ exit } = await spawnCommand3(projectDir, ['start'], 'Admin UI ready'))
      87 |     })
      88 |

      at tests/admin-ui-tests/utils.ts:85:5
      at adminUITests (tests/admin-ui-tests/utils.ts:83:3)
      at Object.<anonymous> (tests/admin-ui-tests/list-view-crud.test.ts:2:31)

  ● development › browser tests › Complete deletion success, only shows the successful deletion prompt

    PrismaClientInitializationError:
    Invalid `prisma.task.deleteMany()` invocation:


    error: Environment variable not found: DATABASE_URL.
      -->  schema.prisma:5
       |
     4 | datasource sqlite {
     5 |   url               = env("DATABASE_URL")
       |

    Validation Error Count: 1

      at Ln.handleRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:8053)
      at Ln.handleAndLogRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:7061)
      at Ln.request (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:6745)
      at l (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:130:9633)

  ● development › browser tests › Complete deletion failure, only shows the successful failure prompt

    PrismaClientInitializationError:
    Invalid `prisma.task.deleteMany()` invocation:


    error: Environment variable not found: DATABASE_URL.
      -->  schema.prisma:5
       |
     4 | datasource sqlite {
     5 |   url               = env("DATABASE_URL")
       |

    Validation Error Count: 1

      at Ln.handleRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:8053)
      at Ln.handleAndLogRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:7061)
      at Ln.request (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:6745)
      at l (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:130:9633)

  ● development › browser tests › Partial deletion failure

    PrismaClientInitializationError:
    Invalid `prisma.task.deleteMany()` invocation:


    error: Environment variable not found: DATABASE_URL.
      -->  schema.prisma:5
       |
     4 | datasource sqlite {
     5 |   url               = env("DATABASE_URL")
       |

    Validation Error Count: 1

      at Ln.handleRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:8053)
      at Ln.handleAndLogRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:7061)
      at Ln.request (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:6745)
      at l (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:130:9633)

  ● production browser tests › browser tests › Complete deletion success, only shows the successful deletion prompt

    PrismaClientInitializationError:
    Invalid `prisma.task.deleteMany()` invocation:


    error: Environment variable not found: DATABASE_URL.
      -->  schema.prisma:5
       |
     4 | datasource sqlite {
     5 |   url               = env("DATABASE_URL")
       |

    Validation Error Count: 1

      at Ln.handleRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:8053)
      at Ln.handleAndLogRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:7061)
      at Ln.request (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:6745)
      at l (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:130:9633)

  ● production browser tests › browser tests › Complete deletion failure, only shows the successful failure prompt

    PrismaClientInitializationError:
    Invalid `prisma.task.deleteMany()` invocation:


    error: Environment variable not found: DATABASE_URL.
      -->  schema.prisma:5
       |
     4 | datasource sqlite {
     5 |   url               = env("DATABASE_URL")
       |

    Validation Error Count: 1

      at Ln.handleRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:8053)
      at Ln.handleAndLogRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:7061)
      at Ln.request (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:6745)
      at l (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:130:9633)

  ● production browser tests › browser tests › Partial deletion failure

    PrismaClientInitializationError:
    Invalid `prisma.task.deleteMany()` invocation:


    error: Environment variable not found: DATABASE_URL.
      -->  schema.prisma:5
       |
     4 | datasource sqlite {
     5 |   url               = env("DATABASE_URL")
       |

    Validation Error Count: 1

      at Ln.handleRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:8053)
      at Ln.handleAndLogRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:7061)
      at Ln.request (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:6745)
      at l (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:130:9633)

(node:76566) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 4)
(Use `node --trace-warnings ...` to show where the warning was created)
 FAIL  tests/admin-ui-tests/filters.test.ts (1219.822 s)
  ● development › prepare keystone

    thrown: "Exceeded timeout of 1200000 ms for a test.
    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

      83 |     let exit: (() => Promise<void>) | undefined = undefined
      84 |     test('prepare keystone', async () => {
    > 85 |       await (await spawnCommand3(projectDir, ['build'])).exited
         |     ^
      86 |       ;({ exit } = await spawnCommand3(projectDir, ['start'], 'Admin UI ready'))
      87 |     })
      88 |

      at tests/admin-ui-tests/utils.ts:85:5
      at adminUITests (tests/admin-ui-tests/utils.ts:83:3)
      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:25:31)

  ● development › browser tests › relationship filters › Lists are filterable by relationships

    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/
    Call log:
      - navigating to "http://localhost:3000/", waiting until "load"

      46 |
      47 | export async function deleteAllData (projectDir: string) {
    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)
         |              ^
      49 |
      50 |   const { PrismaClient } = require(path.join(
      51 |     resolvedProjectDir,

      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)
      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:33:38)

  ● development › browser tests › relationship filters › Lists are filterable by relationships

    page.evaluate: Execution context was destroyed, most likely because of a navigation

      36 |             }
      37 |           }
    > 38 |         }
         |                  ^
      39 |       `
      40 |       const CREATE_TASKS = gql`
      41 |         mutation CREATE_TASKS_MUTATION($data: [TaskCreateInput!]!) {

      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:38:18)

  ● development › browser tests › relationship filters › Deeplinking a url with the appropriate relationship filter query params will apply the filter

    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/
    Call log:
      - navigating to "http://localhost:3000/", waiting until "load"

      46 |
      47 | export async function deleteAllData (projectDir: string) {
    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)
         |              ^
      49 |
      50 |   const { PrismaClient } = require(path.join(
      51 |     resolvedProjectDir,

      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)
      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:33:38)

  ● development › browser tests › relationship filters › Deeplinking a url with the appropriate relationship filter query params will apply the filter

    page.evaluate: SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

      at UtilityScript.evaluate (<anonymous>:236:17)
      at UtilityScript.<anonymous> (<anonymous>:1:44)
      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:38:18)

  ● production browser tests › browser tests › relationship filters › Lists are filterable by relationships

    page.goto: net::ERR_CONNECTION_RESET at http://localhost:3000/
    Call log:
      - navigating to "http://localhost:3000/", waiting until "load"

      46 |
      47 | export async function deleteAllData (projectDir: string) {
    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)
         |              ^
      49 |
      50 |   const { PrismaClient } = require(path.join(
      51 |     resolvedProjectDir,

      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)
      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:33:38)

  ● production browser tests › browser tests › relationship filters › Lists are filterable by relationships

    page.evaluate: Execution context was destroyed, most likely because of a navigation

      36 |             }
      37 |           }
    > 38 |         }
         |                  ^
      39 |       `
      40 |       const CREATE_TASKS = gql`
      41 |         mutation CREATE_TASKS_MUTATION($data: [TaskCreateInput!]!) {

      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:38:18)

  ● production browser tests › browser tests › relationship filters › Deeplinking a url with the appropriate relationship filter query params will apply the filter

    page.goto: net::ERR_CONNECTION_RESET at http://localhost:3000/
    Call log:
      - navigating to "http://localhost:3000/", waiting until "load"

      46 |
      47 | export async function deleteAllData (projectDir: string) {
    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)
         |              ^
      49 |
      50 |   const { PrismaClient } = require(path.join(
      51 |     resolvedProjectDir,

      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)
      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:33:38)

  ● production browser tests › browser tests › relationship filters › Deeplinking a url with the appropriate relationship filter query params will apply the filter

    page.evaluate: SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

      at UtilityScript.evaluate (<anonymous>:236:17)
      at UtilityScript.<anonymous> (<anonymous>:1:44)
      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:38:18)


  ● Test suite failed to run

    Error 1

      125 |       if (typeof exitCode === 'number' && exitCode !== 0) return reject(new Error(`Error ${exitCode}`))
      126 |       resolve()
    > 127 |     })
          |       ^
      128 |   })
      129 |
      130 |   return {

      at ChildProcess.<anonymous> (tests/admin-ui-tests/utils.ts:127:73)

  ● Test suite failed to run

    Error 1

      125 |       if (typeof exitCode === 'number' && exitCode !== 0) return reject(new Error(`Error ${exitCode}`))
      126 |       resolve()
    > 127 |     })
          |       ^
      128 |   })
      129 |
      130 |   return {

      at ChildProcess.<anonymous> (tests/admin-ui-tests/utils.ts:127:73)

Test Suites: 5 failed, 1 passed, 6 total
Tests:       36 failed, 19 passed, 55 total
Snapshots:   1 passed, 1 total
Time:        1220.005 s, estimated 1224 s
Ran all test suites matching /tests\/admin-ui-tests/i.
 ELIFECYCLE  Command failed with exit code 1.

@dcousens

dcousens commented Jun 17, 2026

Copy link
Copy Markdown
Member

@AlanBreck are you sandboxed or running in Docker or similar? Firewall?
For whatever reason, your tests cannot see Keystone at localhost:3000

@MauriceArikoglu

Copy link
Copy Markdown
Contributor

@dcousens yes. i pushed a fix

@MauriceArikoglu, I'm still getting a lot of failed tests. Seems that most are related to problems connecting to http://localhost:3000/, which is what I was seeing prior to your commit as well.

@dcousens, any theories as to why I'd be getting this? Output below:

Output


thrown: "Exceeded timeout of 1200000 ms for a test.

    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."



      42 |   } = await spawnCommand3(testProjectPath, ['dev'], 'Admin UI ready'))

      43 |   browser = await chromium.launch()

    > 44 |   page = await browser.newPage()

         | ^

      45 |

      46 |   await loadIndex(page)

      47 | })



      at Object.<anonymous> (tests/admin-ui-tests/live-reloading.test.ts:44:1)



  ● Creating an item with the GraphQL API and navigating to the item page for it



    FetchError: request to http://localhost:3000/api/graphql failed, reason:



      at ClientRequest.<anonymous> (node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/lib/index.js:1501:11)



  ● api routes written with getAdditionalFiles containing [...rest] work



    FetchError: request to http://localhost:3000/api/blah/asdasdas/das/da/sdad failed, reason:



      at ClientRequest.<anonymous> (node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/lib/index.js:1501:11)



  ● changing the label of a field updates in the Admin UI



    TypeError: Cannot read properties of undefined (reading 'waitForSelector')



      75 |

      76 |   // Waiting for the visible label is more reliable than waiting on a fast rebuild log line.

    > 77 |   const element = await page.waitForSelector('label:has-text("Very Important Text") >> .. >> input')

         |                              ^

      78 |   const value = await element.inputValue()

      79 |   expect(value).toBe('blah')

      80 | })



      at Object.<anonymous> (tests/admin-ui-tests/live-reloading.test.ts:77:30)



  ● adding a virtual field



    TypeError: Cannot read properties of undefined (reading 'waitForSelector')



      80 | })

      81 |

    > 82 | test('adding a virtual field', async () => {

         |                              ^

      83 |   const element = await page.waitForSelector('label:has-text("Virtual") >> ..')

      84 |   const value = await element.textContent()

      85 |   expect(value).toBe('Virtualblah')



      at Object.<anonymous> (tests/admin-ui-tests/live-reloading.test.ts:82:30)



  ● a syntax error is shown and doesn't crash the process



    TypeError: Cannot read properties of undefined (reading 'stdout')



      111 | }

      112 |

    > 113 | const cliBinPath = require.resolve('@keystone-6/core/bin/cli.js')

          |       ^

      114 |

      115 | export async function spawnCommand3 (cwd: string, commands: string[], waitOn: string | null = null) {

      116 |   if (!fs.existsSync(cwd)) throw new Error(`No such file or directory ${cwd}`)



      at tests/admin-ui-tests/utils.ts:113:7

      at waitForIO (tests/admin-ui-tests/utils.ts:103:16)

      at Object.<anonymous> (tests/admin-ui-tests/live-reloading.test.ts:110:36)



  ● a runtime error is shown and doesn't crash the process



    TypeError: Cannot read properties of undefined (reading 'stdout')



      111 | }

      112 |

    > 113 | const cliBinPath = require.resolve('@keystone-6/core/bin/cli.js')

          |       ^

      114 |

      115 | export async function spawnCommand3 (cwd: string, commands: string[], waitOn: string | null = null) {

      116 |   if (!fs.existsSync(cwd)) throw new Error(`No such file or directory ${cwd}`)



      at tests/admin-ui-tests/utils.ts:113:7

      at waitForIO (tests/admin-ui-tests/utils.ts:103:16)

      at Object.<anonymous> (tests/admin-ui-tests/live-reloading.test.ts:114:36)



  ● errors can be recovered from



    TypeError: Cannot read properties of undefined (reading 'waitForSelector')



      116 |   await replaceSchema('syntax-error.js')

      117 |   await waitForIO(ksProcess, '✘ [ERROR] Expected ";" but found "const"')

    > 118 | })

          |   ^

      119 |

      120 | test("a runtime error is shown and doesn't crash the process", async () => {

      121 |   await replaceSchema('runtime-error.ts')



      at Object.<anonymous> (tests/admin-ui-tests/live-reloading.test.ts:118:30)





  ● Test suite failed to run



    TypeError: Cannot read properties of undefined (reading 'close')



      121 |   await replaceSchema('runtime-error.ts')

      122 |   await waitForIO(ksProcess, 'ReferenceError: doesNotExist is not defined')

    > 123 | })

          |   ^

      124 |

      125 | test('errors can be recovered from', async () => {

      126 |   await replaceSchema('initial.ts')



      at Object.<anonymous> (tests/admin-ui-tests/live-reloading.test.ts:123:38)



 FAIL  tests/admin-ui-tests/relations.test.ts (1206.56 s)

  ● development › prepare keystone



    thrown: "Exceeded timeout of 1200000 ms for a test.

    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."



      83 |     let exit: (() => Promise<void>) | undefined = undefined

      84 |     test('prepare keystone', async () => {

    > 85 |       await (await spawnCommand3(projectDir, ['build'])).exited

         |     ^

      86 |       ;({ exit } = await spawnCommand3(projectDir, ['start'], 'Admin UI ready'))

      87 |     })

      88 |



      at tests/admin-ui-tests/utils.ts:85:5

      at adminUITests (tests/admin-ui-tests/utils.ts:83:3)

      at Object.<anonymous> (tests/admin-ui-tests/relations.test.ts:2:31)



  ● development › browser tests › Creating relation items inline does not submit main form



    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/tasks/create

    Call log:

      - navigating to "http://localhost:3000/tasks/create", waiting until "load"



       8 |   beforeAll(async () => {

       9 |     browser = await browserType.launch()

    > 10 |     page = await browser.newPage()

         |                ^

      11 |   })

      12 |

      13 |   test('Creating relation items inline does not submit main form', async () => {



      at Object.<anonymous> (tests/admin-ui-tests/relations.test.ts:10:16)



  ● production browser tests › prepare keystone



    Error 1



      125 |       if (typeof exitCode === 'number' && exitCode !== 0) return reject(new Error(`Error ${exitCode}`))

      126 |       resolve()

    > 127 |     })

          |       ^

      128 |   })

      129 |

      130 |   return {



      at ChildProcess.<anonymous> (tests/admin-ui-tests/utils.ts:127:73)



  ● production browser tests › browser tests › Creating relation items inline does not submit main form



    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/tasks/create

    Call log:

      - navigating to "http://localhost:3000/tasks/create", waiting until "load"



       8 |   beforeAll(async () => {

       9 |     browser = await browserType.launch()

    > 10 |     page = await browser.newPage()

         |                ^

      11 |   })

      12 |

      13 |   test('Creating relation items inline does not submit main form', async () => {



      at Object.<anonymous> (tests/admin-ui-tests/relations.test.ts:10:16)



 FAIL  tests/admin-ui-tests/init.test.ts (1206.566 s)

  ● development › prepare keystone



    thrown: "Exceeded timeout of 1200000 ms for a test.

    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."



      83 |     let exit: (() => Promise<void>) | undefined = undefined

      84 |     test('prepare keystone', async () => {

    > 85 |       await (await spawnCommand3(projectDir, ['build'])).exited

         |     ^

      86 |       ;({ exit } = await spawnCommand3(projectDir, ['start'], 'Admin UI ready'))

      87 |     })

      88 |



      at tests/admin-ui-tests/utils.ts:85:5

      at adminUITests (tests/admin-ui-tests/utils.ts:83:3)

      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:2:31)



  ● development › browser tests › Task List card should be visible



    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/

    Call log:

      - navigating to "http://localhost:3000/", waiting until "load"



      46 |

      47 | export async function deleteAllData (projectDir: string) {

    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)

         |              ^

      49 |

      50 |   const { PrismaClient } = require(path.join(

      51 |     resolvedProjectDir,



      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)

      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)



  ● development › browser tests › Clicking on the logo should return you to the Dashboard route



    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/

    Call log:

      - navigating to "http://localhost:3000/", waiting until "load"



      46 |

      47 | export async function deleteAllData (projectDir: string) {

    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)

         |              ^

      49 |

      50 |   const { PrismaClient } = require(path.join(

      51 |     resolvedProjectDir,



      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)

      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)



  ● development › browser tests › Should see a 404 on request of the /init route



    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/

    Call log:

      - navigating to "http://localhost:3000/", waiting until "load"



      46 |

      47 | export async function deleteAllData (projectDir: string) {

    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)

         |              ^

      49 |

      50 |   const { PrismaClient } = require(path.join(

      51 |     resolvedProjectDir,



      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)

      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)



  ● development › browser tests › List View › If all items are deleted from the last page, users should be redirected to the previous page if one exists



    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/

    Call log:

      - navigating to "http://localhost:3000/", waiting until "load"



      46 |

      47 | export async function deleteAllData (projectDir: string) {

    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)

         |              ^

      49 |

      50 |   const { PrismaClient } = require(path.join(

      51 |     resolvedProjectDir,



      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)

      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)



  ● development › browser tests › List View › If all items are deleted from the last page, users should be redirected to the previous page if one exists



    PrismaClientInitializationError:

    Invalid `prisma.task.deleteMany()` invocation:





    error: Environment variable not found: DATABASE_URL.

      -->  schema.prisma:5

       |

     4 | datasource sqlite {

     5 |   url               = env("DATABASE_URL")

       |



    Validation Error Count: 1



      at Ln.handleRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:8053)

      at Ln.handleAndLogRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:7061)

      at Ln.request (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:6745)

      at l (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:130:9633)



  ● development › browser tests › List View › The page users are redirected to on complete deleletion of the last page, should have items



    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/

    Call log:

      - navigating to "http://localhost:3000/", waiting until "load"



      46 |

      47 | export async function deleteAllData (projectDir: string) {

    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)

         |              ^

      49 |

      50 |   const { PrismaClient } = require(path.join(

      51 |     resolvedProjectDir,



      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)

      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)



  ● development › browser tests › List View › The page users are redirected to on complete deleletion of the last page, should have items



    PrismaClientInitializationError:

    Invalid `prisma.task.deleteMany()` invocation:





    error: Environment variable not found: DATABASE_URL.

      -->  schema.prisma:5

       |

     4 | datasource sqlite {

     5 |   url               = env("DATABASE_URL")

       |



    Validation Error Count: 1



      at Ln.handleRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:8053)

      at Ln.handleAndLogRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:7061)

      at Ln.request (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:6745)

      at l (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:130:9633)



  ● production browser tests › prepare keystone



    Error 1



      125 |       if (typeof exitCode === 'number' && exitCode !== 0) return reject(new Error(`Error ${exitCode}`))

      126 |       resolve()

    > 127 |     })

          |       ^

      128 |   })

      129 |

      130 |   return {



      at ChildProcess.<anonymous> (tests/admin-ui-tests/utils.ts:127:73)



  ● production browser tests › browser tests › Task List card should be visible



    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/

    Call log:

      - navigating to "http://localhost:3000/", waiting until "load"



      46 |

      47 | export async function deleteAllData (projectDir: string) {

    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)

         |              ^

      49 |

      50 |   const { PrismaClient } = require(path.join(

      51 |     resolvedProjectDir,



      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)

      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)



  ● production browser tests › browser tests › Clicking on the logo should return you to the Dashboard route



    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/

    Call log:

      - navigating to "http://localhost:3000/", waiting until "load"



      46 |

      47 | export async function deleteAllData (projectDir: string) {

    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)

         |              ^

      49 |

      50 |   const { PrismaClient } = require(path.join(

      51 |     resolvedProjectDir,



      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)

      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)



  ● production browser tests › browser tests › Should see a 404 on request of the /init route



    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/

    Call log:

      - navigating to "http://localhost:3000/", waiting until "load"



      46 |

      47 | export async function deleteAllData (projectDir: string) {

    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)

         |              ^

      49 |

      50 |   const { PrismaClient } = require(path.join(

      51 |     resolvedProjectDir,



      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)

      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)



  ● production browser tests › browser tests › List View › If all items are deleted from the last page, users should be redirected to the previous page if one exists



    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/

    Call log:

      - navigating to "http://localhost:3000/", waiting until "load"



      46 |

      47 | export async function deleteAllData (projectDir: string) {

    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)

         |              ^

      49 |

      50 |   const { PrismaClient } = require(path.join(

      51 |     resolvedProjectDir,



      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)

      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)



  ● production browser tests › browser tests › List View › If all items are deleted from the last page, users should be redirected to the previous page if one exists



    PrismaClientInitializationError:

    Invalid `prisma.task.deleteMany()` invocation:





    error: Environment variable not found: DATABASE_URL.

      -->  schema.prisma:5

       |

     4 | datasource sqlite {

     5 |   url               = env("DATABASE_URL")

       |



    Validation Error Count: 1



      at Ln.handleRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:8053)

      at Ln.handleAndLogRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:7061)

      at Ln.request (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:6745)

      at l (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:130:9633)



  ● production browser tests › browser tests › List View › The page users are redirected to on complete deleletion of the last page, should have items



    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/

    Call log:

      - navigating to "http://localhost:3000/", waiting until "load"



      46 |

      47 | export async function deleteAllData (projectDir: string) {

    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)

         |              ^

      49 |

      50 |   const { PrismaClient } = require(path.join(

      51 |     resolvedProjectDir,



      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)

      at Object.<anonymous> (tests/admin-ui-tests/init.test.ts:8:38)



  ● production browser tests › browser tests › List View › The page users are redirected to on complete deleletion of the last page, should have items



    PrismaClientInitializationError:

    Invalid `prisma.task.deleteMany()` invocation:





    error: Environment variable not found: DATABASE_URL.

      -->  schema.prisma:5

       |

     4 | datasource sqlite {

     5 |   url               = env("DATABASE_URL")

       |



    Validation Error Count: 1



      at Ln.handleRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:8053)

      at Ln.handleAndLogRequestError (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:7061)

      at Ln.request (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:121:6745)

      at l (tests/test-projects/basic/node_modules/.testprisma/client/runtime/library.js:130:9633)



 FAIL  tests/admin-ui-tests/list-view-crud.test.ts (1219.738 s)

  ● development › prepare keystone



    thrown: "Exceeded timeout of 1200000 ms for a test.

    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."



      83 |     let exit: (() => Promise<void>) | undefined = undefined

      84 |     test('prepare keystone', async () => {

    > 85 |       await (await spawnCommand3(projectDir, ['build'])).exited

         |     ^

      86 |       ;({ exit } = await spawnCommand3(projectDir, ['start'], 'Admin UI ready'))

      87 |     })

      88 |



      at tests/admin-ui-tests/utils.ts:85:5

      at adminUITests (tests/admin-ui-tests/utils.ts:83:3)

      at Object.<anonymous> (tests/admin-ui-tests/list-view-crud.test.ts:2:31)



  ● development › browser tests › Complete deletion success, only shows the successful deletion prompt



    PrismaClientInitializationError:

    Invalid `prisma.task.deleteMany()` invocation:





    error: Environment variable not found: DATABASE_URL.

      -->  schema.prisma:5

       |

     4 | datasource sqlite {

     5 |   url               = env("DATABASE_URL")

       |



    Validation Error Count: 1



      at Ln.handleRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:8053)

      at Ln.handleAndLogRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:7061)

      at Ln.request (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:6745)

      at l (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:130:9633)



  ● development › browser tests › Complete deletion failure, only shows the successful failure prompt



    PrismaClientInitializationError:

    Invalid `prisma.task.deleteMany()` invocation:





    error: Environment variable not found: DATABASE_URL.

      -->  schema.prisma:5

       |

     4 | datasource sqlite {

     5 |   url               = env("DATABASE_URL")

       |



    Validation Error Count: 1



      at Ln.handleRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:8053)

      at Ln.handleAndLogRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:7061)

      at Ln.request (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:6745)

      at l (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:130:9633)



  ● development › browser tests › Partial deletion failure



    PrismaClientInitializationError:

    Invalid `prisma.task.deleteMany()` invocation:





    error: Environment variable not found: DATABASE_URL.

      -->  schema.prisma:5

       |

     4 | datasource sqlite {

     5 |   url               = env("DATABASE_URL")

       |



    Validation Error Count: 1



      at Ln.handleRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:8053)

      at Ln.handleAndLogRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:7061)

      at Ln.request (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:6745)

      at l (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:130:9633)



  ● production browser tests › browser tests › Complete deletion success, only shows the successful deletion prompt



    PrismaClientInitializationError:

    Invalid `prisma.task.deleteMany()` invocation:





    error: Environment variable not found: DATABASE_URL.

      -->  schema.prisma:5

       |

     4 | datasource sqlite {

     5 |   url               = env("DATABASE_URL")

       |



    Validation Error Count: 1



      at Ln.handleRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:8053)

      at Ln.handleAndLogRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:7061)

      at Ln.request (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:6745)

      at l (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:130:9633)



  ● production browser tests › browser tests › Complete deletion failure, only shows the successful failure prompt



    PrismaClientInitializationError:

    Invalid `prisma.task.deleteMany()` invocation:





    error: Environment variable not found: DATABASE_URL.

      -->  schema.prisma:5

       |

     4 | datasource sqlite {

     5 |   url               = env("DATABASE_URL")

       |



    Validation Error Count: 1



      at Ln.handleRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:8053)

      at Ln.handleAndLogRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:7061)

      at Ln.request (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:6745)

      at l (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:130:9633)



  ● production browser tests › browser tests › Partial deletion failure



    PrismaClientInitializationError:

    Invalid `prisma.task.deleteMany()` invocation:





    error: Environment variable not found: DATABASE_URL.

      -->  schema.prisma:5

       |

     4 | datasource sqlite {

     5 |   url               = env("DATABASE_URL")

       |



    Validation Error Count: 1



      at Ln.handleRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:8053)

      at Ln.handleAndLogRequestError (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:7061)

      at Ln.request (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:121:6745)

      at l (tests/test-projects/crud-notifications/node_modules/.testprisma/client/runtime/library.js:130:9633)



(node:76566) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 4)

(Use `node --trace-warnings ...` to show where the warning was created)

 FAIL  tests/admin-ui-tests/filters.test.ts (1219.822 s)

  ● development › prepare keystone



    thrown: "Exceeded timeout of 1200000 ms for a test.

    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."



      83 |     let exit: (() => Promise<void>) | undefined = undefined

      84 |     test('prepare keystone', async () => {

    > 85 |       await (await spawnCommand3(projectDir, ['build'])).exited

         |     ^

      86 |       ;({ exit } = await spawnCommand3(projectDir, ['start'], 'Admin UI ready'))

      87 |     })

      88 |



      at tests/admin-ui-tests/utils.ts:85:5

      at adminUITests (tests/admin-ui-tests/utils.ts:83:3)

      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:25:31)



  ● development › browser tests › relationship filters › Lists are filterable by relationships



    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/

    Call log:

      - navigating to "http://localhost:3000/", waiting until "load"



      46 |

      47 | export async function deleteAllData (projectDir: string) {

    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)

         |              ^

      49 |

      50 |   const { PrismaClient } = require(path.join(

      51 |     resolvedProjectDir,



      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)

      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:33:38)



  ● development › browser tests › relationship filters › Lists are filterable by relationships



    page.evaluate: Execution context was destroyed, most likely because of a navigation



      36 |             }

      37 |           }

    > 38 |         }

         |                  ^

      39 |       `

      40 |       const CREATE_TASKS = gql`

      41 |         mutation CREATE_TASKS_MUTATION($data: [TaskCreateInput!]!) {



      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:38:18)



  ● development › browser tests › relationship filters › Deeplinking a url with the appropriate relationship filter query params will apply the filter



    page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/

    Call log:

      - navigating to "http://localhost:3000/", waiting until "load"



      46 |

      47 | export async function deleteAllData (projectDir: string) {

    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)

         |              ^

      49 |

      50 |   const { PrismaClient } = require(path.join(

      51 |     resolvedProjectDir,



      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)

      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:33:38)



  ● development › browser tests › relationship filters › Deeplinking a url with the appropriate relationship filter query params will apply the filter



    page.evaluate: SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.



      at UtilityScript.evaluate (<anonymous>:236:17)

      at UtilityScript.<anonymous> (<anonymous>:1:44)

      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:38:18)



  ● production browser tests › browser tests › relationship filters › Lists are filterable by relationships



    page.goto: net::ERR_CONNECTION_RESET at http://localhost:3000/

    Call log:

      - navigating to "http://localhost:3000/", waiting until "load"



      46 |

      47 | export async function deleteAllData (projectDir: string) {

    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)

         |              ^

      49 |

      50 |   const { PrismaClient } = require(path.join(

      51 |     resolvedProjectDir,



      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)

      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:33:38)



  ● production browser tests › browser tests › relationship filters › Lists are filterable by relationships



    page.evaluate: Execution context was destroyed, most likely because of a navigation



      36 |             }

      37 |           }

    > 38 |         }

         |                  ^

      39 |       `

      40 |       const CREATE_TASKS = gql`

      41 |         mutation CREATE_TASKS_MUTATION($data: [TaskCreateInput!]!) {



      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:38:18)



  ● production browser tests › browser tests › relationship filters › Deeplinking a url with the appropriate relationship filter query params will apply the filter



    page.goto: net::ERR_CONNECTION_RESET at http://localhost:3000/

    Call log:

      - navigating to "http://localhost:3000/", waiting until "load"



      46 |

      47 | export async function deleteAllData (projectDir: string) {

    > 48 |   const resolvedProjectDir = path.resolve(projectRoot, projectDir)

         |              ^

      49 |

      50 |   const { PrismaClient } = require(path.join(

      51 |     resolvedProjectDir,



      at loadIndex (tests/admin-ui-tests/utils.ts:48:14)

      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:33:38)



  ● production browser tests › browser tests › relationship filters › Deeplinking a url with the appropriate relationship filter query params will apply the filter



    page.evaluate: SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.



      at UtilityScript.evaluate (<anonymous>:236:17)

      at UtilityScript.<anonymous> (<anonymous>:1:44)

      at Object.<anonymous> (tests/admin-ui-tests/filters.test.ts:38:18)





  ● Test suite failed to run



    Error 1



      125 |       if (typeof exitCode === 'number' && exitCode !== 0) return reject(new Error(`Error ${exitCode}`))

      126 |       resolve()

    > 127 |     })

          |       ^

      128 |   })

      129 |

      130 |   return {



      at ChildProcess.<anonymous> (tests/admin-ui-tests/utils.ts:127:73)



  ● Test suite failed to run



    Error 1



      125 |       if (typeof exitCode === 'number' && exitCode !== 0) return reject(new Error(`Error ${exitCode}`))

      126 |       resolve()

    > 127 |     })

          |       ^

      128 |   })

      129 |

      130 |   return {



      at ChildProcess.<anonymous> (tests/admin-ui-tests/utils.ts:127:73)



Test Suites: 5 failed, 1 passed, 6 total

Tests:       36 failed, 19 passed, 55 total

Snapshots:   1 passed, 1 total

Time:        1220.005 s, estimated 1224 s

Ran all test suites matching /tests\/admin-ui-tests/i.

 ELIFECYCLE  Command failed with exit code 1.

@AlanBreck what version of node are you using? I tested with 20.19 - similar to what CI has configured

@MauriceArikoglu

Copy link
Copy Markdown
Contributor

@dcousens @emmatown Lint runs locally now

@MauriceArikoglu

Copy link
Copy Markdown
Contributor

@dcousens looking good now. Do you have an idea when we can expect this to land?

@AlanBreck

AlanBreck commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@AlanBreck are you sandboxed or running in Docker or similar? Firewall?
For whatever reason, your tests cannot see Keystone at localhost:3000

@dcousens, no VPN, firewall, or docker container at use. While the tests are running, I'm also able to visit localhost:3000`.

@AlanBreck what version of node are you using? I tested with 20.19 - similar to what CI has configured

Tried downgrading to v20.19.6, but no dice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants