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 {inject as service} from '@ember/service';
export default class ImportController extends Controller {
@service router;
@controller labs;
@action
close() {
this.router.transitionTo('labs');
this.router.transitionTo('settings.labs');
}
}

View file

@ -25,10 +25,9 @@
<h4 class="gh-expandable-title">Import content</h4>
<p class="gh-expandable-description">Import posts from a JSON or zip file</p>
</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>
</LinkTo>
<button type="button" class="gh-btn" {{action "importContent"}}><span>Open Importer</span></button>
</div>
</div>

View file

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