65aaffcfe4
Previously, the `SwPush` API docs were using hard-coded code snippets. This commit switches to using code snippets from an actual example app, which ensures that the code shown in the docs will at least continue to compile successfully. PR Close #32139
23 lines
594 B
TypeScript
23 lines
594 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google Inc. 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 {browser, by, element} from 'protractor';
|
|
import {verifyNoBrowserErrors} from '../../../test-utils';
|
|
|
|
describe('SW `SwPush` example', () => {
|
|
const pageUrl = '/push';
|
|
const appElem = element(by.css('example-app'));
|
|
|
|
afterEach(verifyNoBrowserErrors);
|
|
|
|
it('should be enabled', () => {
|
|
browser.get(pageUrl);
|
|
expect(appElem.getText()).toBe('SW enabled: true');
|
|
});
|
|
});
|