Skip to content

Commit

Permalink
Merge pull request #789 from Shopify/lock-shopify-api-to-v7-x
Browse files Browse the repository at this point in the history
bump to v 11.0.2 and lock shopify_api to ~> 7.0
  • Loading branch information
jtgrenz committed Sep 4, 2019
2 parents 0900ddc + c0c4e52 commit 3d8b8d9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
11.0.2
-----

* Lock shopify_api gem dependency to `~> 7.0` from `>= 7.0.0`.
* Remove flakey JS Tests
* bump sqlite3 development dependency to `~>1.4` from `~> 1.3.6`. [#789](https://github.com/Shopify/shopify_app/pull/789)

11.0.1
-----

Expand Down
2 changes: 1 addition & 1 deletion lib/shopify_app/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ShopifyApp
VERSION = '11.0.1'.freeze
VERSION = '11.0.2'.freeze
end
4 changes: 2 additions & 2 deletions shopify_app.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Gem::Specification.new do |s|

s.add_runtime_dependency('browser_sniffer', '~> 1.1.2')
s.add_runtime_dependency('rails', '> 5.2.1')
s.add_runtime_dependency('shopify_api', '>= 7.0.0')
s.add_runtime_dependency('shopify_api', '~> 7.0')
s.add_runtime_dependency('omniauth-shopify-oauth2', '~> 2.1.0')

s.add_development_dependency('rake')
s.add_development_dependency('byebug')
s.add_development_dependency('sqlite3', '~> 1.3.6')
s.add_development_dependency('sqlite3', '~> 1.4')
s.add_development_dependency('minitest')
s.add_development_dependency('mocha')

Expand Down
17 changes: 5 additions & 12 deletions test/javascripts/shopify_app/storage_access_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ suite('StorageAccessHelper', () => {
storageAccessHelperSandbox.stub(storageAccessHelper, 'handleGetStorageAccess');
storageAccessHelperSandbox.stub(storageAccessHelper, 'handleHasStorageAccess');

storageAccessHelper.manageStorageAccess().then(() => {
storageAccessHelper.manageStorageAccess().then(() => {
sinon.assert.called(storageAccessHelper.handleGetStorageAccess);
sinon.assert.notCalled(storageAccessHelper.handleHasStorageAccess);
});
Expand Down Expand Up @@ -192,13 +192,6 @@ suite('StorageAccessHelper', () => {
});
});

suite('redirectToAppHome', () => {
test('sets "shopify.granted_storage_access" in sessionStorage', () => {
storageAccessHelper.redirectToAppHome();
sinon.assert.match(sessionStorage.getItem('shopify.granted_storage_access'), 'true');
});
});

suite('setNormalizedLink', () => {
test('returns redirectData.hasStorageAccessUrl if storage access is granted', () => {
const link = storageAccessHelper.setNormalizedLink('storage_access_granted');
Expand All @@ -220,7 +213,7 @@ suite('StorageAccessHelper', () => {
const button = document.createElement('button');
button.type = 'button';
button.id = 'AcceptCookies';

node.appendChild(button);
document.body.appendChild(node);

Expand All @@ -239,7 +232,7 @@ suite('StorageAccessHelper', () => {
const button = document.createElement('button');
button.type = 'button';
button.id = 'AcceptCookies';

node.appendChild(button);
document.body.appendChild(node);

Expand All @@ -253,7 +246,7 @@ suite('StorageAccessHelper', () => {
document.body.removeChild(node);
});
});

suite('setCookieAndRedirect', () => {
test('sets the shopify.cookies_persist cookie', () => {
storageAccessHelper.setCookieAndRedirect();
Expand All @@ -265,7 +258,7 @@ suite('StorageAccessHelper', () => {
test('passes the correct redirectUrl to the ITPHelper constructor', () => {
window.shopOrigin = 'https://test-shop.myshopify.io';
window.apiKey = '123';

const itpHelper = storageAccessHelper.setUpHelper();
sinon.assert.match(itpHelper.redirectUrl, 'https://test-shop.myshopify.io/admin/apps/123');
})
Expand Down

0 comments on commit 3d8b8d9

Please sign in to comment.