"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "aio/tests/deployment/e2e/smoke-tests.e2e-spec.ts" between
angular-11.0.1.tar.gz and angular-11.0.2.tar.gz

About: Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript.

smoke-tests.e2e-spec.ts  (angular-11.0.1):smoke-tests.e2e-spec.ts  (angular-11.0.2)
skipping to change at line 17 skipping to change at line 17
beforeAll(() => page.init()); beforeAll(() => page.init());
beforeEach(() => browser.waitForAngularEnabled(false)); beforeEach(() => browser.waitForAngularEnabled(false));
afterEach(async () => { afterEach(async () => {
await page.unregisterSw(); await page.unregisterSw();
await browser.waitForAngularEnabled(true); await browser.waitForAngularEnabled(true);
}); });
describe('(smoke tests)', () => { describe('(smoke tests)', () => {
it('should show the home page', () => { it('should show the home page', async () => {
page.goTo(''); await page.goTo('');
const text = page.getDocViewerText(); const text = await page.getDocViewerText();
expect(text).toContain('one framework'); expect(text).toContain('one framework');
expect(text).toContain('mobile & desktop'); expect(text).toContain('mobile & desktop');
}); });
describe('(marketing pages)', () => { describe('(marketing pages)', () => {
const textPerUrl: { [key: string]: string } = { const textPerUrl: { [key: string]: string } = {
features: 'features & benefits', features: 'features & benefits',
docs: 'introduction to the angular docs', docs: 'introduction to the angular docs',
events: 'events', events: 'events',
resources: 'explore angular resources', resources: 'explore angular resources',
}; };
Object.keys(textPerUrl).forEach(url => { Object.keys(textPerUrl).forEach(url => {
it(`should show the page at '${url}'`, () => { it(`should show the page at '${url}'`, async () => {
page.goTo(url); await page.goTo(url);
browser.wait(() => page.getDocViewerText(), 5000); // Wait for the do await browser.wait(() => page.getDocViewerText(), 5000); // Wait for
cument to be loaded. the document to be loaded.
expect(page.getDocViewerText()).toContain(textPerUrl[url]); expect(await page.getDocViewerText()).toContain(textPerUrl[url]);
}); });
}); });
}); });
describe('(docs pages)', () => { describe('(docs pages)', () => {
const textPerUrl: { [key: string]: string } = { const textPerUrl: { [key: string]: string } = {
api: 'api list', api: 'api list',
'guide/architecture': 'architecture', 'guide/architecture': 'architecture',
'guide/http': 'httpclient', 'guide/http': 'httpclient',
'guide/security': 'security', 'guide/security': 'security',
tutorial: 'tutorial', tutorial: 'tutorial',
start: 'getting started', start: 'getting started',
}; };
Object.keys(textPerUrl).forEach(url => { Object.keys(textPerUrl).forEach(url => {
it(`should show the page at '${url}'`, () => { it(`should show the page at '${url}'`, async () => {
page.goTo(url); await page.goTo(url);
browser.wait(() => page.getDocViewerText(), 5000); // Wait for the do await browser.wait(() => page.getDocViewerText(), 5000); // Wait for
cument to be loaded. the document to be loaded.
expect(page.getDocViewerText()).toContain(textPerUrl[url]); expect(await page.getDocViewerText()).toContain(textPerUrl[url]);
}); });
}); });
}); });
describe('(api docs pages)', () => { describe('(api docs pages)', () => {
const textPerUrl: { [key: string]: string } = { const textPerUrl: { [key: string]: string } = {
/* Class */ 'api/core/Injector': 'class injector', /* Class */ 'api/core/Injector': 'class injector',
/* Const */ 'api/forms/NG_VALIDATORS': 'const ng_validators', /* Const */ 'api/forms/NG_VALIDATORS': 'const ng_validators',
/* Decorator */ 'api/core/Component': '@component', /* Decorator */ 'api/core/Component': '@component',
/* Directive */ 'api/common/NgIf': 'class ngif', /* Directive */ 'api/common/NgIf': 'class ngif',
/* Enum */ 'api/core/ChangeDetectionStrategy': 'enum changedetectionstra tegy', /* Enum */ 'api/core/ChangeDetectionStrategy': 'enum changedetectionstra tegy',
/* Function */ 'api/animations/animate': 'animate(', /* Function */ 'api/animations/animate': 'animate(',
/* Interface */ 'api/core/OnDestroy': 'interface ondestroy', /* Interface */ 'api/core/OnDestroy': 'interface ondestroy',
/* Pipe */ 'api/common/JsonPipe': '| json', /* Pipe */ 'api/common/JsonPipe': '| json',
/* Type-Alias */ 'api/common/http/HttpEvent': 'type httpevent', /* Type-Alias */ 'api/common/http/HttpEvent': 'type httpevent',
}; };
Object.keys(textPerUrl).forEach(url => { Object.keys(textPerUrl).forEach(url => {
it(`should show the page at '${url}'`, () => { it(`should show the page at '${url}'`, async () => {
page.goTo(url); await page.goTo(url);
browser.wait(() => page.getDocViewerText(), 5000); // Wait for the do await browser.wait(() => page.getDocViewerText(), 5000); // Wait for
cument to be loaded. the document to be loaded.
expect(page.getDocViewerText()).toContain(textPerUrl[url]); expect(await page.getDocViewerText()).toContain(textPerUrl[url]);
}); });
}); });
}); });
describe('(search results)', () => { describe('(search results)', () => {
beforeEach(() => page.goTo('')); beforeEach(() => page.goTo(''));
it('should find pages when searching by a partial word in the title', () = it('should find pages when searching by a partial word in the title', asyn
> { c () => {
page.enterSearch('ngCont'); await page.enterSearch('ngCont');
expect(page.getSearchResults()).toContain('NgControl'); expect(await page.getSearchResults()).toContain('NgControl');
}); });
it('should find API docs when searching for an instance member name', () = it('should find API docs when searching for an instance member name', asyn
> { c () => {
page.enterSearch('writeValue'); await page.enterSearch('writeValue');
expect(page.getSearchResults()).toContain('ControlValueAccessor'); expect(await page.getSearchResults()).toContain('ControlValueAccessor');
}); });
it('should find API docs when searching for a static member name', () => { it('should find API docs when searching for a static member name', async (
page.enterSearch('compose'); ) => {
expect(page.getSearchResults()).toContain('Validators'); await page.enterSearch('compose');
expect(await page.getSearchResults()).toContain('Validators');
}); });
}); });
it('should show relevant results on 404', () => { it('should show relevant results on 404', async () => {
page.goTo('http/router'); await page.goTo('http/router');
const results = page.getSearchResults(); const results = await page.getSearchResults();
expect(results).toContain('HttpClient'); expect(results).toContain('HttpClient');
expect(results).toContain('Router'); expect(results).toContain('Router');
}); });
}); });
}); });
 End of changes. 11 change blocks. 
32 lines changed or deleted 33 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)