Skip to content

Commit a95795e

Browse files
Merge pull request #180 from NativeScript/dtodorov/update-vue
Update vue deps.
2 parents a92f809 + 837d37e commit a95795e

File tree

6 files changed

+22
-15
lines changed

6 files changed

+22
-15
lines changed

demo-vue/app/app.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import {
77
LoginBehavior
88
} from 'nativescript-facebook';
99

10+
import FacebookPlugin from "nativescript-facebook/vue";
11+
Vue.use(FacebookPlugin);
12+
1013
Vue.config.silent = true;
1114

1215
application.on(application.launchEvent, function (args) {

demo-vue/e2e/config/appium.capabilities.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@
1818
"platformVersion": "7.0",
1919
"deviceName": "Android GoogleAPI Emulator",
2020
"appiumVersion": "1.9.1",
21-
"noReset": true,
22-
"lt": 60000,
23-
"newCommandTimeout": 720,
24-
"appium-version": "1.9.1",
25-
"fullReset": false,
26-
"idleTimeout": 120,
27-
"automationName": "Appium"
21+
"noReset": true
2822
},
2923
"android25": {
3024
"platformName": "Android",

demo-vue/e2e/test.e2e.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,13 @@ describe("Facebook tests", async function () {
9696
await logInButton.click();
9797
await driver.wait(2000);
9898
}
99-
const continueButton = await driver.findElementByText("Continue", SearchOptions.exact);
99+
let continueButton;
100+
if(driver.isAndroid){
101+
continueButton = await driver.findElementByClassName("android.widget.Button")
102+
}
103+
else{
104+
continueButton = await driver.findElementByText("Continue", SearchOptions.exact);
105+
}
100106
await continueButton.click();
101107
await driver.wait(1000);
102108
const userNameLabel = await driver.findElementByText("Nativescript User", SearchOptions.contains);

demo-vue/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"dependencies": {
1515
"nativescript-facebook": "../src",
1616
"nativescript-theme-core": "~1.0.4",
17-
"nativescript-vue": "~2.0.0",
17+
"nativescript-vue": "^2.0.0",
1818
"tns-core-modules": "~5.2.0"
1919
},
2020
"devDependencies": {
@@ -35,7 +35,7 @@
3535
"nativescript-dev-appium": "5.0.0",
3636
"nativescript-dev-typescript": "~0.8.0",
3737
"nativescript-dev-webpack": "~0.20.0",
38-
"nativescript-vue-template-compiler": "~2.0.2",
38+
"nativescript-vue-template-compiler": "^2.0.2",
3939
"node-sass": "~4.9.0",
4040
"vue-loader": "~15.4.2"
4141
},

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"tns-platform-declarations": "^5.2.0",
4848
"typescript": "~3.1.6",
4949
"nativescript-angular": "~7.2.1",
50-
"nativescript-vue": "~2.0.2",
50+
"nativescript-vue": "^2.0.2",
5151
"@angular/core": "~7.2.0",
5252
"@angular/common": "~7.2.0",
5353
"@angular/compiler": "~7.2.0",

src/vue/facebook-vue-directives.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
import * as Vue from "nativescript-vue";
1+
const FacebookPlugin = {
2+
install(Vue, options) {
3+
Vue.registerElement("FacebookLoginButton", () => require("../").LoginButton);
4+
Vue.registerElement("FacebookShareButton", () => require('../').ShareButton);
5+
Vue.registerElement("FacebookSendButton", () => require('../').SendButton);
6+
}
7+
};
28

3-
Vue.registerElement("FacebookLoginButton", () => require("../").LoginButton);
4-
Vue.registerElement("FacebookShareButton", () => require('../').ShareButton);
5-
Vue.registerElement("FacebookSendButton", () => require('../').SendButton);
9+
export default FacebookPlugin;

0 commit comments

Comments
 (0)