-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
likely.initiate()
doesn’t respect the updated block options
#90
Comments
|
I want to do this in 2.2. In this release, we make Likely more suitable for single page apps (by bringing the History API support). I think changing the options and then re-initializing is also common in SPAs, so bringing the release for SPAs without fixing this would be weird. |
The PR for this should also add the UI tests. I expect something like this: describe('changing configuration after being loaded', function () {
beforeEach(function () {
// The browser could start long
this.timeout(20000);
return getLikely(driver, 'http://ilyabirman.github.io/Likely/autoinit.html', { waitUntilInitialized: true })
});
it('should change the shared URL when `<link rel="canonical">` is specified', function () {
return driver.executeScript(`
document.head.innerHTML += '<link rel="canonical" href="https://google.com">';
likely.initiate();
`)
.then(function () {
return expectClickToOpen(driver, '.likely__widget_twitter', /twitter\.com\/.*google\.com/)
});
});
// ...
}); (The test infrastructure is currently being developed in #73.) |
Seems to be caused by url: utils.getDefaultUrl(), in |
Steps to reproduce:
.likely
block and change thedata-url
attribute tohttp://ilyabirman.ru/projects/likely
.likely.initiate()
in the console.Expected result:
The first block’s counters are changed (as it now points to the new URL).
Actual result:
The counters don’t change.
Probably related to #75.
The text was updated successfully, but these errors were encountered: