Removed getOuterHTML and getInnerHTML and replaced with getAttribute

stable
Jesús Espino 2017-02-23 10:20:39 +01:00
parent 3779c6f569
commit 95cc401208
7 changed files with 55 additions and 55 deletions

View File

@ -38,7 +38,7 @@ helper.description = function(){
}, },
getInnerHtml: async function(text){ getInnerHtml: async function(text){
let html = await el.$(".wysiwyg.editable").getInnerHtml(); let html = await el.$(".wysiwyg.editable").getAttribute("innerHTML");
return html; return html;
}, },
@ -109,7 +109,7 @@ helper.statusSelector = function() {
return this.getSelectedStatus(); return this.getSelectedStatus();
}, },
getSelectedStatus: async function(){ getSelectedStatus: async function(){
return el.$$('.detail-status-inner .e2e-status').first().getInnerHtml(); return el.$$('.detail-status-inner .e2e-status').first().getAttribute("innerHTML");
} }
}; };

View File

@ -82,7 +82,7 @@ helper.editor = function(){
}, },
getInnerHtml: async function(text){ getInnerHtml: async function(text){
let wikiText = await el.$(".view-wiki-content .wysiwyg").getInnerHtml(); let wikiText = await el.$(".view-wiki-content .wysiwyg").getAttribute("innerHTML");
return wikiText; return wikiText;
}, },

View File

@ -153,7 +153,7 @@ shared.wysiwygTestingComments = function(parentSelector, section) {
htmlMode(); htmlMode();
let html = await editor.getInnerHtml(); let html = await editor.getAttribute("innerHTML");
expect(html).to.be.eql('<p><em>test2</em></p>\n'); expect(html).to.be.eql('<p><em>test2</em></p>\n');
@ -229,7 +229,7 @@ shared.wysiwygTestingComments = function(parentSelector, section) {
$$('.medium-mention li').get(2).click(); $$('.medium-mention li').get(2).click();
let html = await editor.getInnerHtml(); let html = await editor.getAttribute("innerHTML");
expect(html).to.be.eql('<p><a href="/profile/user8">@user8</a>&nbsp;</p>'); expect(html).to.be.eql('<p><a href="/profile/user8">@user8</a>&nbsp;</p>');
@ -251,7 +251,7 @@ shared.wysiwygTestingComments = function(parentSelector, section) {
$$('.medium-mention li').get(2).click(); $$('.medium-mention li').get(2).click();
let html = await editor.getInnerHtml(); let html = await editor.getAttribute("innerHTML");
expect(html).to.include('1f604.png'); expect(html).to.include('1f604.png');
@ -267,13 +267,13 @@ shared.wysiwygTestingComments = function(parentSelector, section) {
}); });
it('cancel', async () => { it('cancel', async () => {
let prevHtml = await editor.getInnerHtml(); let prevHtml = await editor.getAttribute("innerHTML");
await edit(editor, editorWrapper, 'xxx yyy zzz'); await edit(editor, editorWrapper, 'xxx yyy zzz');
await cancelEdition(editorWrapper); await cancelEdition(editorWrapper);
let html = await editor.getInnerHtml(); let html = await editor.getAttribute("innerHTML");
expect(html).to.be.equal(prevHtml); expect(html).to.be.equal(prevHtml);
}); });
@ -362,7 +362,7 @@ shared.wysiwygTesting = function(parentSelector) {
resetSelection(); resetSelection();
let html = await editor.getInnerHtml(); let html = await editor.getAttribute("innerHTML");
expect(html).to.be.eql('<p><b>test</b></p>'); expect(html).to.be.eql('<p><b>test</b></p>');
@ -388,7 +388,7 @@ shared.wysiwygTesting = function(parentSelector) {
htmlMode(); htmlMode();
let html = await editor.getInnerHtml(); let html = await editor.getAttribute("innerHTML");
expect(html).to.be.eql('<p><em>test2</em></p>\n'); expect(html).to.be.eql('<p><em>test2</em></p>\n');
}); });
@ -455,7 +455,7 @@ shared.wysiwygTesting = function(parentSelector) {
$$('.medium-mention li').get(2).click(); $$('.medium-mention li').get(2).click();
let html = await editor.getInnerHtml(); let html = await editor.getAttribute("innerHTML");
expect(html).to.be.eql('<p><a href="/profile/user8">@user8</a>&nbsp;</p>'); expect(html).to.be.eql('<p><a href="/profile/user8">@user8</a>&nbsp;</p>');
@ -475,7 +475,7 @@ shared.wysiwygTesting = function(parentSelector) {
$$('.medium-mention li').get(2).click(); $$('.medium-mention li').get(2).click();
let html = await editor.getInnerHtml(); let html = await editor.getAttribute("innerHTML");
expect(html).to.include('1f604.png'); expect(html).to.include('1f604.png');
@ -487,13 +487,13 @@ shared.wysiwygTesting = function(parentSelector) {
}); });
it('cancel', async () => { it('cancel', async () => {
let prevHtml = await editor.getInnerHtml(); let prevHtml = await editor.getAttribute("innerHTML");
await edit(editor, editorWrapper, 'xxx yyy zzz'); await edit(editor, editorWrapper, 'xxx yyy zzz');
await cancelEdition(editorWrapper); await cancelEdition(editorWrapper);
let html = await editor.getInnerHtml(); let html = await editor.getAttribute("innerHTML");
expect(html).to.be.equal(prevHtml); expect(html).to.be.equal(prevHtml);
}); });

View File

@ -60,7 +60,7 @@ describe('home', function() {
}); });
it('projects menu has the new order', async function() { it('projects menu has the new order', async function() {
var firstElementText = await $$('div[tg-dropdown-project-list] ul a span').first().getInnerHtml(); var firstElementText = await $$('div[tg-dropdown-project-list] ul a span').first().getAttribute("innerHTML");
expect(firstElementText).to.be.equal(draggedElementText); expect(firstElementText).to.be.equal(draggedElementText);
}); });

View File

@ -41,49 +41,49 @@ describe('user profile - votes', function() {
}); });
it('votes tab - filter epics', async function() { it('votes tab - filter epics', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(1).click(); await $$('div.filters > a').get(1).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
it('votes tab - filter user stories', async function() { it('votes tab - filter user stories', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(2).click(); await $$('div.filters > a').get(2).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
it('votes tab - filter tasks', async function() { it('votes tab - filter tasks', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(3).click(); await $$('div.filters > a').get(3).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
it('votes tab - filter issues', async function() { it('votes tab - filter issues', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(4).click(); await $$('div.filters > a').get(4).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
@ -143,49 +143,49 @@ describe('user profile - votes', function() {
}); });
it('votes tab - filter epics', async function() { it('votes tab - filter epics', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(1).click(); await $$('div.filters > a').get(1).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
it('votes tab - filter user stories', async function() { it('votes tab - filter user stories', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(2).click(); await $$('div.filters > a').get(2).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
it('votes tab - filter tasks', async function() { it('votes tab - filter tasks', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(3).click(); await $$('div.filters > a').get(3).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
it('votes tab - filter issues', async function() { it('votes tab - filter issues', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(4).click(); await $$('div.filters > a').get(4).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });

View File

@ -42,62 +42,62 @@ describe('user profile - watched', function() {
}); });
it('watched tab - filter projects', async function() { it('watched tab - filter projects', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(1).click(); await $$('div.filters > a').get(1).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
it('watched tab - filter epics', async function() { it('watched tab - filter epics', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(2).click(); await $$('div.filters > a').get(2).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
it('watched tab - filter user stories', async function() { it('watched tab - filter user stories', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(3).click(); await $$('div.filters > a').get(3).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
it('watched tab - filter tasks', async function() { it('watched tab - filter tasks', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(4).click(); await $$('div.filters > a').get(4).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
it('watched tab - filter issues', async function() { it('watched tab - filter issues', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(5).click(); await $$('div.filters > a').get(5).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
@ -157,61 +157,61 @@ describe('user profile - watched', function() {
}); });
it('watched tab - filter projects', async function() { it('watched tab - filter projects', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(1).click(); await $$('div.filters > a').get(1).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
it('watched tab - filter epics', async function() { it('watched tab - filter epics', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(2).click(); await $$('div.filters > a').get(2).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
it('watched tab - filter user stories', async function() { it('watched tab - filter user stories', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(3).click(); await $$('div.filters > a').get(3).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
it('watched tab - filter tasks', async function() { it('watched tab - filter tasks', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(4).click(); await $$('div.filters > a').get(4).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });
it('watched tab - filter issues', async function() { it('watched tab - filter issues', async function() {
let allItems = await $('div[infinite-scroll]').getInnerHtml(); let allItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
await $$('div.filters > a').get(5).click(); await $$('div.filters > a').get(5).click();
await browser.waitForAngular(); await browser.waitForAngular();
let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); let filteredItems = await $('div[infinite-scroll]').getAttribute("innerHTML");
expect(allItems).to.be.not.equal(filteredItems); expect(allItems).to.be.not.equal(filteredItems);
}); });

View File

@ -328,11 +328,11 @@ common.outerHtmlChanges = async function(el='body') {
el = $(el); el = $(el);
} }
let html = await el.getOuterHtml(); let html = await el.getAttribute('outerHTML');
return function() { return function() {
return browser.wait(async function() { return browser.wait(async function() {
let newhtml = await el.getOuterHtml(); let newhtml = await el.getAttribute('outerHTML');
return html !== newhtml; return html !== newhtml;
}, 5000).then(function() { }, 5000).then(function() {
@ -346,11 +346,11 @@ common.innerHtmlChanges = async function(el='body') {
el = $(el); el = $(el);
} }
let html = await el.getInnerHtml(); let html = await el.getAttribute('innerHTML');
return function() { return function() {
return browser.wait(async function() { return browser.wait(async function() {
let newhtml = await el.getOuterHtml(); let newhtml = await el.getAttribute('outerHTML');
return html !== newhtml; return html !== newhtml;
}, 5000).then(function() { }, 5000).then(function() {