544 Commits

Author SHA1 Message Date
Lipu Fei
c42feae11c Make intents work on quality management page
CURA-6706
2019-10-07 09:22:47 +02:00
Ghostkeeper
862504f603
Add test for preferring a material diameter over the preferred from metadata
Done during Turbo Testing and Tooling.
2019-10-04 17:32:42 +02:00
Ghostkeeper
9b6443c2d3
Add test for preferred material diameter mismatch
Done during Turbo Testing and Tooling.
2019-10-04 17:28:27 +02:00
Ghostkeeper
93e397a0cc
Move creation of empty variant nodes to fixture
Done during Turbo Testing and Tooling.
2019-10-04 17:23:14 +02:00
Ghostkeeper
30e268e975
Add test for preferred material's diameter check
Done during Turbo Testing and Tooling.
2019-10-04 17:16:59 +02:00
Ghostkeeper
54fcb38fe6
Add test for preferred material matching on submaterials
Done during Turbo Testing and Tooling.
2019-10-04 17:11:32 +02:00
Ghostkeeper
a117e937b9
Add test for preferred material with the happy flow
The exact preferred material is available. Pick that.
2019-10-04 17:07:45 +02:00
Ghostkeeper
2671f12c21
Add test for is_available on resulting quality groups
Done during Turbo Testing and Tooling.
2019-10-04 15:35:33 +02:00
Ghostkeeper
5ae248341b
Add test for getting quality groups from the container tree
Finally it works.

Done during turbo testing and tooling.
2019-10-04 15:35:33 +02:00
Lipu Fei
e5c59b1308 Fix TestVariantNode 2019-10-04 11:00:01 +02:00
Lipu Fei
7233bdb255 Fix TestMachineNode: remove invalid property has_machine_materials 2019-10-04 10:37:45 +02:00
Ghostkeeper
b245be6970
Remove has_machine_materials metadata
It's not behaving as expected here. For instance, Ultimaker 3 wasn't specifying has_machine_materials and thus only the base materials would get loaded, but clearly the Ultimaker 3 has materials specialised for it.
Whether or not a printer has materials specialised for it is now determined by whether the specialisations exist in the material files. So we don't need the metadata entry any more. It seemed to have not been in use anyway, except by one printer which specified that has_machine_materials is true. I've now made it behave as if it's always true.

Contributes to issue CURA-6831.
2019-10-02 08:55:04 +02:00
Lipu Fei
f867f3485e Fix TestIntentManager 2019-10-01 11:30:54 +02:00
Ghostkeeper
45f3b6eeb2
Simplify quality node intents list test
Not a whole lot of mocking.
I also added a lot of extra instance containers that should NOT match.

Added during testing & tooling.
2019-09-27 16:04:49 +02:00
Ghostkeeper
4e8929a072
Fix structure of mock container tree
Found during testing and tooling.
2019-09-27 15:26:14 +02:00
Ghostkeeper
97eaeab3bd
Fix missing intent in mock and missing quality_type
These are used by the code. Otherwise there would be an AttributeError of 'intent' not existing, and the quality type in the quality node wouldn't match because it's a magic mock.
2019-09-27 15:13:23 +02:00
Lipu Fei
94e89ad4ac Fix merge conflicts with master 2019-09-24 14:26:43 +02:00
Jaime van Kessel
4dc918c647
Fix unit test 2019-09-23 17:09:54 +02:00
Ghostkeeper
557746a832
Partial fix for intent manager not finding correct profile in test
Only in test.
2019-09-23 15:17:15 +02:00
Ghostkeeper
7d40d962e8
Mock ContainerTree instead of ContainerRegistry to test intent manager
Because now it relies on the container tree instead of querying the registry anew every time.
2019-09-23 15:03:24 +02:00
Jaime van Kessel
3a2c5b2473
Fix test for stack builder 2019-09-23 13:26:21 +02:00
Ghostkeeper
61527e082e
Mock ContainerTree instead of ContainerRegistry
The intent models are now using the ContainerTree to build themselves rather than the registry.
2019-09-23 09:59:57 +02:00
Jaime van Kessel
c0db1a17be
Fix the false positive failure in the unit test 2019-09-16 11:40:08 +02:00
Ghostkeeper
f1299589c9
Remove debug prints
Contributes to issue CURA-6600.
2019-09-12 15:49:27 +02:00
Diego Prado Gesto
b18565d9cf Merge branch 'master' into feature_intent_container_tree 2019-09-10 11:08:21 +02:00
Lipu Fei
3f3aac7ce5
Merge pull request #6289 from Ultimaker/feature_intent_interface
Feature intent interface
2019-09-09 16:53:37 +02:00
Ghostkeeper
5debdd4cf6
Fix getting extruder list everywhere
Didn't test this beyond my own automated test, it seems.

Contributes to issue CURA-6600.
2019-09-09 16:47:29 +02:00
Lipu Fei
dba3b77f61 Fix tests
CURA-6598
2019-09-09 16:45:39 +02:00
Ghostkeeper
178887d8e5
Add test for getting metadata from machine node
Contributes to issue CURA-6600.
2019-09-06 17:40:31 +02:00
Ghostkeeper
5106d3b7c1
Test if we actually return the result of the call to getQuality[Changes]Groups
Contributes to issue CURA-6600.
2019-09-06 17:26:38 +02:00
Ghostkeeper
7f192ce36f
Add test for getting current quality changes groups
Similar to getting the current quality groups.

Contributes to issue CURA-6600.
2019-09-06 17:25:07 +02:00
Ghostkeeper
ea5530c507
Add test for getting quality changes groups without global stack
Shouldn't crash. Instead it should give no quality changes groups.

Contributes to issue CURA-6600.
2019-09-06 17:21:56 +02:00
Ghostkeeper
4bdc819f12
Fix nondetermistic result with dictionary values list
Because global_stack.extruders.values can be returned in any order, the configurations matching with the lists doesn't always give a result.
It happened to work on my computer with the test, but there is no guarantee of that.

This is probably also going wrong in other places. I don't think we should use the .extruders property anywhere really!

Contributes to issue CURA-6600.
2019-09-06 17:15:45 +02:00
Ghostkeeper
d618f2df71
Add test for getCurrentQualityGroups
The test succeeded but in writing it I discovered a bug. I'll fix that soon.

Contributes to issue CURA-6600.
2019-09-06 17:06:32 +02:00
Jaime van Kessel
f540abbd73
Expand the createUniqueName test 2019-09-06 15:13:25 +02:00
Ghostkeeper
10f37c98ff
Add test for getCurrentQualityGroups if there is no current printer
Contributes to issue CURA-6600.
2019-09-02 13:35:17 +02:00
Jaime van Kessel
001c2ec753 Fix test 2019-08-29 17:09:31 +02:00
Jaime van Kessel
d9e94f5019 Fix tests 2019-08-29 17:07:36 +02:00
Jaime van Kessel
784ab6e903 Add missing isDirty function
CURA-6600
2019-08-29 16:36:11 +02:00
Remco Burema
745390e51f Fix typing.
part CURA-6600
2019-08-27 17:57:11 +02:00
Remco Burema
d5a8b2640f Fix 'getQualityChangesGroups' now gives a list issues.
part of CURA-6600
2019-08-27 15:46:47 +02:00
Jaime van Kessel
d1a8ce54a1 Merge branch 'feature_intent' of github.com:Ultimaker/Cura into feature_intent_container_tree 2019-08-27 14:18:41 +02:00
Jaime van Kessel
1d9d411732 Merge branch 'master' of github.com:Ultimaker/Cura into feature_intent 2019-08-27 14:17:57 +02:00
Ghostkeeper
be36ae278b
Fix tests mocking container tree instead of quality manager
Contributes to issue CURA-6600.
2019-08-26 16:23:20 +02:00
ChrisTerBeke
882352c99d Test fixes, not working yet 2019-08-23 17:03:39 +02:00
ChrisTerBeke
73b423138a Add a test to ensure empty configurations are not shown in the list 2019-08-23 16:35:15 +02:00
Jaime van Kessel
1e2f5ddecd Add test for unique printer configuration
CURA-6732
2019-08-22 14:53:13 +02:00
Jaime van Kessel
89260891e6 Add tests for the available configurations
CURA-6732
2019-08-22 14:32:33 +02:00
Jaime van Kessel
34c3a04744 Added missing tests for peripheral
Not part of the ticket, but I'm boyscouting this.
2019-08-22 14:24:19 +02:00
Jaime van Kessel
73c6676673 Added missing test for camera URL 2019-08-22 14:17:40 +02:00