Skip to content

Commit

Permalink
Revert "test(core): add tests for control flow content projection wit…
Browse files Browse the repository at this point in the history
…h ng-container (#52726)" (#53012)

This reverts commit 181f8e4.

PR Close #53012
  • Loading branch information
crisbeto authored and AndrewKushnir committed Nov 17, 2023
1 parent 715218a commit 6f67d0c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 61 deletions.
31 changes: 0 additions & 31 deletions packages/core/test/acceptance/control_flow_for_spec.ts
Expand Up @@ -417,37 +417,6 @@ describe('control flow - for', () => {
expect(fixture.nativeElement.textContent).toBe('Main: Before one1two1one2two2 After Slot: ');
});

it('should project an @for with an ng-container root node', () => {
@Component({
standalone: true,
selector: 'test',
template: 'Main: <ng-content/> Slot: <ng-content select="[foo]"/>',
})
class TestComponent {
}

@Component({
standalone: true,
imports: [TestComponent],
template: `
<test>Before @for (item of items; track $index) {
<ng-container foo>
<span>{{item}}</span>
<span>|</span>
</ng-container>
} After</test>
`
})
class App {
items = [1, 2, 3];
}

const fixture = TestBed.createComponent(App);
fixture.detectChanges();

expect(fixture.nativeElement.textContent).toBe('Main: Before After Slot: 1|2|3|');
});

// Right now the template compiler doesn't collect comment nodes.
// This test is to ensure that we don't regress if it happens in the future.
it('should project an @for with single root node and comments into the root node slot', () => {
Expand Down
30 changes: 0 additions & 30 deletions packages/core/test/acceptance/control_flow_if_spec.ts
Expand Up @@ -317,36 +317,6 @@ describe('control flow - if', () => {
expect(fixture.nativeElement.textContent).toBe('Main: Before onetwo After Slot: ');
});

it('should project an @if with an ng-container root node', () => {
@Component({
standalone: true,
selector: 'test',
template: 'Main: <ng-content/> Slot: <ng-content select="[foo]"/>',
})
class TestComponent {
}

@Component({
standalone: true,
imports: [TestComponent],
template: `
<test>Before @if (true) {
<ng-container foo>
<span>foo</span>
<span>bar</span>
</ng-container>
} After</test>
`
})
class App {
}

const fixture = TestBed.createComponent(App);
fixture.detectChanges();

expect(fixture.nativeElement.textContent).toBe('Main: Before After Slot: foobar');
});

// Right now the template compiler doesn't collect comment nodes.
// This test is to ensure that we don't regress if it happens in the future.
it('should project an @if with a single root node and comments into the root node slot', () => {
Expand Down

0 comments on commit 6f67d0c

Please sign in to comment.