From 1bbe86ef16d29985e10f1df1aacb4f27edfe74ea Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Tue, 27 Sep 2016 11:39:23 +0200 Subject: [PATCH] Fixing userProfile e2e tests --- .../user-profile/user-profile-votes.e2e.js | 36 +++++++++++++++--- .../user-profile/user-profile-watched.e2e.js | 37 ++++++++++++++++--- 2 files changed, 61 insertions(+), 12 deletions(-) diff --git a/e2e/suites/user-profile/user-profile-votes.e2e.js b/e2e/suites/user-profile/user-profile-votes.e2e.js index 44ede43d..f1402e8b 100644 --- a/e2e/suites/user-profile/user-profile-votes.e2e.js +++ b/e2e/suites/user-profile/user-profile-votes.e2e.js @@ -40,7 +40,7 @@ describe('user profile - votes', function() { expect(hasMoreItems).to.be.equal(true); }); - it('votes tab - filter user stories', async function() { + it('votes tab - filter epics', async function() { let allItems = await $('div[infinite-scroll]').getInnerHtml(); await $$('div.filters > a').get(1).click(); @@ -52,7 +52,7 @@ describe('user profile - votes', function() { expect(allItems).to.be.not.equal(filteredItems); }); - it('votes tab - filter tasks', async function() { + it('votes tab - filter user stories', async function() { let allItems = await $('div[infinite-scroll]').getInnerHtml(); await $$('div.filters > a').get(2).click(); @@ -64,7 +64,7 @@ describe('user profile - votes', function() { expect(allItems).to.be.not.equal(filteredItems); }); - it('votes tab - filter issues', async function() { + it('votes tab - filter tasks', async function() { let allItems = await $('div[infinite-scroll]').getInnerHtml(); await $$('div.filters > a').get(3).click(); @@ -76,6 +76,18 @@ describe('user profile - votes', function() { expect(allItems).to.be.not.equal(filteredItems); }); + it('votes tab - filter issues', async function() { + let allItems = await $('div[infinite-scroll]').getInnerHtml(); + + await $$('div.filters > a').get(4).click(); + + await browser.waitForAngular(); + + let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); + + expect(allItems).to.be.not.equal(filteredItems); + }); + it('votes tab - filter by query', async function() { let allItems = await $$('div[infinite-scroll] > div').count(); @@ -130,7 +142,7 @@ describe('user profile - votes', function() { expect(hasMoreItems).to.be.equal(true); }); - it('votes tab - filter user stories', async function() { + it('votes tab - filter epics', async function() { let allItems = await $('div[infinite-scroll]').getInnerHtml(); await $$('div.filters > a').get(1).click(); @@ -142,7 +154,7 @@ describe('user profile - votes', function() { expect(allItems).to.be.not.equal(filteredItems); }); - it('votes tab - filter tasks', async function() { + it('votes tab - filter user stories', async function() { let allItems = await $('div[infinite-scroll]').getInnerHtml(); await $$('div.filters > a').get(2).click(); @@ -154,7 +166,7 @@ describe('user profile - votes', function() { expect(allItems).to.be.not.equal(filteredItems); }); - it('votes tab - filter issues', async function() { + it('votes tab - filter tasks', async function() { let allItems = await $('div[infinite-scroll]').getInnerHtml(); await $$('div.filters > a').get(3).click(); @@ -166,6 +178,18 @@ describe('user profile - votes', function() { expect(allItems).to.be.not.equal(filteredItems); }); + it('votes tab - filter issues', async function() { + let allItems = await $('div[infinite-scroll]').getInnerHtml(); + + await $$('div.filters > a').get(4).click(); + + await browser.waitForAngular(); + + let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); + + expect(allItems).to.be.not.equal(filteredItems); + }); + it('votes tab - filter by query', async function() { let allItems = await $$('div[infinite-scroll] > div').count(); diff --git a/e2e/suites/user-profile/user-profile-watched.e2e.js b/e2e/suites/user-profile/user-profile-watched.e2e.js index 2b33b45a..df85a428 100644 --- a/e2e/suites/user-profile/user-profile-watched.e2e.js +++ b/e2e/suites/user-profile/user-profile-watched.e2e.js @@ -53,7 +53,8 @@ describe('user profile - watched', function() { expect(allItems).to.be.not.equal(filteredItems); }); - it('watched tab - filter user stories', async function() { + + it('watched tab - filter epics', async function() { let allItems = await $('div[infinite-scroll]').getInnerHtml(); await $$('div.filters > a').get(2).click(); @@ -65,7 +66,7 @@ describe('user profile - watched', function() { expect(allItems).to.be.not.equal(filteredItems); }); - it('watched tab - filter tasks', async function() { + it('watched tab - filter user stories', async function() { let allItems = await $('div[infinite-scroll]').getInnerHtml(); await $$('div.filters > a').get(3).click(); @@ -77,7 +78,7 @@ describe('user profile - watched', function() { expect(allItems).to.be.not.equal(filteredItems); }); - it('watched tab - filter issues', async function() { + it('watched tab - filter tasks', async function() { let allItems = await $('div[infinite-scroll]').getInnerHtml(); await $$('div.filters > a').get(4).click(); @@ -89,6 +90,18 @@ describe('user profile - watched', function() { expect(allItems).to.be.not.equal(filteredItems); }); + it('watched tab - filter issues', async function() { + let allItems = await $('div[infinite-scroll]').getInnerHtml(); + + await $$('div.filters > a').get(5).click(); + + await browser.waitForAngular(); + + let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); + + expect(allItems).to.be.not.equal(filteredItems); + }); + it('watched tab - filter by query', async function() { let allItems = await $$('div[infinite-scroll] > div').count(); @@ -155,7 +168,7 @@ describe('user profile - watched', function() { expect(allItems).to.be.not.equal(filteredItems); }); - it('watched tab - filter user stories', async function() { + it('watched tab - filter epics', async function() { let allItems = await $('div[infinite-scroll]').getInnerHtml(); await $$('div.filters > a').get(2).click(); @@ -167,7 +180,7 @@ describe('user profile - watched', function() { expect(allItems).to.be.not.equal(filteredItems); }); - it('watched tab - filter tasks', async function() { + it('watched tab - filter user stories', async function() { let allItems = await $('div[infinite-scroll]').getInnerHtml(); await $$('div.filters > a').get(3).click(); @@ -179,7 +192,7 @@ describe('user profile - watched', function() { expect(allItems).to.be.not.equal(filteredItems); }); - it('watched tab - filter issues', async function() { + it('watched tab - filter tasks', async function() { let allItems = await $('div[infinite-scroll]').getInnerHtml(); await $$('div.filters > a').get(4).click(); @@ -191,6 +204,18 @@ describe('user profile - watched', function() { expect(allItems).to.be.not.equal(filteredItems); }); + it('watched tab - filter issues', async function() { + let allItems = await $('div[infinite-scroll]').getInnerHtml(); + + await $$('div.filters > a').get(5).click(); + + await browser.waitForAngular(); + + let filteredItems = await $('div[infinite-scroll]').getInnerHtml(); + + expect(allItems).to.be.not.equal(filteredItems); + }); + it('watched tab - filter by query', async function() { let allItems = await $$('div[infinite-scroll] > div').count();