mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 13:14:07 -08:00
63a6e7e034
## Summary Update image sizes in template description not to be full width always. ## Related tickets and issues https://linear.app/n8n/issue/ADO-1506/bug-fix-images-in-template-descriptions ## Review / Merge checklist - [X] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** ([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md)) - [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. - [x] Tests included. > A bug is not considered fixed, unless a test is added to prevent it from happening again. > A feature is not complete without tests.
31 lines
860 B
TypeScript
31 lines
860 B
TypeScript
import { BasePage } from './base';
|
|
|
|
export class TemplateWorkflowPage extends BasePage {
|
|
url = '/templates';
|
|
|
|
getters = {
|
|
useTemplateButton: () => cy.get('[data-test-id="use-template-button"]'),
|
|
description: () => cy.get('[data-test-id="template-description"]')
|
|
};
|
|
|
|
actions = {
|
|
visit: (templateId: number) => {
|
|
cy.visit(`${this.url}/${templateId}`);
|
|
},
|
|
|
|
clickUseThisWorkflowButton: () => {
|
|
this.getters.useTemplateButton().click();
|
|
},
|
|
|
|
openTemplate: (template: {workflow: {id: number, name: string, description: string, user: {username: string}, image: {id: number, url: string}[] }}) => {
|
|
cy.intercept('GET', `https://api.n8n.io/api/templates/workflows/${template.workflow.id}`, {
|
|
statusCode: 200,
|
|
body: template,
|
|
}).as('getTemplate');
|
|
|
|
this.actions.visit(template.workflow.id);
|
|
cy.wait('@getTemplate');
|
|
},
|
|
};
|
|
}
|