angular/devtools/cypress/integration/comment-nodes.e2e.js
Joey Perrott 9dbe6fc18b refactor: update license text to point to angular.dev (#57901)
Update license text to point to angular.dev instead of angular.io

PR Close #57901
2024-09-24 15:33:00 +02:00

31 lines
813 B
JavaScript

/**
* @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.dev/license
*/
function showComments() {
cy.get('#nav-buttons > button:nth-child(2)').click();
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();
cy.get('.tree-wrapper')
.find('.tree-node:contains("#comment")')
.its('length')
.should('not.eq', 0);
});
});