From 1639b1233800905b32b22ff9154fd696330fb9f7 Mon Sep 17 00:00:00 2001 From: Florian Dupuy Date: Tue, 3 Dec 2024 11:32:17 +0100 Subject: [PATCH 1/4] Remove sonar default properties Signed-off-by: Florian Dupuy --- sonar-project.properties | 2 -- 1 file changed, 2 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index ff17374c..2d5059f5 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,2 @@ sonar.projectKey=powsybl_powsybl-network-viewer sonar.organization=powsybl-ci-github -sonar.projectBaseDir=src -sonar.javascript.lcov.reportPaths=./coverage/lcov.info From 1051c34beaef465c6ac397c4fb0a5960e7d6067f Mon Sep 17 00:00:00 2001 From: Florian Dupuy Date: Tue, 3 Dec 2024 11:43:21 +0100 Subject: [PATCH 2/4] Remove test coverage in build workflow Signed-off-by: Florian Dupuy --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 93453516..831a662d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,6 @@ jobs: npm install npm run licenses-check npm run lint - npm run test:coverage npm run build - name: SonarCloud Scan From d31d4018dde5e638428fe46da2a1e1b0069779f7 Mon Sep 17 00:00:00 2001 From: Florian Dupuy Date: Tue, 3 Dec 2024 15:53:01 +0100 Subject: [PATCH 3/4] test code change Signed-off-by: Florian Dupuy --- src/components/network-area-diagram-viewer/diagram-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/network-area-diagram-viewer/diagram-utils.ts b/src/components/network-area-diagram-viewer/diagram-utils.ts index 50a2f10a..3fe90a5d 100644 --- a/src/components/network-area-diagram-viewer/diagram-utils.ts +++ b/src/components/network-area-diagram-viewer/diagram-utils.ts @@ -483,7 +483,7 @@ export function getTextNodePosition(textNode: SVGGraphicsElement | null): Point export function getNodeMove(node: NodeMetadata, nodePosition: Point): NODEMOVE { const xNew = round(nodePosition.x); const yNew = round(nodePosition.y); - return { xOrig: node.x, yOrig: node.y, xNew: xNew, yNew: yNew }; + return { xOrig: node.y, yOrig: node.x, xNew: xNew, yNew: yNew }; } // Checks if the element is hoverable From 97e2c48000876d1273ce435f80a1e907c2af61e0 Mon Sep 17 00:00:00 2001 From: Florian Dupuy Date: Tue, 3 Dec 2024 15:57:40 +0100 Subject: [PATCH 4/4] Add npm test back Signed-off-by: Florian Dupuy --- .github/workflows/build.yml | 1 + src/components/network-area-diagram-viewer/diagram-utils.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 831a662d..93453516 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,6 +40,7 @@ jobs: npm install npm run licenses-check npm run lint + npm run test:coverage npm run build - name: SonarCloud Scan diff --git a/src/components/network-area-diagram-viewer/diagram-utils.ts b/src/components/network-area-diagram-viewer/diagram-utils.ts index 3fe90a5d..50a2f10a 100644 --- a/src/components/network-area-diagram-viewer/diagram-utils.ts +++ b/src/components/network-area-diagram-viewer/diagram-utils.ts @@ -483,7 +483,7 @@ export function getTextNodePosition(textNode: SVGGraphicsElement | null): Point export function getNodeMove(node: NodeMetadata, nodePosition: Point): NODEMOVE { const xNew = round(nodePosition.x); const yNew = round(nodePosition.y); - return { xOrig: node.y, yOrig: node.x, xNew: xNew, yNew: yNew }; + return { xOrig: node.x, yOrig: node.y, xNew: xNew, yNew: yNew }; } // Checks if the element is hoverable