import { render, screen } from '@testing-library/react'
import { describe, expect, it } from 'vitest'
import { CommandPreview } from './CommandPreview'
describe('it displays demonstration video', () => {
it('when command is "copy link"', () => {
render()
expect(
screen.getByLabelText(
'Demonstration of the copy link command execution result',
),
).toBeInTheDocument()
})
it('when command is "Zoom to Fit"', () => {
render()
expect(
screen.getByLabelText(
'Demonstration of the Zoom to Fit command execution result',
),
).toBeInTheDocument()
})
it('when command is "Tidy Up"', () => {
render()
expect(
screen.getByLabelText(
'Demonstration of the Tidy Up command execution result',
),
).toBeInTheDocument()
})
})
describe('it displays demonstration image', () => {
it('when command is "Show All Fields"', () => {
render()
expect(
screen.getByAltText(
'Demonstration of the Show All Fields command execution result',
),
).toBeInTheDocument()
})
it('when command is "Show Key Only"', () => {
render()
expect(
screen.getByAltText(
'Demonstration of the Show Key Only command execution result',
),
).toBeInTheDocument()
})
it('when command is "Show Table Name"', () => {
render()
expect(
screen.getByAltText(
'Demonstration of the Show Table Name command execution result',
),
).toBeInTheDocument()
})
})