mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-26 08:59:26 -05:00
474bcddbd3
* make tests preprocessor agnostic * update eslintignore * put back deps needed for e2e test * remove obselete snapshot it was replaced by 1_typescript_support_spec.ts.js * switch from browserify to webpack preprocessor * cmon github * fix/update tests * bump preprocessor and update snapshots * update snapshots * bump preprocessor to gain json support * fix e2e tests with webpack-originated errors * bump preprocessor version, fix node globals * update snapshot * remove support for ? in file path * bump preprocessor version * bump preprocessor again * bump preprocessor * bump preprocessor * update snapshots * bump preprocessor version * bump preprocessor, quiet the paths plugin * add test verifying tsconfig paths work * bump batteries-included preprocessor and install latest webpack preprocessor beside it * update snapshots * put back snapshot * update snapshot * update snapshot Co-authored-by: Brian Mann <brian.mann86@gmail.com>
41 lines
1.2 KiB
JavaScript
41 lines
1.2 KiB
JavaScript
const fs = require('fs-extra')
|
|
const path = require('path')
|
|
|
|
const e2e = require('../support/helpers/e2e').default
|
|
const Fixtures = require('../support/helpers/fixtures')
|
|
|
|
const nonExistentSpec = Fixtures.projectPath('non-existent-spec')
|
|
const e2eProject = Fixtures.projectPath('e2e')
|
|
|
|
describe('e2e plugins', () => {
|
|
e2e.setup()
|
|
|
|
it('fails when spec does not exist', function () {
|
|
return e2e.exec(this, {
|
|
spec: 'spec.js',
|
|
project: nonExistentSpec,
|
|
sanitizeScreenshotDimensions: true,
|
|
snapshot: true,
|
|
expectedExitCode: 1,
|
|
})
|
|
})
|
|
|
|
it('handles specs with $, &, and + in file name', function () {
|
|
const relativeSpecPath = path.join('dir&1%', '%dir2&', 's%p+ec&.js')
|
|
const specPath = path.join(e2eProject, 'cypress', 'integration', relativeSpecPath)
|
|
|
|
return fs.outputFile(specPath, 'it(\'passes\', () => {})')
|
|
.then(() => {
|
|
return e2e.exec(this, {
|
|
spec: specPath,
|
|
sanitizeScreenshotDimensions: true,
|
|
})
|
|
}).then(({ stdout }) => {
|
|
expect(stdout).to.include(`1 found (${relativeSpecPath})`)
|
|
expect(stdout).to.include(`Running: ${relativeSpecPath}`)
|
|
|
|
expect(stdout).to.include(`Finished processing: /XXX/XXX/XXX/cypress/videos/${relativeSpecPath}.mp4`)
|
|
})
|
|
})
|
|
})
|