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-11-22 00:49:29 +00:00
|
|
|
require('cypress-iframe');
|
|
|
|
|
|
2021-05-27 21:40:56 +00:00
|
|
|
describe('change of the state should reflect in property update', () => {
|
|
|
|
|
beforeEach(() => {
|
|
|
|
|
cy.visit('/');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('should update the property value', () => {
|
|
|
|
|
// Complete the todo
|
|
|
|
|
cy.enter('#sample-app').then((getBody) => {
|
|
|
|
|
getBody().find('input[type="checkbox"].toggle').first().click();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Select the todo item
|
2021-12-09 05:44:17 +00:00
|
|
|
cy.get('.tree-wrapper')
|
2024-01-16 21:35:47 +00:00
|
|
|
.find('.tree-node:contains("app-todo[TooltipDirective]")')
|
|
|
|
|
.first()
|
|
|
|
|
.click({force: true});
|
2021-05-27 21:40:56 +00:00
|
|
|
|
|
|
|
|
// Expand the todo in the property explorer
|
2021-12-09 05:44:17 +00:00
|
|
|
cy.get('.explorer-panel:contains("app-todo")')
|
2024-01-16 21:35:47 +00:00
|
|
|
.find('ng-property-view mat-tree-node:contains("todo")')
|
|
|
|
|
.click();
|
2021-05-27 21:40:56 +00:00
|
|
|
|
|
|
|
|
// Verify its value is now completed
|
2021-12-01 18:49:47 +00:00
|
|
|
cy.contains(
|
2024-01-16 21:35:47 +00:00
|
|
|
'.explorer-panel:contains("app-todo") ' +
|
|
|
|
|
'ng-property-view mat-tree-node:contains("completed") ' +
|
|
|
|
|
'ng-property-editor .editor',
|
|
|
|
|
'true',
|
|
|
|
|
);
|
2021-05-27 21:40:56 +00:00
|
|
|
});
|
|
|
|
|
});
|