1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00

Renamed Apps to Integrations (#1050)

refs https://github.com/TryGhost/Ghost/issues/9865, https://github.com/TryGhost/Ghost/issues/9942
- Apps are becoming Integrations that cover the existing built-in integrations as well as new custom integrations
- custom Integrations will comprise of API keys for the Admin and Content APIs and custom-registered webhooks
This commit is contained in:
Kevin Ansfield 2018-10-04 11:02:36 +01:00 committed by GitHub
parent 04965a7662
commit 5390f51e36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 67 additions and 68 deletions

View file

@ -52,7 +52,7 @@ Router.map(function () {
this.route('settings.design', {path: '/settings/design'}, function () { this.route('settings.design', {path: '/settings/design'}, function () {
this.route('uploadtheme'); this.route('uploadtheme');
}); });
this.route('settings.apps', {path: '/settings/apps'}, function () { this.route('settings.integrations', {path: '/settings/integrations'}, function () {
this.route('slack', {path: 'slack'}); this.route('slack', {path: 'slack'});
this.route('amp', {path: 'amp'}); this.route('amp', {path: 'amp'});
this.route('unsplash', {path: 'unsplash'}); this.route('unsplash', {path: 'unsplash'});

View file

@ -6,8 +6,8 @@ import {inject as service} from '@ember/service';
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, { export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
settings: service(), settings: service(),
titleToken: 'Settings - Apps', titleToken: 'Settings - Integrations',
classNames: ['settings-view-apps'], classNames: ['settings-view-integrations'],
beforeModel() { beforeModel() {
this._super(...arguments); this._super(...arguments);

View file

@ -4,7 +4,7 @@ import styleBody from 'ghost-admin/mixins/style-body';
export default AuthenticatedRoute.extend(styleBody, { export default AuthenticatedRoute.extend(styleBody, {
titleToken: 'AMP', titleToken: 'AMP',
classNames: ['settings-view-apps-amp'], classNames: ['settings-view-integrations-amp'],
actions: { actions: {
save() { save() {

View file

@ -7,7 +7,7 @@ export default AuthenticatedRoute.extend(styleBody, {
titleToken: 'Slack', titleToken: 'Slack',
classNames: ['settings-view-apps-slack'], classNames: ['settings-view-integrations-slack'],
afterModel() { afterModel() {
return this.get('settings').reload(); return this.get('settings').reload();

View file

@ -8,7 +8,7 @@ export default AuthenticatedRoute.extend(styleBody, {
settings: service(), settings: service(),
titleToken: 'Unsplash', titleToken: 'Unsplash',
classNames: ['settings-view-apps-unsplash'], classNames: ['settings-view-integrations-unsplash'],
beforeModel() { beforeModel() {
let settings = this.get('settings'); let settings = this.get('settings');

View file

@ -1,4 +1,4 @@
/* Packages - Themes / Apps /* Packages - Themes / Integrations
/* ---------------------------------------------------------- */ /* ---------------------------------------------------------- */
.package-filter { .package-filter {

View file

@ -64,7 +64,7 @@
<li>{{#link-to "settings.design" classNames="gh-nav-settings-navigation"}}{{svg-jar "compass"}}Design{{/link-to}}</li> <li>{{#link-to "settings.design" classNames="gh-nav-settings-navigation"}}{{svg-jar "compass"}}Design{{/link-to}}</li>
<li>{{#link-to "settings.tags" classNames="gh-nav-settings-tags"}}{{svg-jar "tag"}}Tags{{/link-to}}</li> <li>{{#link-to "settings.tags" classNames="gh-nav-settings-tags"}}{{svg-jar "tag"}}Tags{{/link-to}}</li>
<li>{{#link-to "settings.code-injection" classNames="gh-nav-settings-code-injection"}}{{svg-jar "brackets"}}Code injection{{/link-to}}</li> <li>{{#link-to "settings.code-injection" classNames="gh-nav-settings-code-injection"}}{{svg-jar "brackets"}}Code injection{{/link-to}}</li>
<li>{{#link-to "settings.apps" classNames="gh-nav-settings-apps"}}{{svg-jar "box"}}Apps{{/link-to}}</li> <li>{{#link-to "settings.integrations" classNames="gh-nav-settings-apps"}}{{svg-jar "box"}}Integrations{{/link-to}}</li>
<li>{{#link-to "settings.labs" classNames="gh-nav-settings-labs"}}{{svg-jar "wrench-double"}}Labs{{/link-to}}</li> <li>{{#link-to "settings.labs" classNames="gh-nav-settings-labs"}}{{svg-jar "wrench-double"}}Labs{{/link-to}}</li>
</ul> </ul>
{{/if}} {{/if}}

View file

@ -1,7 +1,7 @@
<section class="gh-canvas"> <section class="gh-canvas">
<header class="gh-canvas-header"> <header class="gh-canvas-header">
<h2 class="gh-canvas-title" data-test-screen-title> <h2 class="gh-canvas-title" data-test-screen-title>
{{#link-to "settings.apps.index"}}Apps{{/link-to}} {{#link-to "settings.integrations.index"}}Integrations{{/link-to}}
<span>{{svg-jar "arrow-right"}}</span> <span>{{svg-jar "arrow-right"}}</span>
AMP AMP
</h2> </h2>

View file

@ -1,13 +1,13 @@
<section class="gh-canvas"> <section class="gh-canvas">
<header class="gh-canvas-header"> <header class="gh-canvas-header">
<h2 class="gh-canvas-title" data-test-screen-title>Apps</h2> <h2 class="gh-canvas-title" data-test-screen-title>Integrations</h2>
</header> </header>
<section class="apps-grid-container"> <section class="apps-grid-container">
<span class="apps-grid-title">Available integrations</span> <span class="apps-grid-title">Built-in integrations</span>
<div class="apps-grid"> <div class="apps-grid">
<div class="apps-grid-cell" data-test-app="slack"> <div class="apps-grid-cell" data-test-app="slack">
{{#link-to "settings.apps.slack" data-test-link="slack"}} {{#link-to "settings.integrations.slack" data-test-link="slack"}}
<article class="apps-card-app"> <article class="apps-card-app">
<div class="apps-card-left"> <div class="apps-card-left">
<figure class="apps-card-app-icon" style="background-image:url(assets/img/slackicon.png)"></figure> <figure class="apps-card-app-icon" style="background-image:url(assets/img/slackicon.png)"></figure>
@ -31,7 +31,7 @@
</div> </div>
<div class="apps-grid-cell" data-test-app="amp"> <div class="apps-grid-cell" data-test-app="amp">
{{#link-to "settings.apps.amp" data-test-link="amp"}} {{#link-to "settings.integrations.amp" data-test-link="amp"}}
<article class="apps-card-app"> <article class="apps-card-app">
<div class="apps-card-left"> <div class="apps-card-left">
<figure class="apps-card-app-icon" style="background-image:url(assets/img/ampicon.png)"></figure> <figure class="apps-card-app-icon" style="background-image:url(assets/img/ampicon.png)"></figure>
@ -55,7 +55,7 @@
</div> </div>
<div class="apps-grid-cell" data-test-app="unsplash"> <div class="apps-grid-cell" data-test-app="unsplash">
{{#link-to "settings.apps.unsplash" data-test-link="unsplash"}} {{#link-to "settings.integrations.unsplash" data-test-link="unsplash"}}
<article class="apps-card-app"> <article class="apps-card-app">
<div class="apps-card-left"> <div class="apps-card-left">
<figure class="apps-card-app-icon" style="background-image:url(assets/img/unsplashicon.png);background-size:45px;"></figure> <figure class="apps-card-app-icon" style="background-image:url(assets/img/unsplashicon.png);background-size:45px;"></figure>
@ -79,7 +79,7 @@
</div> </div>
<div class="apps-grid-cell" data-test-app="zapier"> <div class="apps-grid-cell" data-test-app="zapier">
{{#link-to "settings.apps.zapier" data-test-link="zapier"}} {{#link-to "settings.integrations.zapier" data-test-link="zapier"}}
<article class="apps-card-app"> <article class="apps-card-app">
<div class="apps-card-left"> <div class="apps-card-left">
<figure class="apps-card-app-icon" style="background-image:url(assets/img/zapiericon.png);background-size:45px;"></figure> <figure class="apps-card-app-icon" style="background-image:url(assets/img/zapiericon.png);background-size:45px;"></figure>
@ -98,6 +98,5 @@
{{/link-to}} {{/link-to}}
</div> </div>
</div> </div>
<p class="apps-grid-note">(More coming soon!)</p>
</section> </section>
</section> </section>

View file

@ -1,7 +1,7 @@
<section class="gh-canvas"> <section class="gh-canvas">
<header class="gh-canvas-header"> <header class="gh-canvas-header">
<h2 class="gh-canvas-title" data-test-screen-title> <h2 class="gh-canvas-title" data-test-screen-title>
{{#link-to "settings.apps.index"}}Apps{{/link-to}} {{#link-to "settings.integrations.index"}}Integrations{{/link-to}}
<span>{{svg-jar "arrow-right"}}</span> <span>{{svg-jar "arrow-right"}}</span>
Slack Slack
</h2> </h2>

View file

@ -1,7 +1,7 @@
<section class="gh-canvas"> <section class="gh-canvas">
<header class="gh-canvas-header"> <header class="gh-canvas-header">
<h2 class="gh-canvas-title" data-test-screen-title> <h2 class="gh-canvas-title" data-test-screen-title>
{{#link-to "settings.apps.index"}}Apps{{/link-to}} {{#link-to "settings.integrations.index"}}Integrations{{/link-to}}
<span>{{svg-jar "arrow-right"}}</span> <span>{{svg-jar "arrow-right"}}</span>
Unsplash Unsplash
</h2> </h2>

View file

@ -1,7 +1,7 @@
<section class="gh-canvas"> <section class="gh-canvas">
<header class="gh-canvas-header"> <header class="gh-canvas-header">
<h2 class="gh-canvas-title" data-test-screen-title> <h2 class="gh-canvas-title" data-test-screen-title>
{{#link-to "settings.apps.index"}}Apps{{/link-to}} {{#link-to "settings.integrations.index"}}Integrations{{/link-to}}
<span>{{svg-jar "arrow-right"}}</span> <span>{{svg-jar "arrow-right"}}</span>
Zapier Zapier
</h2> </h2>

View file

@ -56,7 +56,7 @@ export function testConfig() {
this.get('/notifications/'); this.get('/notifications/');
/* Apps - Slack Test Notification --------------------------------------- */ /* Integrations - Slack Test Notification ------------------------------- */
this.post('/slack/test', function () { this.post('/slack/test', function () {
return {}; return {};

View file

@ -10,7 +10,7 @@ import {
import {authenticateSession, invalidateSession} from 'ghost-admin/tests/helpers/ember-simple-auth'; import {authenticateSession, invalidateSession} from 'ghost-admin/tests/helpers/ember-simple-auth';
import {expect} from 'chai'; import {expect} from 'chai';
describe('Acceptance: Settings - Apps - AMP', function () { describe('Acceptance: Settings - Integrations - AMP', function () {
let application; let application;
beforeEach(function () { beforeEach(function () {
@ -23,7 +23,7 @@ describe('Acceptance: Settings - Apps - AMP', function () {
it('redirects to signin when not authenticated', async function () { it('redirects to signin when not authenticated', async function () {
invalidateSession(application); invalidateSession(application);
await visit('/settings/apps/amp'); await visit('/settings/integrations/amp');
expect(currentURL(), 'currentURL').to.equal('/signin'); expect(currentURL(), 'currentURL').to.equal('/signin');
}); });
@ -33,7 +33,7 @@ describe('Acceptance: Settings - Apps - AMP', function () {
server.create('user', {roles: [role], slug: 'test-user'}); server.create('user', {roles: [role], slug: 'test-user'});
authenticateSession(application); authenticateSession(application);
await visit('/settings/apps/amp'); await visit('/settings/integrations/amp');
expect(currentURL(), 'currentURL').to.equal('/team/test-user'); expect(currentURL(), 'currentURL').to.equal('/team/test-user');
}); });
@ -43,7 +43,7 @@ describe('Acceptance: Settings - Apps - AMP', function () {
server.create('user', {roles: [role], slug: 'test-user'}); server.create('user', {roles: [role], slug: 'test-user'});
authenticateSession(application); authenticateSession(application);
await visit('/settings/apps/amp'); await visit('/settings/integrations/amp');
expect(currentURL(), 'currentURL').to.equal('/team/test-user'); expect(currentURL(), 'currentURL').to.equal('/team/test-user');
}); });
@ -53,7 +53,7 @@ describe('Acceptance: Settings - Apps - AMP', function () {
server.create('user', {roles: [role], slug: 'test-user'}); server.create('user', {roles: [role], slug: 'test-user'});
authenticateSession(application); authenticateSession(application);
await visit('/settings/apps/amp'); await visit('/settings/integrations/amp');
expect(currentURL(), 'currentURL').to.equal('/team'); expect(currentURL(), 'currentURL').to.equal('/team');
}); });
@ -67,10 +67,10 @@ describe('Acceptance: Settings - Apps - AMP', function () {
}); });
it('it enables or disables AMP properly and saves it', async function () { it('it enables or disables AMP properly and saves it', async function () {
await visit('/settings/apps/amp'); await visit('/settings/integrations/amp');
// has correct url // has correct url
expect(currentURL(), 'currentURL').to.equal('/settings/apps/amp'); expect(currentURL(), 'currentURL').to.equal('/settings/integrations/amp');
// AMP is enabled by default // AMP is enabled by default
expect(find('[data-test-amp-checkbox]').prop('checked'), 'AMP checkbox').to.be.true; expect(find('[data-test-amp-checkbox]').prop('checked'), 'AMP checkbox').to.be.true;
@ -104,10 +104,10 @@ describe('Acceptance: Settings - Apps - AMP', function () {
}); });
it('warns when leaving without saving', async function () { it('warns when leaving without saving', async function () {
await visit('/settings/apps/amp'); await visit('/settings/integrations/amp');
// has correct url // has correct url
expect(currentURL(), 'currentURL').to.equal('/settings/apps/amp'); expect(currentURL(), 'currentURL').to.equal('/settings/integrations/amp');
// AMP is enabled by default // AMP is enabled by default
expect(find('[data-test-amp-checkbox]').prop('checked'), 'AMP checkbox').to.be.true; expect(find('[data-test-amp-checkbox]').prop('checked'), 'AMP checkbox').to.be.true;
@ -125,9 +125,9 @@ describe('Acceptance: Settings - Apps - AMP', function () {
expect(currentURL(), 'currentURL').to.equal('/team'); expect(currentURL(), 'currentURL').to.equal('/team');
await visit('/settings/apps/amp'); await visit('/settings/integrations/amp');
expect(currentURL(), 'currentURL').to.equal('/settings/apps/amp'); expect(currentURL(), 'currentURL').to.equal('/settings/integrations/amp');
// settings were not saved // settings were not saved
expect(find('[data-test-amp-checkbox]').prop('checked'), 'AMP checkbox').to.be.true; expect(find('[data-test-amp-checkbox]').prop('checked'), 'AMP checkbox').to.be.true;

View file

@ -9,7 +9,7 @@ import {
import {authenticateSession, invalidateSession} from 'ghost-admin/tests/helpers/ember-simple-auth'; import {authenticateSession, invalidateSession} from 'ghost-admin/tests/helpers/ember-simple-auth';
import {expect} from 'chai'; import {expect} from 'chai';
describe('Acceptance: Settings - Apps', function () { describe('Acceptance: Settings - Integrations', function () {
let application; let application;
beforeEach(function () { beforeEach(function () {
@ -22,7 +22,7 @@ describe('Acceptance: Settings - Apps', function () {
it('redirects to signin when not authenticated', async function () { it('redirects to signin when not authenticated', async function () {
invalidateSession(application); invalidateSession(application);
await visit('/settings/apps'); await visit('/settings/integrations');
expect(currentURL(), 'currentURL').to.equal('/signin'); expect(currentURL(), 'currentURL').to.equal('/signin');
}); });
@ -32,7 +32,7 @@ describe('Acceptance: Settings - Apps', function () {
server.create('user', {roles: [role], slug: 'test-user'}); server.create('user', {roles: [role], slug: 'test-user'});
authenticateSession(application); authenticateSession(application);
await visit('/settings/apps'); await visit('/settings/integrations');
expect(currentURL(), 'currentURL').to.equal('/team/test-user'); expect(currentURL(), 'currentURL').to.equal('/team/test-user');
}); });
@ -42,7 +42,7 @@ describe('Acceptance: Settings - Apps', function () {
server.create('user', {roles: [role], slug: 'test-user'}); server.create('user', {roles: [role], slug: 'test-user'});
authenticateSession(application); authenticateSession(application);
await visit('/settings/apps'); await visit('/settings/integrations');
expect(currentURL(), 'currentURL').to.equal('/team/test-user'); expect(currentURL(), 'currentURL').to.equal('/team/test-user');
}); });
@ -52,7 +52,7 @@ describe('Acceptance: Settings - Apps', function () {
server.create('user', {roles: [role], slug: 'test-user'}); server.create('user', {roles: [role], slug: 'test-user'});
authenticateSession(application); authenticateSession(application);
await visit('/settings/apps'); await visit('/settings/integrations');
expect(currentURL(), 'currentURL').to.equal('/team'); expect(currentURL(), 'currentURL').to.equal('/team');
}); });
@ -66,7 +66,7 @@ describe('Acceptance: Settings - Apps', function () {
}); });
it('renders correctly', async function () { it('renders correctly', async function () {
await visit('/settings/apps'); await visit('/settings/integrations');
// slack is not configured in the fixtures // slack is not configured in the fixtures
expect( expect(
@ -82,39 +82,39 @@ describe('Acceptance: Settings - Apps', function () {
}); });
it('it redirects to Slack when clicking on the grid', async function () { it('it redirects to Slack when clicking on the grid', async function () {
await visit('/settings/apps'); await visit('/settings/integrations');
// has correct url // has correct url
expect(currentURL(), 'currentURL').to.equal('/settings/apps'); expect(currentURL(), 'currentURL').to.equal('/settings/integrations');
await click('[data-test-link="slack"]'); await click('[data-test-link="slack"]');
// has correct url // has correct url
expect(currentURL(), 'currentURL').to.equal('/settings/apps/slack'); expect(currentURL(), 'currentURL').to.equal('/settings/integrations/slack');
}); });
it('it redirects to AMP when clicking on the grid', async function () { it('it redirects to AMP when clicking on the grid', async function () {
await visit('/settings/apps'); await visit('/settings/integrations');
// has correct url // has correct url
expect(currentURL(), 'currentURL').to.equal('/settings/apps'); expect(currentURL(), 'currentURL').to.equal('/settings/integrations');
await click('[data-test-link="amp"]'); await click('[data-test-link="amp"]');
// has correct url // has correct url
expect(currentURL(), 'currentURL').to.equal('/settings/apps/amp'); expect(currentURL(), 'currentURL').to.equal('/settings/integrations/amp');
}); });
it('it redirects to Unsplash when clicking on the grid', async function () { it('it redirects to Unsplash when clicking on the grid', async function () {
await visit('/settings/apps'); await visit('/settings/integrations');
// has correct url // has correct url
expect(currentURL(), 'currentURL').to.equal('/settings/apps'); expect(currentURL(), 'currentURL').to.equal('/settings/integrations');
await click('[data-test-link="unsplash"]'); await click('[data-test-link="unsplash"]');
// has correct url // has correct url
expect(currentURL(), 'currentURL').to.equal('/settings/apps/unsplash'); expect(currentURL(), 'currentURL').to.equal('/settings/integrations/unsplash');
}); });
}); });
}); });

View file

@ -6,7 +6,7 @@ import {afterEach, beforeEach, describe, it} from 'mocha';
import {authenticateSession, invalidateSession} from 'ghost-admin/tests/helpers/ember-simple-auth'; import {authenticateSession, invalidateSession} from 'ghost-admin/tests/helpers/ember-simple-auth';
import {expect} from 'chai'; import {expect} from 'chai';
describe('Acceptance: Settings - Apps - Slack', function () { describe('Acceptance: Settings - Integrations - Slack', function () {
let application; let application;
beforeEach(function () { beforeEach(function () {
@ -19,7 +19,7 @@ describe('Acceptance: Settings - Apps - Slack', function () {
it('redirects to signin when not authenticated', async function () { it('redirects to signin when not authenticated', async function () {
invalidateSession(application); invalidateSession(application);
await visit('/settings/apps/slack'); await visit('/settings/integrations/slack');
expect(currentURL(), 'currentURL').to.equal('/signin'); expect(currentURL(), 'currentURL').to.equal('/signin');
}); });
@ -29,7 +29,7 @@ describe('Acceptance: Settings - Apps - Slack', function () {
server.create('user', {roles: [role], slug: 'test-user'}); server.create('user', {roles: [role], slug: 'test-user'});
authenticateSession(application); authenticateSession(application);
await visit('/settings/apps/slack'); await visit('/settings/integrations/slack');
expect(currentURL(), 'currentURL').to.equal('/team/test-user'); expect(currentURL(), 'currentURL').to.equal('/team/test-user');
}); });
@ -39,7 +39,7 @@ describe('Acceptance: Settings - Apps - Slack', function () {
server.create('user', {roles: [role], slug: 'test-user'}); server.create('user', {roles: [role], slug: 'test-user'});
authenticateSession(application); authenticateSession(application);
await visit('/settings/apps/slack'); await visit('/settings/integrations/slack');
expect(currentURL(), 'currentURL').to.equal('/team/test-user'); expect(currentURL(), 'currentURL').to.equal('/team/test-user');
}); });
@ -49,7 +49,7 @@ describe('Acceptance: Settings - Apps - Slack', function () {
server.create('user', {roles: [role], slug: 'test-user'}); server.create('user', {roles: [role], slug: 'test-user'});
authenticateSession(application); authenticateSession(application);
await visit('/settings/apps/slack'); await visit('/settings/integrations/slack');
expect(currentURL(), 'currentURL').to.equal('/team'); expect(currentURL(), 'currentURL').to.equal('/team');
}); });
@ -63,10 +63,10 @@ describe('Acceptance: Settings - Apps - Slack', function () {
}); });
it('it validates and saves a slack url properly', async function () { it('it validates and saves a slack url properly', async function () {
await visit('/settings/apps/slack'); await visit('/settings/integrations/slack');
// has correct url // has correct url
expect(currentURL(), 'currentURL').to.equal('/settings/apps/slack'); expect(currentURL(), 'currentURL').to.equal('/settings/integrations/slack');
await fillIn('[data-test-slack-url-input]', 'notacorrecturl'); await fillIn('[data-test-slack-url-input]', 'notacorrecturl');
await click('[data-test-save-button]'); await click('[data-test-save-button]');
@ -118,10 +118,10 @@ describe('Acceptance: Settings - Apps - Slack', function () {
}); });
it('warns when leaving without saving', async function () { it('warns when leaving without saving', async function () {
await visit('/settings/apps/slack'); await visit('/settings/integrations/slack');
// has correct url // has correct url
expect(currentURL(), 'currentURL').to.equal('/settings/apps/slack'); expect(currentURL(), 'currentURL').to.equal('/settings/integrations/slack');
await fillIn('[data-test-slack-url-input]', 'https://hooks.slack.com/services/1275958430'); await fillIn('[data-test-slack-url-input]', 'https://hooks.slack.com/services/1275958430');
await triggerEvent('[data-test-slack-url-input]', 'blur'); await triggerEvent('[data-test-slack-url-input]', 'blur');
@ -135,9 +135,9 @@ describe('Acceptance: Settings - Apps - Slack', function () {
expect(currentURL(), 'currentURL').to.equal('/settings/design'); expect(currentURL(), 'currentURL').to.equal('/settings/design');
await visit('/settings/apps/slack'); await visit('/settings/integrations/slack');
expect(currentURL(), 'currentURL').to.equal('/settings/apps/slack'); expect(currentURL(), 'currentURL').to.equal('/settings/integrations/slack');
// settings were not saved // settings were not saved
expect( expect(

View file

@ -5,7 +5,7 @@ import {afterEach, beforeEach, describe, it} from 'mocha';
import {authenticateSession, invalidateSession} from 'ghost-admin/tests/helpers/ember-simple-auth'; import {authenticateSession, invalidateSession} from 'ghost-admin/tests/helpers/ember-simple-auth';
import {expect} from 'chai'; import {expect} from 'chai';
describe('Acceptance: Settings - Apps - Unsplash', function () { describe('Acceptance: Settings - Integrations - Unsplash', function () {
let application; let application;
beforeEach(function () { beforeEach(function () {
@ -18,7 +18,7 @@ describe('Acceptance: Settings - Apps - Unsplash', function () {
it('redirects to signin when not authenticated', async function () { it('redirects to signin when not authenticated', async function () {
invalidateSession(application); invalidateSession(application);
await visit('/settings/apps/unsplash'); await visit('/settings/integrations/unsplash');
expect(currentURL(), 'currentURL').to.equal('/signin'); expect(currentURL(), 'currentURL').to.equal('/signin');
}); });
@ -28,7 +28,7 @@ describe('Acceptance: Settings - Apps - Unsplash', function () {
server.create('user', {roles: [role], slug: 'test-user'}); server.create('user', {roles: [role], slug: 'test-user'});
authenticateSession(application); authenticateSession(application);
await visit('/settings/apps/unsplash'); await visit('/settings/integrations/unsplash');
expect(currentURL(), 'currentURL').to.equal('/team/test-user'); expect(currentURL(), 'currentURL').to.equal('/team/test-user');
}); });
@ -38,7 +38,7 @@ describe('Acceptance: Settings - Apps - Unsplash', function () {
server.create('user', {roles: [role], slug: 'test-user'}); server.create('user', {roles: [role], slug: 'test-user'});
authenticateSession(application); authenticateSession(application);
await visit('/settings/apps/unsplash'); await visit('/settings/integrations/unsplash');
expect(currentURL(), 'currentURL').to.equal('/team/test-user'); expect(currentURL(), 'currentURL').to.equal('/team/test-user');
}); });
@ -48,7 +48,7 @@ describe('Acceptance: Settings - Apps - Unsplash', function () {
server.create('user', {roles: [role], slug: 'test-user'}); server.create('user', {roles: [role], slug: 'test-user'});
authenticateSession(application); authenticateSession(application);
await visit('/settings/apps/unsplash'); await visit('/settings/integrations/unsplash');
expect(currentURL(), 'currentURL').to.equal('/team'); expect(currentURL(), 'currentURL').to.equal('/team');
}); });
@ -62,10 +62,10 @@ describe('Acceptance: Settings - Apps - Unsplash', function () {
}); });
it('it can activate/deactivate', async function () { it('it can activate/deactivate', async function () {
await visit('/settings/apps/unsplash'); await visit('/settings/integrations/unsplash');
// has correct url // has correct url
expect(currentURL(), 'currentURL').to.equal('/settings/apps/unsplash'); expect(currentURL(), 'currentURL').to.equal('/settings/integrations/unsplash');
// verify we don't have an unsplash setting fixture loaded // verify we don't have an unsplash setting fixture loaded
expect( expect(
@ -103,10 +103,10 @@ describe('Acceptance: Settings - Apps - Unsplash', function () {
}); });
it('warns when leaving without saving', async function () { it('warns when leaving without saving', async function () {
await visit('/settings/apps/unsplash'); await visit('/settings/integrations/unsplash');
// has correct url // has correct url
expect(currentURL(), 'currentURL').to.equal('/settings/apps/unsplash'); expect(currentURL(), 'currentURL').to.equal('/settings/integrations/unsplash');
expect( expect(
find('[data-test-checkbox="unsplash"]').prop('checked'), find('[data-test-checkbox="unsplash"]').prop('checked'),
@ -126,9 +126,9 @@ describe('Acceptance: Settings - Apps - Unsplash', function () {
expect(currentURL(), 'currentURL').to.equal('/settings/labs'); expect(currentURL(), 'currentURL').to.equal('/settings/labs');
await visit('/settings/apps/unsplash'); await visit('/settings/integrations/unsplash');
expect(currentURL(), 'currentURL').to.equal('/settings/apps/unsplash'); expect(currentURL(), 'currentURL').to.equal('/settings/integrations/unsplash');
// settings were not saved // settings were not saved
expect(find('[data-test-checkbox="unsplash"]').prop('checked'), 'Unsplash checkbox').to.be.true; expect(find('[data-test-checkbox="unsplash"]').prop('checked'), 'Unsplash checkbox').to.be.true;