-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: Add config for enable detectChange manually
- Loading branch information
1 parent
fb12678
commit 1027487
Showing
10 changed files
with
105 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
examples/ng9/src/app/html-mount/html-mount.component.cy-spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { initEnvHtml, mountHtml } from 'cypress-angular-unit-test'; | ||
import { HtmlMountComponent } from './html-mount.component'; | ||
|
||
|
||
describe('HtmlMountComponent', () => { | ||
|
||
beforeEach(() => { | ||
initEnvHtml(HtmlMountComponent); | ||
}); | ||
|
||
it('mount work', () => { | ||
const fixture = mountHtml('<app-html-mount></app-html-mount>'); | ||
fixture.detectChanges(); | ||
cy.contains('works !'); | ||
}); | ||
|
||
it('mount with input work', () => { | ||
const fixture = mountHtml(`<app-html-mount [data]="'my input'"></app-html-mount>`); | ||
fixture.detectChanges(); | ||
cy.contains('works !'); | ||
cy.contains('my input'); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
works ! | ||
{{data}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Component, OnInit, Input } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-html-mount', | ||
templateUrl: './html-mount.component.html', | ||
}) | ||
export class HtmlMountComponent implements OnInit { | ||
|
||
@Input() data = ''; | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} |
6 changes: 4 additions & 2 deletions
6
examples/ng9/src/app/on-push-strat/on-push-strat.component.cy-spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export class CypressAngularConfig { | ||
|
||
detectChanges = true; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
examples/ng9/src/app/fake.component.ts → lib/proxy.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters