This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, Prop, h, JSX, Watch} from '@stencil/core'; | |
@Component({ | |
tag: 'my-complex-prop', | |
styleUrl: 'complex-prop.css', | |
shadow: true | |
}) | |
export class MyComplexPropComponent { | |
@Prop({mutable: true}) values: Array<string> = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, Prop, h, JSX, Watch} from '@stencil/core'; | |
@Component({ | |
tag: 'my-complex-prop', | |
styleUrl: 'complex-prop.css', | |
shadow: true | |
}) | |
export class MyComplexPropComponent { | |
@Prop({mutable: true}) values: Array<string> = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('basic', () => { | |
const html = ` | |
<my-basic first="Julia" last="Roberts"> | |
<p slot class="cool">Cool!</p> | |
</my-basic> | |
`; | |
const components = [MyBasic]; | |
it('should render with shadow dom', async () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { newSpecPage } from "@stencil/core/dist/testing"; | |
import { MyBasic } from './basic'; | |
describe('basic', () => { | |
it('should render', async () => { | |
const page = await newSpecPage({ | |
html: `<my-basic first="Julia" last="Roberts"></my-basic>`, | |
components: [MyBasic] | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, Prop, h, JSX } from '@stencil/core'; | |
@Component({ | |
tag: 'my-basic', | |
styleUrl: 'basic.css', | |
shadow: true | |
}) | |
export class MyBasic { | |
@Prop() first: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//instance.tsx | |
import { Component, Prop } from '@stencil/core'; | |
@Component({ | |
tag: 'my-instance' | |
}) | |
export class MyInstance { | |
/** | |
* The first name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const config = { | |
preset: '@stencil/core/testing', | |
} | |
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//update: Adding async on the subscribe does the trick... | |
it('should call observable', () => { | |
let mockFn = jest.fn(); | |
mockFn.mockImplementation(() => { | |
return of(4) | |
}); | |
mockFn().subscribe(async (res) => { | |
console.log('RES', res); // it logs 4 | |
await expect(res).toEqual(8); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COMMAND POST "/session" | |
DATA {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"maxInstances":1,"browserName":"chrome","chromeOptions":{"args":["incognito","disable-infobars","window-size=375,800","use-fake-ui-for-media-stream","use-fake-device-for-media-stream"],"prefs":{"profile":{"managed_default_content_settings":{"geolocation":1}}}},"name":"photos parameters","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"4.10.1","name":"webdriverio"}}} | |
INFO SET SESSION ID 67379a3fab9310256090bd4fbe8839df | |
RESULT {"acceptInsecureCerts":false,"acceptSslCerts":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedriverVersion":"2.35.528157 (4429ca2590d6988c0745c24c8858745aaaec01ef)","cssSelectorsEnabled":true,"databaseEnabled":false,"handlesAlerts":true,"hasTouchScreen":false,"javascriptEnabled":true,"locationContextEnabled":true,"mobileEmu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Appium] Welcome to Appium v1.6.4 | |
[Appium] Appium REST http interface listener started on 0.0.0.0:4723 | |
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"android","platformVersion":"7.1","deviceName":"Nexus 6P","browserName":"","app":"/Users/tallyb/Documents/yoobic/yo-ui-web/dist/yoobic-ionic/dev/platforms/android/build/outputs/apk/android-x86-debug.apk","count":1}} | |
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"platformName":"android","platformVersion":"7.1","deviceName":"Nexus 6P","browserName":"","app":"/Users/tallyb/Documents/yoobic/yo-ui-web/dist/yoobic-ionic/dev/platforms/android/build/outputs/apk/android-x86-debug.apk","count":1},null,null,null,null] | |
[BaseDriver] Event 'newSessionRequested' logged at 1494946878930 (18:01:18 GMT+0300 (IDT)) | |
[Appium] Creating new AndroidDriver (v1.17.1) session | |
[Appium] Capabilities: | |
[Appium] platformName: 'android' | |
[Appium] platformVersion: '7.1' | |
[Appium] deviceName: 'Nexus 6P' |