Is it impossible to do what I want, or am I thinking of the wrong word

Yametazamwa mara 13
Ruka hadi kwenye ujumbe wa kwanza ambao haujasomwa

hitmanb...@gmail.com

hayajasomwa,
28 Apr 2017, 14:43:5228/04/2017
kwa scalatest-users
I am working with scala-js, and I am trying to write a WordSpec test for the very first thing that runs, setting up the ui. Currently I have

  "An HTML Document" when {
   
"setupUI() is called" should {
     
"contain a style element" in {
       
assert(jQuery("style").length >= 1)
     
}
   
}
 
}

This is great, however, I also want to make sure that said style element has its "id" field set properly. What I would think to do is
"An HTML Document" when {
   
"setupUI() is called" should {
     
"contain a style element" in {
       
assert(jQuery("style").length >= 1)
     
}
      which should
"have its id set" in {
       
assert(!jQuery("style")(0).id.isEmpty())
     
}
   
}
 
}

The problem is that there is no "which" keyword.  
What is the proper way to do something like this? It almost seems like I should have another when>should>in block for the style element, but that seems redundant.
Jibu wote
Mjibu mchapishaji
Sambaza
Ujumbe 0 mpya