Looks like the PWM works fine on NRF52840_DK target, but this target has hardware limitation and the max PWM period is 32 767 us.
That is why test cases when the period is set 50 ms are failing.
The test will be modified to test the 30 ms period instead of 50 ms, so the test can pass on all CI targets.