601 Commits

Author SHA1 Message Date
Remco Burema
77823a9c12 Fix more unit-tests II.
related to internal ticket CURA-11406
2024-02-15 16:01:32 +01:00
Remco Burema
58f8eae80c Fix more unit-tests.
related to internal ticket CURA-11406
2024-02-15 15:45:49 +01:00
Remco Burema
831c72dbe5 Fix unit-tests.
related to internal ticket CURA-11406
2024-02-15 15:03:13 +01:00
alexandr-vladimirov
2b05a370ca Allow to set print sequence manually 2024-01-04 06:30:23 +03:00
Jaime van Kessel
05f1074184
Merge pull request #12473 from Ultimaker/CURA-3Z4_crash_name_missing
Update tests with new required metadata fields
2023-10-04 13:03:16 +02:00
Jelle Spijker
70873ff2df
Fix UT Materials brand is a required property 2023-09-13 11:18:16 +02:00
Jelle Spijker
c6067ef997
Fix UT for unknown properties not defined in fdmprinter
We allow for that behaviour in general, and even use it ourself for plugins

Fixes CURA-11034
2023-09-13 10:20:13 +02:00
Casper Lamboo
f73154a2c5
Use camelCase for python function definition
CURA-10599

Co-authored-by: Jaime van Kessel <nallath@gmail.com>
2023-06-12 14:35:11 +02:00
c.lamboo
da33a26dc4 Fix unit tests
CURA-10599
2023-06-12 13:33:59 +02:00
Joey de l'Arago
f52638ca75 Update extrudermanager in tests to mock Application.
CURA-9793
2022-12-12 14:06:45 +01:00
Remco Burema
ab51bd699e Merge branch 'main' into brim_per_material_optimized_order 2022-10-25 17:31:13 +02:00
Remco Burema
7f4777fdf6 Fix unit-tests.
part of CURA-9769
2022-10-20 11:34:44 +02:00
Ghostkeeper
37a98cbb6f
Mock HttpRequestManager while changing sync state
This change triggers a cascade of updates and in some cases triggers a sync. The sync trigger also triggers an update of the account permissions which crashes because the HttpRequestManager can't be started on a thread. We shouldn't make HTTP requests from our tests anyway so mock this away.

Contributes to issue CURA-9220.
2022-07-27 11:43:31 +02:00
Ghostkeeper
d52be42e01
Mock HttpRequestManager while changing log-in state
Changing the log-in state causes additional requests to be made to get information from the account. Previously this wasn't a problem because the information was only obtained from other classes such as the DigitalLibrary to get information on how many library projects the user can make. But now that there are triggers in the Account class itself, those triggers get triggered. It'd make additional requests to the account server. We don't want the tests to make such requests.

Contributes to issue CURA-9220.
2022-07-27 11:41:50 +02:00
Jaime van Kessel
6a36840793 Use optional assert message instead of print 2022-07-08 10:24:23 +02:00
Jaime van Kessel
1f1ee7ff60 Fix buildvolume tests 2022-07-08 10:19:09 +02:00
Jaime van Kessel
117e9976eb Fix Convex hull decorator tests 2022-07-08 10:02:52 +02:00
Ghostkeeper
afbadd9260
Update tests with new required metadata fields
We're changing the validation function of metadata for containers to require the type and name parameters. That needs to be reflected in the tests.

Contributes to issue CURA-3Z4.
2022-06-08 10:44:37 +02:00
Jelle Spijker
12ee57e4ad
Merge branch 'master' into CURA-8640_PyQt6
# Conflicts:
#	cura/UI/CuraSplashScreen.py
2022-03-28 15:02:18 +02:00
Jaime van Kessel
e925f07aad Remove old arranger code
Major vesion upgrade, time to clean some stuff up!

CURA-7810
2022-03-24 13:37:29 +01:00
Jelle Spijker
3f8907d02a
Merge branch 'master' into CURA-8640_PyQt6
# Conflicts:
#	cura/CuraApplication.py
#	resources/qml/Preferences/Materials/MaterialsSyncDialog.qml
#	resources/qml/Preferences/Materials/MaterialsView.qml
2022-03-24 11:53:44 +01:00
Tim Kuipers
fabaf2026d reduce testing of bed adhesion size 2022-03-18 09:55:02 +01:00
Tim Kuipers
a35a38c684 fix inclusion of brim_gap in TestBuildVolume 2022-03-16 11:31:40 +01:00
Ghostkeeper
c7d7dd11d1
Merge branch 'master' into PyQt6_upgrade
Conflicts:
	cura/PlatformPhysics.py -> Removed shapely on master, while QTimer import got updated to Qt6.
	plugins/Toolbox -> Entire folder is deleted in master, but it was updated to Qt6 here. This can all be removed.
2022-02-21 11:52:28 +01:00
Tim Kuipers
a8f979c204 fix inclusion of brim_gap in TestBuildVolume 2022-02-11 11:48:54 +01:00
j.delarago
372d7b33c8 Add testing for raft_surface_layers
CURA-8915
2022-02-08 11:35:39 +01:00
Ghostkeeper
c761b23e82
Test multiple raft interface layers
Should arrive at the correct raft thickness too then.

Contributes to issue CURA-8915.
2022-02-03 16:13:00 +01:00
Ghostkeeper
f4bcf9d89e
Add more settings for test of build volume limits
These new settings are necessary or the test will get exceptions that these settings don't exist.

Contributes to issue CURA-8868.
2022-01-12 17:55:33 +01:00
Remco Burema
20b435af76
Qt5->Qt6: More renamed stuff.
part of CURA-8591
2021-12-29 11:18:49 +01:00
Remco Burema
abe7c1bf7f
Search/replace Qt5->Qt6.
part of upgrading Qt to v6.2: CURA-8591
2021-12-28 14:46:02 +01:00
Remco Burema
d277109cc8
Fix build-volume (related) tests.
part of CURA-8083
2021-12-15 14:42:17 +01:00
Ghostkeeper
677b64f068
Remove unnecessary import
We're not using this library any more now. Not even in the tests.

Contributes to issue CURA-8539.
2021-11-22 19:08:17 +01:00
Ghostkeeper
608cce491d
Remove tests checking for data in UserProfile
The UserProfile is being stored in the account with a simple assignment, and these are just some property getters with a fallback. I don't think we need to test that.
The actual getting of a user profile (and whether that returns correctly when logged out and such) is already tested as part of the OAuth flow where that code lives.

Contributes to issue CURA-8539.
2021-11-22 18:45:04 +01:00
Ghostkeeper
4b5d698325
Fix assertion of resulting profile via callback
Needs to work differently with the asynchronous workflow.

Contributes to issue CURA-8539.
2021-11-22 15:54:42 +01:00
Ghostkeeper
fbbf1427b3
Fix patching of getUserProfile
The actual profile is not necessary for this test. But this function always returns None and we shouldn't patch it to make it return something else.

Contributes to issue CURA-8539.
2021-11-22 15:52:24 +01:00
Ghostkeeper
c5e22c53cc
Fix checking return values in log-in/log-out flow test
Contributes to issue CURA-8539.
2021-11-22 15:48:29 +01:00
Ghostkeeper
a8a41381cb
Remove test simulating request error in user profile
We're no longer generating that error. We're generating a QNetworkReply with a built-in error code and those errors are handled the same way as the failed requests tested above.

Contributes to issue CURA-8539.
2021-11-22 15:14:05 +01:00
Ghostkeeper
4139350496
Fix test checking for failure of refresh token to reset auth
It was previously mocking some return values that should now get returned via callbacks. And it was previously relying on a web service which might not connect at all.

Contributes to issue CURA-8539.
2021-11-22 15:11:35 +01:00
Ghostkeeper
3236be1c20
Also mock POST command and a failed response
Otherwise it'll end up using actual internet connections anyway. Not what we want.

Contributes to issue CURA-8539.
2021-11-22 14:45:44 +01:00
Ghostkeeper
e8f9e92f02
Simulate an actual expired authentication token
The test should trigger the refresh token to be used to get a new authentication token.

Contributes to issue CURA-8539.
2021-11-22 14:26:15 +01:00
Ghostkeeper
70924f17aa
Mock HttpRequestManager getting the profile with refresh token
I'm not sure the refresh token is actually used though. I might want to try to guarantee that.

Contributes to issue CURA-8539.
2021-11-22 13:44:46 +01:00
Ghostkeeper
3b6ff15d60
Rewrite test to mock HttpRequestManager with authentication failure
That's the expected outcome of the premise of this test.

Contributes to issue CURA-8539.
2021-11-22 13:25:15 +01:00
Ghostkeeper
c8aff57bfe
Actually mock a reply from the auth server
The reply is not really relevant. The reply is mocked through readJSON.
So it turns out that so far, our tests have been making actual requests to the authentication server, and depended on it being online. Not good. Mock those external dependencies!

Contributes to issue CURA-8539.
2021-11-22 12:11:45 +01:00
Ghostkeeper
f0cbdeb903
Use docstring format for this documentation
Contributes to issue CURA-8539.
2021-11-22 10:50:06 +01:00
Ghostkeeper
9dd251975d
Test for result of callback with a callable
In this case the callback should get called immediately (no wait) so it is safe to test for this callback, albeit slightly implementation-defined.

Contributes to issue CURA-8539.
2021-11-22 10:48:45 +01:00
Ghostkeeper
a399bacab3
Patch CuraApplication away while running tests for output devices
It needs CuraApplication because it wants to set metadata on the printer. But this is not relevant for the tests.

Contributes to issue CURA-8609.
2021-10-13 10:34:59 +02:00
Jaime van Kessel
5ea0d927ca Fix typo in file name
CURA-8544
2021-09-08 09:39:38 +02:00
luz paz
9b203c834a Fix source typos 2021-09-07 11:34:22 -04:00
luz paz
d68f375e38 Fix various typos
Found via `codespell -q 3 -S *.po,*.pot -L childs,initialy,lod,ned,te,slicable,sur,tutoriels,wont`
2021-09-07 11:33:54 -04:00
Ghostkeeper
751732076d
Add test to see if all deprecated theme icons still exist
This will make it easier in the future if we deprecate icons again. And it's nice for now.

Contributes to issue CURA-8520.
2021-08-31 12:00:59 +02:00