Files
cypress/system-tests/test/new_project_spec.js
T
Alejandro Estrada 0366d4fa89 feat: use supportFile by testingType (#19364)
* feat: use supportFile by testingType

* Fix defaults

* Start renaming files, and updating system-tests

* Fix some tests

* Fix some tests

* Fix more tests

* Try to fix CI

* Fix more tests

* Fix some tests

* Revert changes

* Revert supportFile defaultValue

* Fix some tests

* Fix some tests

* Fix some tests

* Fix some tests

* Update supportFile example

* Update snapshots

* Remove scaffold support

* Handle config errors

* Remove scaffold

* Fix tests

* Fix test

* Update test

* Fix test

* Update supportFile template

* Fix template
2022-01-05 13:37:44 -05:00

32 lines
857 B
JavaScript

const path = require('path')
const Fixtures = require('../lib/fixtures')
const systemTests = require('../lib/system-tests').default
const { fs } = require('@packages/server/lib/util/fs')
const noScaffoldingPath = Fixtures.projectPath('no-scaffolding')
const supportPath = path.join(noScaffoldingPath, 'cypress', 'support')
describe('e2e new project', () => {
systemTests.setup()
it('passes', function () {
return fs
.statAsync(supportPath)
.then(() => {
throw new Error('support folder should not exist')
}).catch(() => {
return systemTests.exec(this, {
project: 'no-scaffolding',
sanitizeScreenshotDimensions: true,
snapshot: true,
})
.then(() => {
return fs.statAsync(supportPath)
})
.catch((err) => {
expect(err.code).eq('ENOENT')
})
})
})
})