[examples][frameworks] Add missing examples and add a test to ensure every framework has an example (#4372)

* Add test to frameworks

* Add example for Docusaurus v2

* Add example for ionic-angular

* Update READMEs

* Use existing versions

* Reset yarn.lock

* Add schema validation and add missing Scully.io logo
This commit is contained in:
Andy
2020-05-14 13:30:11 +02:00
committed by GitHub
parent 3c75f1440d
commit ef63247fc0
232 changed files with 16033 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
import { AppPage } from './app.po';
describe('new App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display the menu', () => {
page.navigateTo();
expect(page.getMenu()).toBeTruthy();
});
it('should get the slides text', () => {
page.navigateTo();
expect(page.getFirstSlide()).toBe('ion-slide');
});
it('should create a router outlet', () => {
page.navigateTo();
expect(page.getRouter()).toBeTruthy();
});
});

View File

@@ -0,0 +1,33 @@
import { browser, by, element, ElementFinder, ExpectedConditions } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get('/');
}
async getMenu() {
const el = this.getElement('app-root ion-menu');
await this.waitForSelector(el);
return el;
}
async getFirstSlide() {
const el = this.getElement('app-root ion-slides ion-slide:first-child');
await this.waitForSelector(el);
return el.getTagName();
}
async getRouter() {
const el = this.getElement('app-root ion-router-outlet');
await this.waitForSelector(el);
return el;
}
async waitForSelector(el: ElementFinder) {
return browser.wait(ExpectedConditions.presenceOf(el), 3000);
}
getElement(selector) {
return element(by.css(selector));
}
}