Upgraded remaining theme fixtures to canary API

refs: https://github.com/TryGhost/Toolbox/issues/168

- Upgraded the remaining themes to be pinned to the canary API
- This required one minor fix because the edit URL has changed for authors in v4/canary
- I also ripped out everywhere that the theme ghost-api version was being pinned to canary, as this was unreliable and only happening in a few places
- It's also going to be unnecessary code as soon as we finish changing to only having one API version
This commit is contained in:
Hannah Wolfe 2022-01-24 21:45:48 +00:00
parent 8319d73b0a
commit bd9f720a70
No known key found for this signature in database
GPG Key ID: AB586C3B5AE5C037
7 changed files with 5 additions and 11 deletions

View File

@ -33,7 +33,6 @@ describe('Integration - Web - Site canary', function () {
});
beforeEach(function () {
sinon.stub(themeEngine.getActive(), 'engine').withArgs('ghost-api').returns('canary');
sinon.stub(themeEngine.getActive(), 'config').withArgs('posts_per_page').returns(2);
const postsAPI = require('../../../core/server/api/canary/posts-public');
postSpy = sinon.spy(postsAPI.browse, 'query');

View File

@ -137,7 +137,6 @@ describe('Integration - Web - vhosts', function () {
app = await localUtils.initGhost({backend: true});
sinon.stub(themeEngine.getActive(), 'engine').withArgs('ghost-api').returns('canary');
sinon.stub(themeEngine.getActive(), 'config').withArgs('posts_per_page').returns(2);
});
@ -289,7 +288,6 @@ describe('Integration - Web - vhosts', function () {
configUtils.set('admin:url', 'https://admin.example.com');
configUtils.set('admin:redirects', false);
sinon.stub(themeEngine.getActive(), 'engine').withArgs('ghost-api').returns('canary');
sinon.stub(themeEngine.getActive(), 'config').withArgs('posts_per_page').returns(2);
app = await localUtils.initGhost({backend: true});
@ -329,7 +327,6 @@ describe('Integration - Web - vhosts', function () {
configUtils.set('url', 'http://example.com');
configUtils.set('admin:url', 'https://example.com');
sinon.stub(themeEngine.getActive(), 'engine').withArgs('ghost-api').returns('canary');
sinon.stub(themeEngine.getActive(), 'config').withArgs('posts_per_page').returns(2);
app = await localUtils.initGhost({backend: true});

View File

@ -396,7 +396,7 @@ describe('Dynamic Routing', function () {
it('should redirect to editor', function (done) {
request.get('/author/ghost-owner/edit/')
.expect('Location', 'http://127.0.0.1:2369/ghost/#/staff/ghost-owner/')
.expect('Location', 'http://127.0.0.1:2369/ghost/#/settings/staff/ghost-owner/')
.expect('Cache-Control', testUtils.cacheRules.public)
.expect(302)
.end(doEnd(done));

View File

@ -4,8 +4,7 @@
"demo": "https://demo.ghost.io",
"version": "2.4.2",
"engines": {
"ghost": ">=2.0.0",
"ghost-api": "v2"
"ghost-api": "canary"
},
"license": "MIT",
"screenshots": {

View File

@ -3,7 +3,7 @@
"description": "A fake theme for testing locales.",
"version": "1.0.0",
"engines": {
"ghost-api": "v4"
"ghost-api": "canary"
},
"license": "MIT",
"config": {

View File

@ -3,7 +3,7 @@
"description": "A minimal theme for testing members behaviour",
"version": "1.0.0",
"engines": {
"ghost-api": "v4"
"ghost-api": "canary"
},
"license": "MIT",
"config": {

View File

@ -4,8 +4,7 @@
"demo": "https://demo.ghost.io",
"version": "2.4.2",
"engines": {
"ghost": ">=2.0.0",
"ghost-api": "v2"
"ghost-api": "canary"
},
"license": "MIT",
"screenshots": {