angular/devtools/cypress/integration/comment-nodes.e2e.js
Georgi Serev 9d803c51f4
feat(devtools): create a new settings menu
Create a new settings menu with more available space for new options and better organization and classification.
2026-05-01 15:54:26 -07:00

31 lines
826 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('.main-toolbar > .settings > button:last-child').click();
cy.get('ng-settings #show-comment-nodes').click();
}
describe('Comment nodes', () => {
beforeEach(() => {
cy.visit('/');
});
it('should not find any comment nodes by default', () => {
const nodes = cy.$$('ng-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('ng-tree-node:contains("#comment")')
.its('length')
.should('not.eq', 0);
});
});