Skip to content

Commit

Permalink
fix: correct node preview route (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
fago authored Jan 19, 2025
1 parent 4dae69f commit da11739
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// is done client-side and without API-proxy, such that the cookie is forwarded by
// the browser. It requires the CORS helper module to be enabled.
import DefaultPage from '../[...slug].vue'
import DefaultPage from '../../[...slug].vue'
export default {
extends: DefaultPage,
Expand Down
4 changes: 2 additions & 2 deletions test/unit/components/preview.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { mountSuspended, registerEndpoint } from '@nuxt/test-utils/runtime'
import App from '~/app.vue'

describe('Preview routes', () => {
registerEndpoint('http://127.0.0.1:3001/ce-api/preview/node', () => ({
registerEndpoint('http://127.0.0.1:3001/ce-api/node/preview/node', () => ({
content: {
element: 'node-article',
body: '<p>Some <b>example</b> body.</p>'
Expand All @@ -30,7 +30,7 @@ describe('Preview routes', () => {

it('renders preview/node with direct backend request, skipping drupal-ce-proxy', async () => {
const component = await mountSuspended(App, {
route: '/preview/node'
route: '/node/preview/node'
})
expect(component.html()).toContain('<p>Some <b>example</b> body.</p>')
})
Expand Down

0 comments on commit da11739

Please sign in to comment.