@@ -4,7 +4,6 @@ import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/t
44import { By } from '@angular/platform-browser' ;
55
66import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap' ;
7- import { cold } from 'jasmine-marbles' ;
87import { TranslateLoader , TranslateModule } from '@ngx-translate/core' ;
98import { Store } from '@ngrx/store' ;
109import { of } from 'rxjs' ;
@@ -155,13 +154,13 @@ describe('ContextMenuComponent', () => {
155154 done ( ) ;
156155 } ) ;
157156
158- it ( 'should display d-none' , ( done ) => {
157+ it ( 'should use d-none' , ( done ) => {
159158 const menu = fixture . debugElement . query ( By . css ( 'div.d-none' ) ) ;
160159 expect ( menu ) . not . toBeNull ( ) ;
161160 done ( ) ;
162161 } ) ;
163162
164- it ( 'should not display d-inline-block' , ( done ) => {
163+ it ( 'should not use d-inline-block' , ( done ) => {
165164 const menu = fixture . debugElement . query ( By . css ( 'div.d-inline-block' ) ) ;
166165 expect ( menu ) . toBeNull ( ) ;
167166 done ( ) ;
@@ -173,11 +172,6 @@ describe('ContextMenuComponent', () => {
173172 done ( ) ;
174173 } ) ;
175174
176- it ( 'should check the authorization of the current user' , ( done ) => {
177- expect ( component . isAuthenticated ) . toBeObservable ( cold ( 'a' , { a : true } ) ) ;
178- done ( ) ;
179- } ) ;
180-
181175 it ( 'should not have menu entries when are disabled on rest side' , ( done ) => {
182176 component . contextMenuObjectType = DSpaceObjectType . COMMUNITY ;
183177 configurationDataService . findByPropertyName . and . returnValues (
@@ -218,34 +212,29 @@ describe('ContextMenuComponent', () => {
218212 done ( ) ;
219213 } ) ;
220214
221- it ( 'should not display context menu' , ( done ) => {
215+ it ( 'should display context menu' , ( done ) => {
222216 const menu = fixture . debugElement . query ( By . css ( 'button#context-menu' ) ) ;
223217 expect ( menu ) . not . toBeNull ( ) ;
224218 done ( ) ;
225219 } ) ;
226220
227- it ( 'should display d-none' , ( done ) => {
221+ it ( 'should use d-none' , ( done ) => {
228222 const menu = fixture . debugElement . query ( By . css ( 'div.d-none' ) ) ;
229223 expect ( menu ) . not . toBeNull ( ) ;
230224 done ( ) ;
231225 } ) ;
232226
233- it ( 'should not display d-inline-block' , ( done ) => {
227+ it ( 'should not use d-inline-block' , ( done ) => {
234228 const menu = fixture . debugElement . query ( By . css ( 'div.d-inline-block' ) ) ;
235229 expect ( menu ) . toBeNull ( ) ;
236230 done ( ) ;
237231 } ) ;
238232
239- it ( 'should not display stand alone buttons' , ( done ) => {
233+ it ( 'should display stand alone buttons' , ( done ) => {
240234 const menu = fixture . debugElement . query ( By . css ( 'button.btn-primary' ) ) ;
241235 expect ( menu ) . not . toBeNull ( ) ;
242236 done ( ) ;
243237 } ) ;
244-
245- it ( 'should check the authorization of the current user' , ( done ) => {
246- expect ( component . isAuthenticated ) . toBeObservable ( cold ( 'a' , { a : false } ) ) ;
247- done ( ) ;
248- } ) ;
249238 } ) ;
250239
251240 describe ( 'and the object type is not ITEM' , ( ) => {
@@ -259,9 +248,9 @@ describe('ContextMenuComponent', () => {
259248 done ( ) ;
260249 } ) ;
261250
262- it ( 'should not display context menu' , ( done ) => {
251+ it ( 'should display context menu' , ( done ) => {
263252 const menu = fixture . debugElement . query ( By . css ( 'button#context-menu' ) ) ;
264- expect ( menu ) . toBeNull ( ) ;
253+ expect ( menu ) . not . toBeNull ( ) ;
265254 done ( ) ;
266255 } ) ;
267256
@@ -271,14 +260,9 @@ describe('ContextMenuComponent', () => {
271260 done ( ) ;
272261 } ) ;
273262
274- it ( 'should not display d-none' , ( done ) => {
263+ it ( 'should display d-none' , ( done ) => {
275264 const menu = fixture . debugElement . query ( By . css ( 'div.d-none' ) ) ;
276- expect ( menu ) . toBeNull ( ) ;
277- done ( ) ;
278- } ) ;
279-
280- it ( 'should check the authorization of the current user' , ( done ) => {
281- expect ( component . isAuthenticated ) . toBeObservable ( cold ( 'a' , { a : false } ) ) ;
265+ expect ( menu ) . not . toBeNull ( ) ;
282266 done ( ) ;
283267 } ) ;
284268 } ) ;
0 commit comments