2021-12-10 02:37:01 +00:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright Google LLC All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
|
*/
|
|
|
|
|
|
2021-04-28 22:50:06 +00:00
|
|
|
function showComments() {
|
2021-05-05 00:03:13 +00:00
|
|
|
cy.get('#nav-buttons > button:nth-child(2)').click();
|
2021-04-28 22:50:06 +00:00
|
|
|
cy.get('#mat-slide-toggle-3 > label > div').click();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
describe('Comment nodes', () => {
|
|
|
|
|
beforeEach(() => {
|
|
|
|
|
cy.visit('/');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('should not find any comment nodes by default', () => {
|
|
|
|
|
const nodes = cy.$$('.tree-node:contains("#comment")');
|
|
|
|
|
expect(nodes.length).to.eql(0);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('should find comment nodes when the setting is enabled', () => {
|
|
|
|
|
showComments();
|
2021-12-09 05:44:17 +00:00
|
|
|
cy.get('.tree-wrapper')
|
2024-01-16 21:35:47 +00:00
|
|
|
.find('.tree-node:contains("#comment")')
|
|
|
|
|
.its('length')
|
|
|
|
|
.should('not.eq', 0);
|
2021-04-28 22:50:06 +00:00
|
|
|
});
|
|
|
|
|
});
|