test(editor): Add e2e test cases for the logs view (#15060)

This commit is contained in:
Suguru Inoue
2025-05-08 05:59:25 +02:00
committed by GitHub
parent 662358cc43
commit abdbe50907
11 changed files with 448 additions and 58 deletions

View File

@@ -9,6 +9,9 @@ export const getWorkflowExecutionPreviewIframe = () => cy.getByTestId('workflow-
export const getExecutionPreviewBody = () =>
getWorkflowExecutionPreviewIframe()
.its('0.contentDocument.body')
.should((body) => {
expect(body.querySelector('[data-test-id="canvas-wrapper"]')).to.exist;
})
.then((el) => cy.wrap(el));
export const getExecutionPreviewBodyNodes = () =>
@@ -21,9 +24,23 @@ export function getExecutionPreviewOutputPanelRelatedExecutionLink() {
return getExecutionPreviewBody().findChildByTestId('related-execution-link');
}
export function getLogsOverviewStatus() {
return getExecutionPreviewBody().findChildByTestId('logs-overview-status');
}
export function getLogEntries() {
return getExecutionPreviewBody().findChildByTestId('logs-overview-body').find('[role=treeitem]');
}
export function getManualChatMessages() {
return getExecutionPreviewBody().find('.chat-messages-list .chat-message');
}
/**
* Actions
*/
export const openExecutionPreviewNode = (name: string) =>
getExecutionPreviewBodyNodesByName(name).dblclick();
export const toggleAutoRefresh = () => cy.getByTestId('auto-refresh-checkbox').click();