Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(core): Update dynamic node parameter endpoints to use DTOs #12379

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

netroy
Copy link
Member

@netroy netroy commented Dec 26, 2024

Summary

This is part 4 in a series of refactors.
Previous PRs:

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@netroy netroy force-pushed the CAT-455-port-over-more-dtos-part-4 branch from 46a8d59 to e7dc5da Compare December 26, 2024 18:30
@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Dec 26, 2024
Copy link

codecov bot commented Dec 26, 2024

Codecov Report

Attention: Patch coverage is 81.48148% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/editor-ui/src/api/nodeTypes.ts 16.66% 5 Missing ⚠️
packages/@n8n/api-types/src/dto/index.ts 0.00% 4 Missing ⚠️
...i/src/components/ResourceMapper/ResourceMapper.vue 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

RicardoE105
RicardoE105 previously approved these changes Dec 27, 2024
const req = { user: mockUser } as AuthenticatedRequest;

const expectedResult: INodePropertyOptions[] = [{ name: 'test', value: 'value' }];
service.getOptionsViaMethodName.mockResolvedValue(expectedResult);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Does not mocking the service here defeats the whole purpose of a e2e test? If we break getOptionsViaMethodName this test will pass even when it should no?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess if we had tests for DynamicNodeParametersService, it will be ok, but currently we do not 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's definitely a problem. quite a lot of our integration tests are using mocks. I tried fixing it here, but it very quickly became a side quest of its own. I'll address this in a separate PR.

Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link

cypress bot commented Dec 27, 2024

n8n    Run #8489

Run Properties:  status check failed Failed #8489  •  git commit 479463ebfc: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 netroy 🗃️ e2e/*
Project n8n
Branch Review CAT-455-port-over-more-dtos-part-4
Run status status check failed Failed #8489
Run duration 04m 08s
Commit git commit 479463ebfc: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 netroy 🗃️ e2e/*
Committer कारतोफ्फेलस्क्रिप्ट™
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 277
View all changes introduced in this branch ↗︎

Tests for review

Failed  48-subworkflow-inputs.cy.ts • 1 failed test

View Output Video

Test Artifacts
Sub-workflow creation and typed usage > works with Fields input source into JSON input source Test Replay Screenshots Video
Failed  45-workflow-selector-parameter.cy.ts • 0 failed tests

View Output

Test Artifacts
Failed  30-editor-after-route-changes.cy.ts • 0 failed tests

View Output

Test Artifacts
Failed  6-code-node.cy.ts • 0 failed tests

View Output

Test Artifacts
Failed  14-mapping.cy.ts • 0 failed tests

View Output

Test Artifacts

The first 5 failed specs are shown, see all 51 specs in Cypress Cloud.

Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants