Upgrading to dgeni-packages 0.21.4 gives us access to more properties on the API docs, which allows us to fix the following issues: Closes #19450 Closes #19452 Closes #19456
		
			
				
	
	
		
			35 lines
		
	
	
		
			896 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			896 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { element, by } from 'protractor';
 | |
| import { SitePage } from './app.po';
 | |
| 
 | |
| export class ApiPage extends SitePage {
 | |
|   constructor(url: string) {
 | |
|     super();
 | |
|     this.navigateTo(url);
 | |
|   }
 | |
| 
 | |
|   getDescendants(docType: string, onlyDirect = false) {
 | |
|     // This selector is horrible because we have potentially recursive HTML lists
 | |
|     //
 | |
|     // ul
 | |
|     //   li
 | |
|     //     code
 | |
|     //     ul
 | |
|     //       li
 | |
|     //         code
 | |
|     //     ul
 | |
|     //       li
 | |
|     //         code
 | |
|     //   li
 | |
|     //     code
 | |
|     //
 | |
|     // and we want to be able to pull out the code elements from only the first level
 | |
|     // if `onlyDirect` is set to `true`.
 | |
|     const selector = `.descendants.${docType} ${onlyDirect ? '>' : ''} li > :not(ul) code`;
 | |
|     return element.all(by.css(selector)).map<string>(item => item.getText());
 | |
|   }
 | |
| 
 | |
|   getOverview(docType) {
 | |
|     return element(by.css(`.${docType}-overview`));
 | |
|   }
 | |
| }
 |