0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Replaced "Open Importer" button with one that works

no issue
This commit is contained in:
Sam Lord 2022-11-16 10:22:49 +00:00
parent d5f8a2b59d
commit 5619348c26
3 changed files with 18 additions and 8 deletions

View file

@ -1,13 +1,12 @@
import Controller, {inject as controller} from '@ember/controller'; import Controller from '@ember/controller';
import {action} from '@ember/object'; import {action} from '@ember/object';
import {inject as service} from '@ember/service'; import {inject as service} from '@ember/service';
export default class ImportController extends Controller { export default class ImportController extends Controller {
@service router; @service router;
@controller labs;
@action @action
close() { close() {
this.router.transitionTo('labs'); this.router.transitionTo('settings.labs');
} }
} }

View file

@ -25,10 +25,9 @@
<h4 class="gh-expandable-title">Import content</h4> <h4 class="gh-expandable-title">Import content</h4>
<p class="gh-expandable-description">Import posts from a JSON or zip file</p> <p class="gh-expandable-description">Import posts from a JSON or zip file</p>
</div> </div>
<LinkTo @route="settings.labs.import" class="mr2" data-test-link="import-content"> <LinkTo @route="settings.labs.import" class="gh-btn" data-test-link="import-content">
<span>Open Importer</span> <span>Open Importer</span>
</LinkTo> </LinkTo>
<button type="button" class="gh-btn" {{action "importContent"}}><span>Open Importer</span></button>
</div> </div>
</div> </div>

View file

@ -1,8 +1,20 @@
const {expect, test} = require('@playwright/test'); const {expect, test} = require('@playwright/test');
const testUtils = require('../utils');
const express = require('express');
let siteUrl = process.env.TEST_URL || 'http://localhost:2368'; let siteUrl = process.env.TEST_URL || 'http://localhost:2368';
test('Homepage is 200', async ({page}) => { test.describe('Ghost frontend', function () {
const response = await page.goto(siteUrl); test.beforeAll(async function () {
expect(response.status()).toEqual(200); const app = await testUtils.startGhost();
});
test.afterAll(async () => {
await testUtils.stopGhost();
});
test('Loads the homepage', async ({page}) => {
const response = await page.goto(siteUrl);
expect(response.status()).toEqual(200);
});
}); });