Skip to content

Commit

Permalink
Merge pull request #3791 from FlowFuse/3786-immersive-editor-refuses-…
Browse files Browse the repository at this point in the history
…to-connect-in-production

Alter instance editor links pointing to the immersive editor to point to the default editor
  • Loading branch information
knolleary committed Apr 29, 2024
2 parents 64cd01e + b411a5d commit 8c36a97
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
7 changes: 6 additions & 1 deletion frontend/src/pages/instance/components/EditorLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,15 @@ export default {
required: true
}
},
data () {
return {
canUseImmersiveEditor: false
}
},
computed: {
...mapState('account', ['team', 'teamMembership']),
isImmersiveEditor () {
return SemVer.satisfies(SemVer.coerce(this.instance?.meta?.versions?.launcher), '>=2.3.1')
return this.canUseImmersiveEditor && SemVer.satisfies(SemVer.coerce(this.instance?.meta?.versions?.launcher), '>=2.3.1')
},
url () {
if (this.isImmersiveEditor) {
Expand Down
10 changes: 5 additions & 5 deletions test/e2e/frontend/cypress/tests/instances/editor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ describe('FlowForge - Instance editor', () => {

cy.get('[data-action="open-editor"]')
.children()
.should('not.exist')
.should('exist') // todo revert when the editor is ready

cy.get('[data-action="open-editor"]').click()

cy.get('[data-el="editor-iframe"]').should('exist')
cy.get('[data-el="tabs-drawer"]').should('exist')
// cy.get('[data-action="open-editor"]').click()
//
// cy.get('[data-el="editor-iframe"]').should('exist')
// cy.get('[data-el="tabs-drawer"]').should('exist')
})

it('has working drawer navigation tabs', () => {
Expand Down

0 comments on commit 8c36a97

Please sign in to comment.