import helpers from 'yeoman-test'
import assert from 'yeoman-assert'
import path from 'path'
import { baseFiles } from '../lib/filesToAssert'
import {
  shopName,
  shopKey,
  shopPassword,
  shopSecret,
  shopThemeId
} from '../lib/mockPrompts'

describe('Base Files', function () {
  beforeEach(function () {
    return helpers.run(path.join(__dirname, '../generators/app'))
      .withOptions({
        noAnims: true
      })
      .withPrompts({
        projectName: 'Awesome Test Project',
        setShopNow: true,
        shopName,
        shopKey,
        shopPassword,
        shopSecret,
        shopThemeId
      })
      .toPromise()
  })

  it('creates expected base files', function () {
    assert.file(baseFiles)
  })
})

@@ -726,12 +726,291 @@
 es)%0A  %7D)
+%0A%0A  it('Writes our options where we need them', function () %7B%0A    assert.fileContent('.env', shopName)%0A    assert.fileContent('.env', shopKey)%0A    assert.fileContent('.env', shopPassword)%0A    assert.fileContent('.env', shopSecret)%0A    assert.fileContent('.env', shopThemeId)%0A  %7D)
 %0A%7D)%0A

test assertions as well