Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QUnit.test("test create image funtion suite", function(assert) {
- var PATH_NAME = "/portaldest/destination/JAM/api/v1/OData/thumbnailUrl/path"
- var myHeaderButton = document.createElement('button');
- var jamProfileImage = document.createElement('img');
- var stubGetElementById = sinon.stub(document, 'getElementById');
- stubGetElementById.withArgs('meAreaHeaderButton').returns(myHeaderButton);
- stubGetElementById.withArgs('jamProfileImage').returns(jamProfileImage);
- notificationControl.thumnailImageUrl = "thumbnailUrl/path";
- notificationControl.createImageTag();
- //NOTE : IE does not support the URL API
- let jamPathName = new URL(jamProfileImage.src).pathname;
- assert.equal(jamPathName, PATH_NAME);
- stubGetElementById.restore();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement