api-list.e2e-spec.ts (angular-11.0.1) | : | api-list.e2e-spec.ts (angular-11.0.2) | ||
---|---|---|---|---|
import { by, element } from 'protractor'; | import { by, element } from 'protractor'; | |||
import { SitePage } from './app.po'; | import { SitePage } from './app.po'; | |||
describe('api-list', () => { | describe('api-list', () => { | |||
const apiSearchInput = element(by.css('aio-api-list .form-search input')); | const apiSearchInput = element(by.css('aio-api-list .form-search input')); | |||
const apiStatusDropdown = element(by.css('aio-api-list aio-select[label="Statu s:"]')); | const apiStatusDropdown = element(by.css('aio-api-list aio-select[label="Statu s:"]')); | |||
const apiTypeDropdown = element(by.css('aio-api-list aio-select[label="Type:"] ')); | const apiTypeDropdown = element(by.css('aio-api-list aio-select[label="Type:"] ')); | |||
let page: SitePage; | let page: SitePage; | |||
beforeEach(() => { | beforeEach(async () => { | |||
page = new SitePage(); | page = new SitePage(); | |||
page.navigateTo('api'); | await page.navigateTo('api'); | |||
}); | }); | |||
it('should find AnimationSequenceMetadata when searching by partial word anima | it('should find AnimationSequenceMetadata when searching by partial word anima | |||
', () => { | ', async () => { | |||
expect(page.getApiSearchResults()).toContain('HttpEventType'); | expect(await page.getApiSearchResults()).toContain('HttpEventType'); | |||
apiSearchInput.clear(); | await apiSearchInput.clear(); | |||
apiSearchInput.sendKeys('anima'); | await apiSearchInput.sendKeys('anima'); | |||
expect(page.getApiSearchResults()).not.toContain('HttpEventType'); | expect(await page.getApiSearchResults()).not.toContain('HttpEventType'); | |||
expect(page.getApiSearchResults()).toContain('AnimationSequenceMetadata'); | expect(await page.getApiSearchResults()).toContain('AnimationSequenceMetadat | |||
a'); | ||||
}); | }); | |||
it('should find getLocaleDateTimeFormat when searching by partial word date', | it('should find getLocaleDateTimeFormat when searching by partial word date', | |||
() => { | async () => { | |||
expect(page.getApiSearchResults()).toContain('formatCurrency'); | expect(await page.getApiSearchResults()).toContain('formatCurrency'); | |||
apiSearchInput.clear(); | await apiSearchInput.clear(); | |||
apiSearchInput.sendKeys('date'); | await apiSearchInput.sendKeys('date'); | |||
expect(page.getApiSearchResults()).not.toContain('formatCurrency'); | expect(await page.getApiSearchResults()).not.toContain('formatCurrency'); | |||
expect(page.getApiSearchResults()).toContain('getLocaleDateTimeFormat'); | expect(await page.getApiSearchResults()).toContain('getLocaleDateTimeFormat' | |||
); | ||||
}); | }); | |||
it('should find LowerCasePipe when searching for type pipe', () => { | it('should find LowerCasePipe when searching for type pipe', async () => { | |||
expect(page.getApiSearchResults()).toContain('getLocaleDateTimeFormat'); | expect(await page.getApiSearchResults()).toContain('getLocaleDateTimeFormat' | |||
); | ||||
page.clickDropdownItem(apiTypeDropdown, 'Pipe'); | await page.clickDropdownItem(apiTypeDropdown, 'Pipe'); | |||
expect(page.getApiSearchResults()).not.toContain('getLocaleDateTimeFormat'); | expect(await page.getApiSearchResults()).not.toContain('getLocaleDateTimeFor | |||
expect(page.getApiSearchResults()).toContain('LowerCasePipe'); | mat'); | |||
expect(await page.getApiSearchResults()).toContain('LowerCasePipe'); | ||||
}); | }); | |||
it('should find ElementRef when searching for status Security Risk', () => { | it('should find ElementRef when searching for status Security Risk', async () | |||
expect(page.getApiSearchResults()).toContain('getLocaleDateTimeFormat'); | => { | |||
expect(await page.getApiSearchResults()).toContain('getLocaleDateTimeFormat' | ||||
); | ||||
page.clickDropdownItem(apiStatusDropdown, 'Security Risk'); | await page.clickDropdownItem(apiStatusDropdown, 'Security Risk'); | |||
expect(page.getApiSearchResults()).not.toContain('getLocaleDateTimeFormat'); | expect(await page.getApiSearchResults()).not.toContain('getLocaleDateTimeFor | |||
expect(page.getApiSearchResults()).toContain('ElementRef'); | mat'); | |||
expect(await page.getApiSearchResults()).toContain('ElementRef'); | ||||
}); | }); | |||
}); | }); | |||
End of changes. 14 change blocks. | ||||
26 lines changed or deleted | 33 lines changed or added |