Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions demo-vue/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 1 addition & 7 deletions demo-vue/e2e/config/appium.capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 7 additions & 1 deletion demo-vue/e2e/test.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions demo-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 8 additions & 4 deletions src/vue/facebook-vue-directives.ts
Original file line number Diff line number Diff line change
@@ -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);
export default FacebookPlugin;