last day (16 days later) » 

11:47 AM
1
A: Jasmine unit testing, how do I trigger the click event of ngx-modal-dialog

ErbsenkoenigThere is a problem, with testing this modal dialog, if the viewRef passed into the modalService is the actual component under test itself. This is because the modal dialog gets added into the dom outside the viewRef. So you could only access the elements inside the test using document.getElementB...

 
thank you so much for the effort and help. Though, it disturbed the UI of the component, I got it working the solution for testing part. Thanks alot.
 
Using the viewref from a div inside the component? You wouldn't need to wrap that div around the button, it could be a div anywhere inside your component if that helps with your UI. The only important thing is to not use the injected viewRef inside the constructor. You're welcome.
 
Its not helping yet.Tried to give #parentDialog on an existing div above button but Ui is still getting distorted :(.
 
Do you think you could recreate that in a stackblitz? Maybe fork this one here and share the url (that's the one I used to have a look at the dialog itself before doing the testing bit): stackblitz.com/edit/angular-xawnbl
Another way could be to add it to a new div with a position absolute which is placed outside the view or has visibility: hidden or something like that. But this is just guessing into the blue without seeing the actual problem
 
Tried to produce it with stackblitz but, its a bit big component and the classes too are coming from bootstrap.css. Unable to produce the actual ui
ok i'll try that
And BTW the Ui that is getting distorted is for modal popup that is the modal popup's z-index is mixing up with background elements after the popup opens.
how can we switch to chats @Erbsenkoenig
 
11:47 AM
Hello. I haven't used a chat before. Hope this works^^
Could you show me a picture of how the UI looks like and your template?
 
12:10 PM
Hi
How do i upload the image i dont see any attachment option anywhere
 
I have a upload button right next to the send button down here where the text input is, you too?
 
1:21 PM
i dont i just read somewhere for uploading images you need min 100 reputations
 
1:35 PM
oh what.
ok. that's a pity
umn you could add bootstrap though to the stackblitz
could you just share your template with me? like a snippet so i can see the structure?
i'll try to get this reproduced in the stackblitz
 

  last day (16 days later) »