votingworks / vxsuite

https://voting.works
GNU General Public License v3.0
30 stars 6 forks source link

bmd: VxMarkOnly flow: cannot write long value when no card is present #596

Closed eventualbuddha closed 2 years ago

eventualbuddha commented 3 years ago
 FAIL  src/AppMarkOnly.test.tsx (23.037s)
  ● VxMarkOnly flow

    cannot write long value when no card is present

      214 |   public async writeLongUint8Array(value: Uint8Array): Promise<void> {
      215 |     if (!this.present) {
    > 216 |       throw new Error('cannot write long value when no card is present')
          |             ^
      217 |     }
      218 | 
      219 |     this.longValue = Uint8Array.from(value)

      at MemoryCard.writeLongUint8Array (src/utils/Card.ts:216:13)
      at Object.<anonymous> (src/AppRoot.tsx:843:18)
      at tick (../../node_modules/.pnpm/@rooks/use-interval@4.5.0_react@17.0.1/node_modules/@rooks/use-interval/lib/index.js:41:54)
      at Object.callback (../../node_modules/.pnpm/@jest/fake-timers@25.5.0/node_modules/@jest/fake-timers/build/jestFakeTimers.js:538:32)
      at FakeTimers._runTimerHandle (../../node_modules/.pnpm/@jest/fake-timers@25.5.0/node_modules/@jest/fake-timers/build/jestFakeTimers.js:597:15)
      at FakeTimers.advanceTimersByTime (../../node_modules/.pnpm/@jest/fake-timers@25.5.0/node_modules/@jest/fake-timers/build/jestFakeTimers.js:294:14)
      at test/helpers/smartcards.ts:189:10
      at batchedUpdates$1 (../../node_modules/.pnpm/react-dom@17.0.1_react@17.0.1/node_modules/react-dom/cjs/react-dom.development.js:22380:12)
      at act (../../node_modules/.pnpm/react-dom@17.0.1_react@17.0.1/node_modules/react-dom/cjs/react-dom-test-utils.development.js:1042:14)
      at advanceTimers (test/helpers/smartcards.ts:188:3)
      at advanceTimersAndPromises (test/helpers/smartcards.ts:196:3)
      at Object.<anonymous> (src/AppMarkOnly.test.tsx:190:9)

https://app.circleci.com/pipelines/github/votingworks/vxsuite/1378/workflows/0acac99b-7d9c-4c1d-b570-af399d0f763e/jobs/14617

benadida commented 2 years ago

@eventualbuddha @carolinemodic is this still a flaky test?

eventualbuddha commented 2 years ago

Yes, but it looks like I forgot about this and created #1402 so I'm closing this one.