574 Commits

Author SHA1 Message Date
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
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
Konstantinos Karmas
3be4b1a441 Fix failing test
CURA-8441
2021-08-09 12:42:11 +02:00
Jaime van Kessel
2d396a81c5
Remove unneeded pycapsule imports 2021-05-10 16:53:16 +02:00
Jaime van Kessel
95652556fe
Merge branch 'fix_group_rename' of https://github.com/fieldOfView/Cura 2021-04-28 17:07:33 +02:00
Gabriel Féron
e26cf6f810 Fix test_wrongServerResponses 2021-04-26 11:07:11 +02:00
fieldOfView
1d5503722f Fix ObjectsModel test to allow non-autogenerated group-name 2021-04-20 10:10:58 +02:00
Ghostkeeper
fde9449358
Add test to ensure that no definitions define new settings
See the documentation of the test.
2021-03-08 16:53:48 +01:00
Jaime van Kessel
cd76326fed
Fix tests
CURA-7835
2020-12-18 11:52:53 +01:00
Kostas Karmas
67c6d6da08 Fix assertion
CURA-7833
2020-11-10 16:54:53 +01:00
Kostas Karmas
644c3443b1 Add tests for correctPrintSequence
CURA-7833
2020-11-10 16:47:16 +01:00
Remco Burema
9afbc64934
Merge branch '4.8' 2020-11-10 11:31:53 +01:00
Kostas Karmas
69e0e1c4e5 Remove outdated tests
CURA-7827
2020-11-09 17:50:45 +01:00
Kostas Karmas
1719394049 Patch the updateNumberExtrudersEnabled temporarily
CURA-7827
2020-11-06 09:38:15 +01:00
Kostas Karmas
bd5ed7a3ac Add tests for _correctPrintSequence
CURA-7827
2020-11-06 09:21:55 +01:00
Kostas Karmas
c1becbe43c Fix failing tests in TestMachineManager
When the machine manager calls the _onGlobalContainerChanged(), it calls updateNumberExtruders
Enabled, which triggers the signal numberExtrudersEnabledChanged. This, in turn, triggers the need
to check the MachineManager's pyqtProperty numberExtrudersEnabled. Now, since this property has no
setter, it cannot be patched. Instead, to work properly, patch the updateNumberExtrudersEnabled.

CURA-7827
2020-11-06 09:19:21 +01:00
Kostas Karmas
f0348104f8 Skip running the tests for the old arrange algorithm
So that the output of the CI/CD testing step is not cluttered with deprecation warnings.

Done during TTT
2020-10-30 14:11:00 +01:00
Ghostkeeper
6abfa38838
More fixes for PyCapsule_GetPointer race condition
One of the weirdest errors out there, and as far as I know we're the only ones suffering from it, due to having multiple packages of Python bindings created with Sip as well as having PyQt and different threads.
2020-10-16 14:26:27 +02:00
Ghostkeeper
26cb661240
Fix PyCapsule_GetPointer error when running tests
This obscure error happens when a module with Sip bindings is being imported after PyQt. Due to a clash with the Sip versions or something, it then fails on the custom module. Import all of our custom modules with Sip bindings first.
2020-10-16 14:18:17 +02:00
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