diff --git a/demo-vue/app/app.js b/demo-vue/app/app.js index 4767eda..a674dad 100644 --- a/demo-vue/app/app.js +++ b/demo-vue/app/app.js @@ -7,6 +7,9 @@ import { LoginBehavior } from 'nativescript-facebook'; +import FacebookPlugin from "nativescript-facebook/vue"; +Vue.use(FacebookPlugin); + Vue.config.silent = true; application.on(application.launchEvent, function (args) { diff --git a/demo-vue/e2e/config/appium.capabilities.json b/demo-vue/e2e/config/appium.capabilities.json index 5129fcb..b13beb2 100644 --- a/demo-vue/e2e/config/appium.capabilities.json +++ b/demo-vue/e2e/config/appium.capabilities.json @@ -18,13 +18,7 @@ "platformVersion": "7.0", "deviceName": "Android GoogleAPI Emulator", "appiumVersion": "1.9.1", - "noReset": true, - "lt": 60000, - "newCommandTimeout": 720, - "appium-version": "1.9.1", - "fullReset": false, - "idleTimeout": 120, - "automationName": "Appium" + "noReset": true }, "android25": { "platformName": "Android", diff --git a/demo-vue/e2e/test.e2e.ts b/demo-vue/e2e/test.e2e.ts index b9fba90..d959a97 100644 --- a/demo-vue/e2e/test.e2e.ts +++ b/demo-vue/e2e/test.e2e.ts @@ -96,7 +96,13 @@ describe("Facebook tests", async function () { await logInButton.click(); await driver.wait(2000); } - const continueButton = await driver.findElementByText("Continue", SearchOptions.exact); + let continueButton; + if(driver.isAndroid){ + continueButton = await driver.findElementByClassName("android.widget.Button") + } + else{ + continueButton = await driver.findElementByText("Continue", SearchOptions.exact); + } await continueButton.click(); await driver.wait(1000); const userNameLabel = await driver.findElementByText("Nativescript User", SearchOptions.contains); diff --git a/demo-vue/package.json b/demo-vue/package.json index 19a6d2d..2f1b626 100644 --- a/demo-vue/package.json +++ b/demo-vue/package.json @@ -14,7 +14,7 @@ "dependencies": { "nativescript-facebook": "../src", "nativescript-theme-core": "~1.0.4", - "nativescript-vue": "~2.0.0", + "nativescript-vue": "^2.0.0", "tns-core-modules": "~5.2.0" }, "devDependencies": { @@ -35,7 +35,7 @@ "nativescript-dev-appium": "5.0.0", "nativescript-dev-typescript": "~0.8.0", "nativescript-dev-webpack": "~0.20.0", - "nativescript-vue-template-compiler": "~2.0.2", + "nativescript-vue-template-compiler": "^2.0.2", "node-sass": "~4.9.0", "vue-loader": "~15.4.2" }, diff --git a/src/package.json b/src/package.json index 3f5d867..7f635d1 100644 --- a/src/package.json +++ b/src/package.json @@ -47,7 +47,7 @@ "tns-platform-declarations": "^5.2.0", "typescript": "~3.1.6", "nativescript-angular": "~7.2.1", - "nativescript-vue": "~2.0.2", + "nativescript-vue": "^2.0.2", "@angular/core": "~7.2.0", "@angular/common": "~7.2.0", "@angular/compiler": "~7.2.0", diff --git a/src/vue/facebook-vue-directives.ts b/src/vue/facebook-vue-directives.ts index 486e539..35d2c0b 100644 --- a/src/vue/facebook-vue-directives.ts +++ b/src/vue/facebook-vue-directives.ts @@ -1,5 +1,9 @@ -import * as Vue from "nativescript-vue"; +const FacebookPlugin = { + install(Vue, options) { + Vue.registerElement("FacebookLoginButton", () => require("../").LoginButton); + Vue.registerElement("FacebookShareButton", () => require('../').ShareButton); + Vue.registerElement("FacebookSendButton", () => require('../').SendButton); + } +}; -Vue.registerElement("FacebookLoginButton", () => require("../").LoginButton); -Vue.registerElement("FacebookShareButton", () => require('../').ShareButton); -Vue.registerElement("FacebookSendButton", () => require('../').SendButton); \ No newline at end of file +export default FacebookPlugin; \ No newline at end of file