fix(editor): Send protocol and n8n version in templates destination parameter, stop redirecting template preview page to website (#8691)
This commit is contained in:
committed by
GitHub
parent
5304b320c8
commit
a573146135
@@ -25,6 +25,13 @@ describe('Workflow templates', () => {
|
||||
mainSidebar.getters.menuItem('Templates').should('be.visible');
|
||||
// Templates should be a link to the website
|
||||
mainSidebar.getters.templates().parent('a').should('have.attr', 'href').and('include', 'https://n8n.io/workflows');
|
||||
// Link should contain instance address and n8n version
|
||||
mainSidebar.getters.templates().parent('a').then(($a) => {
|
||||
const href = $a.attr('href');
|
||||
// Link should have current instance address and n8n version
|
||||
expect(href).to.include(`utm_instance=${window.location.origin}`);
|
||||
expect(href).to.match(/utm_n8n_version=[0-9]+\.[0-9]+\.[0-9]+/);
|
||||
});
|
||||
mainSidebar.getters.templates().parent('a').should('have.attr', 'target', '_blank');
|
||||
});
|
||||
|
||||
@@ -34,11 +41,4 @@ describe('Workflow templates', () => {
|
||||
cy.url().should('include', 'https://n8n.io/workflows');
|
||||
})
|
||||
});
|
||||
|
||||
it('Redirects to website when visiting template by id page directly', () => {
|
||||
cy.visit(`${templatesPage.url}/1`);
|
||||
cy.origin('https://n8n.io', () => {
|
||||
cy.url().should('include', 'https://n8n.io/workflows/1');
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user