-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: lint system tests in CI #25673
Changes from 10 commits
2dddd92
212b3ed
38be77d
d521e0c
18bfdb0
9724886
05ce462
31f2813
2526efe
5e619e2
aec4d1b
1284304
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# purposeful syntax errors | ||
system-tests/projects/config-with-ts-module-error/cypress.config.ts | ||
system-tests/projects/config-with-ts-syntax-error/cypress.config.ts | ||
system-tests/projects/e2e/cypress/e2e/stdout_exit_early_failing.cy.js | ||
system-tests/projects/e2e/cypress/e2e/typescript_syntax_error.cy.ts | ||
system-tests/projects/e2e/lib/fail.js | ||
system-tests/projects/e2e/static/fail.js | ||
system-tests/projects/ids/cypress/e2e/dom.jsx | ||
system-tests/projects/no-specs/src/Invalid.jsx | ||
system-tests/projects/todos/tests/_fixtures/bad_js.js | ||
system-tests/projects/todos/tests/_fixtures/bar.js | ||
system-tests/projects/todos/tests/_fixtures/foo.js | ||
system-tests/projects/todos/tests/_fixtures/nested/fixture.js | ||
system-tests/projects/todos/tests/_fixtures/no_format.js | ||
system-tests/projects/todos/tests/_fixtures/trailing_new_line.js | ||
system-tests/projects/todos/tests/_fixtures/user.js | ||
system-tests/project-fixtures/react/src/AppCompilationError.cy.jsx | ||
|
||
# 3rd party | ||
system-tests/projects/e2e/static/jquery.js | ||
|
||
# snapshots | ||
system-tests/projects/pristine/expected-cypress-js-component-create-react-app-v5/cypress.config.js | ||
system-tests/projects/pristine/expected-cypress-js-e2e/cypress.config.js | ||
system-tests/projects/pristine/expected-cypress-js-e2e-without-fixtures/cypress.config.js | ||
system-tests/projects/pristine-module/expected-cypress-js-e2e/cypress.config.js | ||
system-tests/projects/pristine-cjs-project/expected-cypress-js-component-vue.js-3-webpack/cypress.config.js |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,8 @@ | |
}, | ||
"extends": [ | ||
"plugin:@cypress/dev/tests" | ||
] | ||
], | ||
"rules": { | ||
"no-console": "off" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we should be blindly disabling There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO it's ok to do here since these are all tests in this directory - there's no risk of a console log making it to prod. It's used pretty often in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are these specifically in the mocha test files?or also in the mocked projects we are testing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both. For example, some of the projects do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This rule catches mistakes fairly often for me in other test files, but I can see the case for turning it off in |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,4 @@ declare global { | |
} | ||
} | ||
|
||
|
||
Cypress.Commands.add('mount', mount); | ||
Cypress.Commands.add('mount', mount) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { Component, EventEmitter, Output } from "@angular/core"; | ||
import { Component, EventEmitter, Output } from '@angular/core' | ||
|
||
@Component({ | ||
selector: 'app-button-output', | ||
template: `<button (click)="clicked.emit(true)">Click Me</button>` | ||
template: `<button (click)="clicked.emit(true)">Click Me</button>`, | ||
}) | ||
export class ButtonOutputComponent { | ||
@Output() clicked: EventEmitter<boolean> = new EventEmitter() | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import { Component } from "@angular/core"; | ||
import { CounterService } from "./counter.service"; | ||
import { Component } from '@angular/core' | ||
import { CounterService } from './counter.service' | ||
|
||
@Component({ | ||
selector: "counter-component", | ||
selector: 'counter-component', | ||
template: `<button (click)="increment()"> | ||
Increment: {{ count$ | async }} | ||
</button>`, | ||
}) | ||
export class CounterComponent { | ||
count$ = this.counterService.count$; | ||
|
||
constructor(private counterService: CounterService) {} | ||
constructor (private counterService: CounterService) {} | ||
|
||
increment() { | ||
this.counterService.increment(); | ||
increment () { | ||
this.counterService.increment() | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { Injectable } from "@angular/core"; | ||
import { BehaviorSubject } from "rxjs"; | ||
import { Injectable } from '@angular/core' | ||
import { BehaviorSubject } from 'rxjs' | ||
|
||
@Injectable() | ||
export class CounterService { | ||
private count = new BehaviorSubject<number>(0); | ||
public count$ = this.count.asObservable(); | ||
|
||
public increment() { | ||
this.count.next(this.count.value + 1); | ||
public increment () { | ||
this.count.next(this.count.value + 1) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { Component } from "@angular/core"; | ||
import { Component } from '@angular/core' | ||
|
||
@Component({ | ||
selector: 'app-logo', | ||
template: `<img src="assets/cypress-logo-light.png" />` | ||
template: `<img src="assets/cypress-logo-light.png" />`, | ||
}) | ||
export class LogoComponent {} | ||
export class LogoComponent {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { Component } from '@angular/core'; | ||
import { Component } from '@angular/core' | ||
|
||
@Component({ | ||
template: ` | ||
<app-child-providers></app-child-providers> | ||
<app-another-child></app-another-child>` | ||
<app-another-child></app-another-child>`, | ||
}) | ||
export class ParentProvidersComponent {} | ||
export class ParentProvidersComponent {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { Component } from "@angular/core"; | ||
import { Component } from '@angular/core' | ||
|
||
@Component({ | ||
selector: "parent-component", | ||
selector: 'parent-component', | ||
template: '<child-component [msg]="msg"></child-component>', | ||
}) | ||
export class ParentComponent { | ||
msg = "Hello World from ParentComponent"; | ||
msg = 'Hello World from ParentComponent'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did these change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the
Errors.cy.jsx
files and otherErrors.*
files were changed so the stack trace locations changed