Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #287 from joelmats/fix-double-render-fb-popup
fix facebook share, double render error
- Loading branch information
Showing
6 changed files
with
107 additions
and
12 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,29 @@ | ||
Feature: Facebook Network | ||
|
||
Background: | ||
Given I create a Facebook Share Button | ||
Given I create a Facebook Share Button with SDK enabled | ||
|
||
Scenario: Facebook network should be displayed and have the correct URL | ||
Scenario: Facebook network should be displayed and have no url | ||
When I click the Facebook Share Button | ||
Then I should see the Facebook button | ||
When I click the Facebook button | ||
Then I should have a correct Facebook share url | ||
Then I should have no url | ||
|
||
Scenario: Facebook network should be displayed and have the fallback URL | ||
When I click the Facebook Share Button | ||
Then I should see the Facebook button | ||
When the FB SDK is not loaded | ||
And I click the Facebook button | ||
Then I should have a PHP Facebook share url | ||
|
||
Background: | ||
Given I create a Facebook Share Button with SDK disabled | ||
|
||
Scenario: Facebook network should be displayed and have the fallback URL | ||
When I click the Facebook Share Button | ||
Then I should see the Facebook button | ||
When I click the Facebook button | ||
Then I should have a PHP Facebook share url |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Share Button Test: Facebook</title> | ||
<link rel="stylesheet" type="text/css" href="../../dist/share-button.min.css"> | ||
<style> | ||
html { | ||
width: 100%; | ||
height: 100%; | ||
overflow: hidden; | ||
} | ||
share-button { | ||
position: relative; | ||
top: 0; | ||
left: 50%; | ||
bottom: 0; | ||
right: 0; | ||
z-index: 100; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<share-button></share-button> | ||
<script src='../../dist/share-button.min.js'></script> | ||
<script> | ||
var shareButton = new ShareButton({ | ||
networks: { | ||
pinterest: { enabled: false }, | ||
twitter: { enabled: false }, | ||
whatsapp: { enabled: false }, | ||
googlePlus: { enabled: false }, | ||
reddit: { enabled: false }, | ||
linkedin: { enabled: false }, | ||
email: { enabled: false }, | ||
facebook: { | ||
url: 'http://www.example.com', | ||
title: "FB Title", | ||
caption: "FB Caption", | ||
description: "FB Description", | ||
image: "http://carrot.is/img/fb-share.jpg", | ||
loadSdk: false | ||
} | ||
}, | ||
ui: { | ||
flyout: 'center bottom' | ||
} | ||
}); | ||
</script> | ||
</body> | ||
|
||
</html> |
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
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