534 Commits

Author SHA1 Message Date
Jaime van Kessel
0493fb24df
Add extra human readable strings to asserts 2020-10-09 15:08:27 +02:00
Jaime van Kessel
8f4dd3cb12
Made the asserts of the profile tests a bit more explicit
This makes it easier to read the test outcome, since it gives
much better hints what can / needs to be done to fix it.
2020-10-09 14:02:47 +02:00
Jaime van Kessel
bfef61ad81
Use fastConfigParser for the versionUpToDate test
This makes the test a fair bit faster!
2020-10-09 13:58:26 +02:00
Jaime van Kessel
f31490125c
Add test to check if profile ID's are unique
CURA-7763
2020-10-09 13:53:58 +02:00
Jaime van Kessel
b35c8ba9bc
Add recalculate call to tests 2020-09-07 10:22:23 +02:00
Jaime van Kessel
87fb495e07
Add some property tests for MachineManager 2020-08-21 16:36:04 +02:00
Jaime van Kessel
1affc345b9
Add test for clearUserSettingAllCurrentStacks 2020-08-21 16:02:26 +02:00
Jaime van Kessel
ef4fae5b80
Expand tests for hasUserSettings 2020-08-21 15:39:03 +02:00
Jaime van Kessel
e1e0a4d32c
Expand the getMachine test 2020-08-21 15:16:29 +02:00
Jaime van Kessel
ce930220e9
Add tests for SetActiveMachine 2020-08-21 15:14:44 +02:00
Jaime van Kessel
43efac491d
Fix the unit test
Previously we would only look at the state, but that isn't the only thing it should look at.
It should override the value of a resolve if it's defined in user changes or QualityChanges.
2020-08-14 15:41:40 +02:00
Ghostkeeper
db15bc84cf
Correct and consistent spelling of g-code
This spelling is in Ultimaker's style guide.
We use g-code, and capitalise the G if it's at the start of a sentence or header.
Pretty good score, considering there are literally thousands of user- or log-visible strings mentioning g-code across Cura.
2020-07-20 13:36:49 +02:00
Nino van Hooff
816aaafc19 Revert changes for CURA-5479
It was decided that functionality present in existing plugins is
sufficient. No need to replicate it in our own codebase and
take on the burden of maintenance

CURA-5479
2020-07-07 16:11:03 +02:00
Nino van Hooff
06284b6a73 Implement Review comments
CURA-5479
2020-07-01 16:47:20 +02:00
Nino van Hooff
adf082a4ad Fix TextPrintInformation
CURA-5479
2020-07-01 14:59:14 +02:00
Jaime van Kessel
22de878e5c
Merge branch 'CURA-7473_account_pending_update_button' of github.com:Ultimaker/Cura 2020-06-29 15:11:42 +02:00
Christian Clauss
e78248eaf3
Avoid SyntaxWarning on Python >= 3.8 2020-06-28 15:20:44 +02:00
Nino van Hooff
294afdb7ca Connect sync timer to sync() for consistency and add unit tests.
Also rename a function to camelCase

CURA-7473
2020-06-26 16:09:33 +02:00
Jaime van Kessel
cb657ac45a
Some minor stylechanges in tests 2020-06-19 15:34:13 +02:00
Jaime van Kessel
ea0c8ff9bc
Implement setDirty for mockContainer 2020-06-18 18:05:07 +02:00
Ghostkeeper
93c84d5bc0
Mock the limit_to_extruder property with an actual value
This is necessary because our code now converts this to an integer. Mocks can't be converted to an integer, so the sub-magic-mock here can't be used. We need to provide something that can be cast to an integer.
2020-06-02 14:01:09 +02:00
Ghostkeeper
825a34d418
Mock the extruderList
Otherwise the list of extruders becomes a MagicMock. Adding a list to a MagicMock is again a MagicMock, and when iterating over that it doesn't result in any iterations. As a result, the for loop that clears all user containers didn't clear anything and the test failed.
2020-06-02 13:46:17 +02:00
Ghostkeeper
0d9053881c
Remove use of deprecated extruders property
Removes lots of warnings from the test log, since there the logger doesn't prevent creating multiple of those.

Done during Turbo Testing and Tooling.
2020-05-29 17:47:56 +02:00
Ghostkeeper
e098f98a7d
Remove unused mock of extruders property
The extruders property is no longer being used by the code under test, so this mock is unnecessary. It's also a deprecated property.

Done during Turbo Testing and Tooling.
2020-05-29 17:35:42 +02:00
Ghostkeeper
962e375dad
Remove mocking of deprecated field
This field is no longer used by the code under test.
2020-05-29 17:26:33 +02:00
Ghostkeeper
90de482313
Don't mock deprecated property
This property is deprecated. It's no longer used by the Build Volume code. Apparently it was unnecessary, too.

Done during Turbo Testing and Tooling.
2020-05-29 17:24:56 +02:00
Nino van Hooff
89f0970a88 Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
Nino van Hooff
ff3f4c99a8 Remove incorrect comment 2020-05-28 17:34:04 +02:00
Nino van Hooff
58ffc9dcae Merge remote-tracking branch 'origin/master' into doxygen_to_restructuredtext_comments
# Conflicts:
#	cura/API/__init__.py
#	cura/Settings/CuraContainerRegistry.py
#	cura/Settings/ExtruderManager.py
#	plugins/PostProcessingPlugin/scripts/PauseAtHeight.py
#	plugins/UM3NetworkPrinting/src/Cloud/CloudApiClient.py
#	plugins/UM3NetworkPrinting/src/Cloud/ToolPathUploader.py
#	plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDeviceManager.py
2020-05-28 17:31:24 +02:00
Nino van Hooff
c2c96faf5f Convert remaining doxygen to rst 2020-05-28 17:13:44 +02:00
Ghostkeeper
b231a4b3a2
Remove unnecessary re-adding of extruders
This was originally added for backwards compatibility with old versions of Uranium. However the link between Cura versions and Uranium versions is already very strong (Cura crashes with old Uranium versions) so this is not necessary.
It was also adding warnings in our log that these extruders had already been added to the printer.

Done during Turbo Testing and Tooling, to clean up our log files.
2020-05-15 14:26:44 +02:00
Nino van Hooff
f34e05ac03
Merge pull request #7743 from Ultimaker/CURA-7427_Add_option_to_sign_in_with_different_account_while_waiting_for_printers
Cura 7427 add option to sign in with different account while waiting for printers
2020-05-12 17:39:07 +02:00
Kostas Karmas
eac4d3e463 Make login parametrized with a force_logout boolean
Instead of using a separate function to force logging out before
login, login now has a boolean parameter that instructs it to logout
before loging in again, if the user is alread logged in. It then
starts the authorization with a force browser logout first.

CURA-7427
2020-05-12 16:54:41 +02:00
Ghostkeeper
a2f509c255
Merge branch 'Add_test_for_maximum_platform_mesh_size' 2020-05-12 13:20:55 +02:00
Kostas Karmas
32efb8d7bb Fix description comment of _generate_auth_url()
CURA-7427
2020-05-12 13:17:18 +02:00
Kostas Karmas
d3fb002d9b Transfer the generation of the auth link into its own function
The authentication link should be prepended with a logoff link from
mycloud, if it is requested. In order to make this process testable
this commit separates the generation of the authentication link,
based on whether it requests for a browser logoff first, into its
own function.

This commit also adds tests for this function.

CURA-7427
2020-05-12 13:07:39 +02:00
Kostas Karmas
96387ef2aa Add tests for loginWithForcedLogout() in account
CURA-7427
2020-05-12 13:06:47 +02:00
Kostas Karmas
1e2764278e Remove unnecessary os.path.basename call 2020-05-08 16:58:33 +02:00
Kostas Karmas
856bd86cd1 Add test for platform mesh sizes <=1MB
As a result of Cura and Cookies discussion, we decided to limit the
sizes of platform meshes to less than 1MB. This test checks that
during the CI/CD process and displays an assertion error when a
mesh excludes this limit.
2020-05-08 16:51:13 +02:00
Ghostkeeper
17af83bc19
Also test for the normal Version number
It rarely changes so it's less of a problem, but you never know.
2020-05-08 12:18:48 +02:00
Ghostkeeper
6baca9eaa2
Also test intent profiles
Contributes to issue CURA-7420.
2020-05-08 12:13:06 +02:00
Ghostkeeper
c61f3b04ba
Add test for all built-in profiles being up to date
So we had several hundred files outdated already. It's happened before. It shaln't happen again.

This test fails right now because there is one file still on setting_version 6.

Contributes to issue CURA-7420.
2020-05-08 11:26:37 +02:00
Kostas Karmas
07fcdf905e Add tests for the DiscoveredCloudPrintersModel
CURA-7022
2020-04-29 15:02:26 +02:00
Jaime van Kessel
9e68bcb7a0
Merge branch 'feature_objectlist_improvements' of https://github.com/fieldOfView/Cura 2020-04-28 15:40:08 +02:00
Ghostkeeper
f4f990708f
Remove old 'category' metadata
Most of it was incorrect and very inconsistent too. These are not used by our code any more.
2020-04-28 09:27:31 +02:00
fieldOfView
3e64ed155d Fix tests for updated ObjectsModel
Three roles were added to the ObjectsModel: "extruder_number", "per_object_settings_count" and "mesh_type"
2020-04-13 09:18:41 +02:00
Jaime van Kessel
2e9dca71ce
Remove a number of unused imports 2020-04-10 13:58:10 +02:00
Jaime van Kessel
fe27da5e8a
Remove a number of unused variables 2020-04-10 13:46:19 +02:00
Jaime van Kessel
3cc7382c12
Remove some unused code from TestCuraStackBuilder 2020-02-28 14:29:26 +01:00
Ghostkeeper
a8ccec709f
Add test for spaces in definition IDs
Contributes to issue CURA-7201.
2020-02-07 13:55:24 +01:00