fix: native View
wrapper crash missing when adding child view (#43638)
fix: native View wrapper crash missing when adding child view
This commit is contained in:
parent
dea6a4e5fb
commit
74b54278bf
3 changed files with 29 additions and 7 deletions
|
@ -36,6 +36,18 @@ describe('View', () => {
|
|||
expect(w.contentView.children).to.have.lengthOf(1);
|
||||
});
|
||||
|
||||
it('can be added as a child of another View', async () => {
|
||||
const w = new BaseWindow();
|
||||
const v1 = new View();
|
||||
const v2 = new View();
|
||||
|
||||
v1.addChildView(v2);
|
||||
w.contentView.addChildView(v1);
|
||||
|
||||
expect(w.contentView.children).to.deep.equal([v1]);
|
||||
expect(v1.children).to.deep.equal([v2]);
|
||||
});
|
||||
|
||||
it('correctly reorders children', () => {
|
||||
w = new BaseWindow({ show: false });
|
||||
const cv = new View();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue