yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #84151
[Bug 1894127] Re: SPEC HAS NO EXPECTATIONS warnings in jasmine tests
Reviewed: https://review.opendev.org/753432
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=533892f080ebdf29173d11db4d12f92809d39b36
Submitter: Zuul
Branch: master
commit 533892f080ebdf29173d11db4d12f92809d39b36
Author: Tatiana Ovchinnikova <t.v.ovtchinnikova@xxxxxxxxx>
Date: Tue Sep 22 14:11:12 2020 -0500
Make text download and load groups tests work
Currently "then" callback functions for these tests aren't called since
digest cycles were never triggered. Jasmine Spec Runner marks them 'passed'
only adding "SPEC HAS NO EXPECTATIONS" into their names.
This patch triggers a digest by calling a scope's $apply functions in a
correct place, deals with timeout properly and makes the tests work.
Closes-Bug: #1894127
Change-Id: I00acc4b13fa0cc05b8c6ccd2024084527562f001
** Changed in: horizon
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1894127
Title:
SPEC HAS NO EXPECTATIONS warnings in jasmine tests
Status in OpenStack Dashboard (Horizon):
Fix Released
Bug description:
There are 23 tests which Jasmine marks with the warning "SPEC HAS NO
EXPECTATIONS":
permissions service
checkAll
with extended permissions
SPEC HAS NO EXPECTATIONS with promise array, adds checks for permissions
SPEC HAS NO EXPECTATIONS with promise, adds checks for permissions
SPEC HAS NO EXPECTATIONS with no promise, adds checks for permissions
SPEC HAS NO EXPECTATIONS without extended permissions it returns no promises
...
textDownloadService
SPEC HAS NO EXPECTATIONS should return promise and it resolve filename after starting download file
...
horizon.framework.util.filters
simpleDate
SPEC HAS NO EXPECTATIONS returns blank if nothing
SPEC HAS NO EXPECTATIONS returns the expected time
mediumDate
SPEC HAS NO EXPECTATIONS returns blank if nothing
SPEC HAS NO EXPECTATIONS returns the expected time
...
horizon.framework.util.navigations.service
setBreadcrumb
SPEC HAS NO EXPECTATIONS sets breadcrumb items from specified array
...
Launch Instance Model
launchInstanceModel Factory
Post Initialize Model
SPEC HAS NO EXPECTATIONS getPorts at launch should not return child port
...
horizon.dashboard.identity.domains.actions.delete.service
perform method and pass only
SPEC HAS NO EXPECTATIONS should open the delete modal
SPEC HAS NO EXPECTATIONS should pass and fail in a function that delete domain by item action
SPEC HAS NO EXPECTATIONS should pass and fail in a function that delete domain by batch action
...
horizon.dashboard.identity.groups.actions.delete.service
perform method and pass only
SPEC HAS NO EXPECTATIONS should open the delete modal
SPEC HAS NO EXPECTATIONS should pass and fail in a function that delete group by item action
SPEC HAS NO EXPECTATIONS should pass and fail in a function that delete group by batch action
...
horizon.dashboard.identity.groups
SPEC HAS NO EXPECTATIONS should load groups
...
horizon.dashboard.identity.users.actions.delete.service
perform method and pass only
SPEC HAS NO EXPECTATIONS should open the delete modal
SPEC HAS NO EXPECTATIONS should pass and fail in a function that delete user by item action
SPEC HAS NO EXPECTATIONS should pass and fail in a function that delete user by batch action
...
horizon.framework.util.timezones.service
get timezone offset
SPEC HAS NO EXPECTATIONS returns +0000(UTC offset) if nothing
SPEC HAS NO EXPECTATIONS returns the timezone offset
That means in general that these tests are doing nothing since they are for the async callback functions and it's crucial to expect outputs after resolving promises.
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1894127/+subscriptions
References