import { describe, it, expect } from 'vitest'
import { oilEn } from '../composables/useOilTranslation'

describe('Oil English Translation', () => {
  it('translates 薰衣草 → Lavender', () => {
    expect(oilEn('薰衣草')).toBe('Lavender')
  })

  it('translates 茶树 → Tea Tree', () => {
    expect(oilEn('茶树')).toBe('Tea Tree')
  })

  it('translates 乳香 → Frankincense', () => {
    expect(oilEn('乳香')).toBe('Frankincense')
  })

  it('translates 柠檬 → Lemon', () => {
    expect(oilEn('柠檬')).toBe('Lemon')
  })

  it('translates 椒样薄荷 → Peppermint', () => {
    expect(oilEn('椒样薄荷')).toBe('Peppermint')
  })

  it('translates 椰子油 → Coconut Oil', () => {
    expect(oilEn('椰子油')).toBe('Coconut Oil')
  })

  it('translates 雪松 → Cedarwood', () => {
    expect(oilEn('雪松')).toBe('Cedarwood')
  })

  it('translates 迷迭香 → Rosemary', () => {
    expect(oilEn('迷迭香')).toBe('Rosemary')
  })

  it('translates 天竺葵 → Geranium', () => {
    expect(oilEn('天竺葵')).toBe('Geranium')
  })

  it('translates 依兰依兰 → Ylang Ylang', () => {
    expect(oilEn('依兰依兰')).toBe('Ylang Ylang')
  })

  it('returns empty string for unknown oil', () => {
    expect(oilEn('不存在')).toBe('')
    expect(oilEn('随便什么')).toBe('')
  })

  it('returns empty string for empty input', () => {
    expect(oilEn('')).toBe('')
  })

  it('translates blend names', () => {
    expect(oilEn('芳香调理')).toBe('AromaTouch')
    expect(oilEn('保卫复方')).toBe('On Guard')
    expect(oilEn('乐活复方')).toBe('Balance')
    expect(oilEn('舒缓复方')).toBe('Past Tense')
    expect(oilEn('净化复方')).toBe('Purify')
    expect(oilEn('呼吸复方')).toBe('Breathe')
    expect(oilEn('舒压复方')).toBe('Adaptiv')
  })

  it('translates carrier oil', () => {
    expect(oilEn('椰子油')).toBe('Coconut Oil')
  })

  it('translates 玫瑰 → Rose', () => {
    expect(oilEn('玫瑰')).toBe('Rose')
  })

  it('translates 橙花 → Neroli', () => {
    expect(oilEn('橙花')).toBe('Neroli')
  })
})
