mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
627ddb91fb
Open the template credential setup when using a template from the collection view. NOTE! This feature is still behind a feature flag. To test, set: ```js localStorage.setItem('template-credentials-setup', 'true') ``` https://github.com/n8n-io/n8n/assets/10324676/46ccec7c-5a44-429e-99ad-1c10640e99e5
34 lines
800 B
TypeScript
34 lines
800 B
TypeScript
export function visitTemplateCollectionPage(withFixture: Fixture) {
|
|
cy.intercept(
|
|
'GET',
|
|
`https://api.n8n.io/api/templates/collections/${testData.ecommerceStarterPack.id}`,
|
|
{
|
|
fixture: withFixture.fixture,
|
|
},
|
|
).as('getTemplateCollection');
|
|
|
|
cy.visit(`/collections/${withFixture.id}`);
|
|
|
|
cy.wait('@getTemplateCollection');
|
|
}
|
|
|
|
export function clickUseWorkflowButtonByTitle(workflowTitle: string) {
|
|
cy.getByTestId('template-card')
|
|
.contains('[data-test-id=template-card]', workflowTitle)
|
|
.realHover({ position: 'center' })
|
|
.findChildByTestId('use-workflow-button')
|
|
.click({ force: true });
|
|
}
|
|
|
|
export type Fixture = {
|
|
id: number;
|
|
fixture: string;
|
|
};
|
|
|
|
export const testData = {
|
|
ecommerceStarterPack: {
|
|
id: 1,
|
|
fixture: 'Ecommerce_starter_pack_template_collection.json',
|
|
},
|
|
};
|