mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The dev-infra build tooling is now decoupled from `ng-dev`. This will make it easier to update `ng-dev` without necessarily needing to upgrade the whole build system, Bazel etc. This is useful when e.g. new release tool features have been added and should also be ported to active LTS branches. PR Close #46976
41 lines
1.3 KiB
TypeScript
41 lines
1.3 KiB
TypeScript
/**
|
|
* @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
|
|
*/
|
|
|
|
import {verifyNoBrowserErrors} from '@angular/build-tooling/bazel/benchmark/driver-utilities';
|
|
import {browser, by, element} from 'protractor';
|
|
|
|
describe('Zippy Component', function() {
|
|
afterEach(verifyNoBrowserErrors);
|
|
|
|
describe('zippy', function() {
|
|
const URL = '/';
|
|
|
|
beforeEach(function() {
|
|
browser.get(URL);
|
|
});
|
|
|
|
it('should change the zippy title depending on it\'s state', function() {
|
|
const zippyTitle = element(by.css('.zippy__title'));
|
|
|
|
expect(zippyTitle.getText()).toEqual('▾ Details');
|
|
zippyTitle.click();
|
|
expect(zippyTitle.getText()).toEqual('▸ Details');
|
|
});
|
|
|
|
it('should have zippy content', function() {
|
|
expect(element(by.css('.zippy__content')).getText()).toEqual('This is some content.');
|
|
});
|
|
|
|
it('should toggle when the zippy title is clicked', function() {
|
|
element(by.css('.zippy__title')).click();
|
|
expect(element(by.css('.zippy__content')).isDisplayed()).toEqual(false);
|
|
element(by.css('.zippy__title')).click();
|
|
expect(element(by.css('.zippy__content')).isDisplayed()).toEqual(true);
|
|
});
|
|
});
|
|
});
|