Import AITURK IDE 1.0.0-beta.1 from Hermes 63279301; preserve MIT license
This commit is contained in:
commit
03634b1ca3
11340 files changed
+3442369
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import { cleanup, fireEvent, render, screen, within } from '@testing-library/react'
|
||||
import { afterEach, describe, expect, it } from 'vitest'
|
||||
|
||||
import { ShareControls } from './share-controls'
|
||||
|
||||
describe('ShareControls', () => {
|
||||
afterEach(() => {
|
||||
cleanup()
|
||||
})
|
||||
|
||||
it('opens its dialog when the trigger has a tooltip', async () => {
|
||||
render(<ShareControls shareCode="map-code" />)
|
||||
|
||||
const trigger = screen.getByRole('button', { name: 'Import / export map' })
|
||||
|
||||
fireEvent.pointerMove(trigger, { pointerType: 'mouse' })
|
||||
expect((await screen.findByRole('tooltip')).textContent).toContain('Import / export map')
|
||||
|
||||
fireEvent.click(trigger)
|
||||
|
||||
const dialog = await screen.findByRole('dialog')
|
||||
expect(within(dialog).getByRole('heading', { name: 'Import / export map' })).toBeTruthy()
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user