mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-12 18:29:53 -05:00
chore: specify coffee fixtures / convert others (#9433)
This commit is contained in:
@@ -7,13 +7,13 @@ exports['e2e uncaught support file errors failing 1'] = `
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Cypress: 1.2.3 │
|
||||
│ Browser: FooBrowser 88 │
|
||||
│ Specs: 1 found (spec.coffee) │
|
||||
│ Specs: 1 found (spec.js) │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: spec.coffee (1 of 1)
|
||||
Running: spec.js (1 of 1)
|
||||
|
||||
|
||||
1) An uncaught error was detected outside of a test
|
||||
@@ -47,20 +47,20 @@ We dynamically generated a new test to display this failure.
|
||||
│ Screenshots: 1 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: spec.coffee │
|
||||
│ Spec Ran: spec.js │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Screenshots)
|
||||
|
||||
- /XXX/XXX/XXX/cypress/screenshots/spec.coffee/An uncaught error was detected outs (YxX)
|
||||
ide of a test (failed).png
|
||||
- /XXX/XXX/XXX/cypress/screenshots/spec.js/An uncaught error was detected outside (YxX)
|
||||
of a test (failed).png
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/spec.coffee.mp4 (X second)
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/spec.js.mp4 (X second)
|
||||
|
||||
|
||||
====================================================================================================
|
||||
@@ -70,7 +70,7 @@ We dynamically generated a new test to display this failure.
|
||||
|
||||
Spec Tests Passing Failing Pending Skipped
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ ✖ spec.coffee XX:XX 1 - 1 - - │
|
||||
│ ✖ spec.js XX:XX 1 - 1 - - │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
✖ 1 of 1 failed (100%) XX:XX 1 - 1 - -
|
||||
|
||||
|
||||
@@ -519,9 +519,9 @@ class Project extends EE {
|
||||
// example:
|
||||
//
|
||||
// /Users/bmann/Dev/cypress-app/.projects/cypress/integration
|
||||
// /Users/bmann/Dev/cypress-app/.projects/cypress/integration/foo.coffee
|
||||
// /Users/bmann/Dev/cypress-app/.projects/cypress/integration/foo.js
|
||||
//
|
||||
// becomes /integration/foo.coffee
|
||||
// becomes /integration/foo.js
|
||||
|
||||
const folderToUse = type === 'integration' ? integrationFolder : componentFolder
|
||||
|
||||
|
||||
@@ -85,10 +85,10 @@ function findSpecsOfType (searchOptions, specPattern) {
|
||||
}
|
||||
|
||||
// example of resolved paths in the returned spec object
|
||||
// filePath = /Users/bmann/Dev/my-project/cypress/integration/foo.coffee
|
||||
// filePath = /Users/bmann/Dev/my-project/cypress/integration/foo.js
|
||||
// integrationFolderPath = /Users/bmann/Dev/my-project/cypress/integration
|
||||
// relativePathFromSearchFolder = foo.coffee
|
||||
// relativePathFromProjectRoot = cypress/integration/foo.coffee
|
||||
// relativePathFromSearchFolder = foo.js
|
||||
// relativePathFromProjectRoot = cypress/integration/foo.js
|
||||
|
||||
const relativePathFromSearchFolder = (file) => {
|
||||
return path.relative(searchFolderPath, file)
|
||||
|
||||
-1
@@ -1 +0,0 @@
|
||||
it "foo", ->
|
||||
+1
@@ -0,0 +1 @@
|
||||
it('foo', () => { })
|
||||
@@ -219,8 +219,8 @@ ParseError: Unterminated string constant\
|
||||
|
||||
context('coffee files', () => {
|
||||
it('returns valid coffee object', function () {
|
||||
return fixture.get(this.fixturesFolder, 'account.coffee').then((account) => {
|
||||
expect(account).to.deep.eq({
|
||||
return fixture.get(this.fixturesFolder, 'valid_coffee_obj.coffee').then((coffeeObj) => {
|
||||
expect(coffeeObj).to.deep.eq({
|
||||
name: 'cypress',
|
||||
users: [],
|
||||
})
|
||||
@@ -228,8 +228,8 @@ ParseError: Unterminated string constant\
|
||||
})
|
||||
|
||||
it('does not rewrite coffee files', function () {
|
||||
return fixture.get(this.fixturesFolder, 'no_format.coffee').then(() => {
|
||||
return fs.readFileAsync(`${this.fixturesFolder}/no_format.coffee`, 'utf8').then((str) => {
|
||||
return fixture.get(this.fixturesFolder, 'no_format_coffee.coffee').then(() => {
|
||||
return fs.readFileAsync(`${this.fixturesFolder}/no_format_coffee.coffee`, 'utf8').then((str) => {
|
||||
expect(str).to.eq(`\
|
||||
[
|
||||
{id: 1}
|
||||
@@ -453,8 +453,8 @@ John,Chef,1982
|
||||
})
|
||||
|
||||
it('does not remove trailing new lines on .coffee', function () {
|
||||
return fixture.get(this.fixturesFolder, 'trailing_new_line.coffee').then((str) => {
|
||||
return fs.readFileAsync(`${this.fixturesFolder}/trailing_new_line.coffee`, 'utf8').then((str2) => {
|
||||
return fixture.get(this.fixturesFolder, 'trailing_new_line_coffee.coffee').then((str) => {
|
||||
return fs.readFileAsync(`${this.fixturesFolder}/trailing_new_line_coffee.coffee`, 'utf8').then((str2) => {
|
||||
expect(str2).to.eq('{ foo: "bar" }\n')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -702,8 +702,8 @@ describe('lib/socket', () => {
|
||||
})
|
||||
|
||||
it('calls statAsync on .coffee file', function () {
|
||||
return this.socket.onTestFileChange('foo/bar.coffee').then(() => {
|
||||
expect(fs.statAsync).to.be.calledWith('foo/bar.coffee')
|
||||
return this.socket.onTestFileChange('foo/bar_coffee.coffee').then(() => {
|
||||
expect(fs.statAsync).to.be.calledWith('foo/bar_coffee.coffee')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user