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

feat: Delete all Summary 2.0 components that has a reference to deleted component #14126

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mlqn
Copy link
Contributor

@mlqn mlqn commented Nov 21, 2024

Description

Delete all Summary 2.0 components that has a reference to deleted component

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

@github-actions github-actions bot added solution/studio/designer Issues related to the Altinn Studio Designer solution. backend labels Nov 21, 2024
…elete-all-summary-20-components-that-has-a-reference-to-deleted-element-component-page-or-layout-set
@github-actions github-actions bot added the quality/testing Tests that are missing, needs to be created or could be improved. label Nov 29, 2024
string layout = TestDataHelper.GetFileFromRepo(org, app, developer, $"App/ui/{layoutSetName}/layouts/{layoutName}.json");
JsonNode layoutWithDeletedComponent = JsonNode.Parse(layout);
JsonArray layoutArray = layoutWithDeletedComponent["data"]["layout"] as JsonArray;
layoutArray.RemoveAt(0);

Check warning

Code scanning / CodeQL

Dereferenced variable may be null Warning test

Variable
layoutArray
may be null at this access because of
this
assignment.
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.36%. Comparing base (c71f649) to head (1920a7b).
Report is 16 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14126   +/-   ##
=======================================
  Coverage   95.36%   95.36%           
=======================================
  Files        1797     1797           
  Lines       23367    23367           
  Branches     2703     2703           
=======================================
  Hits        22284    22284           
  Misses        836      836           
  Partials      247      247           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend quality/testing Tests that are missing, needs to be created or could be improved. solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant