fix some e2e tests at IE
parent
f17c8bc7d4
commit
22f8b16b87
|
@ -91,7 +91,7 @@ LoadingDirective = ($loading) ->
|
|||
currentLoading = $loading()
|
||||
.target($el)
|
||||
.start()
|
||||
else
|
||||
else if currentLoading
|
||||
currentLoading.finish()
|
||||
|
||||
return {
|
||||
|
|
|
@ -67,12 +67,13 @@ class SearchController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
@scope.searchTerm = ""
|
||||
loadSearchData = debounceLeading(100, (t) => @.loadSearchData(t))
|
||||
|
||||
@scope.$watch "searchTerm", (term) =>
|
||||
if term
|
||||
@scope.loading = true
|
||||
bindOnce @scope, "projectId", (projectId) =>
|
||||
if !@scope.searchResults
|
||||
@.loadSearchData()
|
||||
|
||||
@.loadSearchData(term).then () =>
|
||||
@scope.loading = false
|
||||
@scope.$watch "searchTerm", (term) =>
|
||||
if term != undefined && @scope.projectId
|
||||
@.loadSearchData(term)
|
||||
|
||||
loadFilters: ->
|
||||
defered = @q.defer()
|
||||
|
@ -90,9 +91,13 @@ class SearchController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
@scope.usStatusById = groupBy(project.us_statuses, (x) -> x.id)
|
||||
return project
|
||||
|
||||
loadSearchData: (term) ->
|
||||
loadSearchData: (term = "") ->
|
||||
@scope.loading = true
|
||||
|
||||
promise = @rs.search.do(@scope.projectId, term).then (data) =>
|
||||
@scope.searchResults = data
|
||||
@scope.loading = false
|
||||
|
||||
return data
|
||||
|
||||
return promise
|
||||
|
@ -244,7 +249,7 @@ SearchDirective = ($log, $compile, $templatecache, $routeparams, $location) ->
|
|||
markSectionTabActive(activeSection)
|
||||
|
||||
$scope.$watch "searchTerm", (searchTerm) ->
|
||||
$location.search("text", searchTerm) if searchTerm
|
||||
$location.search("text", searchTerm) if searchTerm != undefined
|
||||
|
||||
$el.on "click", ".search-filter li > a", (event) ->
|
||||
event.preventDefault()
|
||||
|
|
|
@ -5,4 +5,10 @@
|
|||
float: right;
|
||||
}
|
||||
}
|
||||
.check {
|
||||
input { // IE needs smaller size
|
||||
height: 40px;
|
||||
width: 85px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,10 @@
|
|||
padding-bottom: 2rem;
|
||||
.check {
|
||||
margin-left: .5rem;
|
||||
input { // IE needs smaller size
|
||||
height: 40px;
|
||||
width: 85px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,4 +58,10 @@
|
|||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
.check {
|
||||
input { // IE needs smaller size
|
||||
height: 40px;
|
||||
width: 85px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,11 +6,11 @@ var utils = require('./e2e/utils');
|
|||
var HtmlReporter = require('protractor-html-screenshot-reporter');
|
||||
|
||||
exports.config = {
|
||||
seleniumAddress: 'http://localhost:4444/wd/hub',
|
||||
seleniumAddress: 'http://10.8.1.194:4444/wd/hub',
|
||||
framework: 'mocha',
|
||||
params: {
|
||||
glob: {
|
||||
host: 'http://localhost:9001/',
|
||||
host: 'http://10.8.1.153:9001/',
|
||||
attachments: {
|
||||
unix: './upload-file-test.txt',
|
||||
windows: 'C:\\test\\upload-file-test.txt',
|
||||
|
|
|
@ -52,8 +52,6 @@ describe('admin - webhooks', function() {
|
|||
|
||||
await adminIntegrationsHelper.saveWebHook('111', 'http://web2.fake', '333');
|
||||
|
||||
await browser.sleep(4000);
|
||||
|
||||
let webHookMode = await adminIntegrationsHelper.getWebHookMode();
|
||||
|
||||
expect(webHookMode).to.be.equal('read');
|
||||
|
|
|
@ -96,6 +96,7 @@ describe('admin - members', function() {
|
|||
|
||||
//prevent change to the same value
|
||||
adminMembershipsHelper.setRole(member, 1);
|
||||
adminMembershipsHelper.setRole(member, 3);
|
||||
adminMembershipsHelper.setRole(member, 2);
|
||||
|
||||
expect(utils.notifications.success.open()).to.be.eventually.true;
|
||||
|
@ -114,13 +115,14 @@ describe('admin - members', function() {
|
|||
});
|
||||
|
||||
it('toggle admin', async function() {
|
||||
let member = adminMembershipsHelper.getMembers().last();
|
||||
let member = adminMembershipsHelper.getMembers().get(1);
|
||||
let isAdmin = await adminMembershipsHelper.isAdmin(member);
|
||||
|
||||
if (isAdmin) {
|
||||
adminMembershipsHelper.toggleAdmin(member);
|
||||
|
||||
await browser.waitForAngular();
|
||||
await utils.notifications.success.open();
|
||||
|
||||
isAdmin = await adminMembershipsHelper.isAdmin(member);
|
||||
|
||||
expect(isAdmin).not.to.be.true;
|
||||
|
|
|
@ -83,15 +83,17 @@ describe('search page', function() {
|
|||
it('change current tab content on typing in the right column', async function() {
|
||||
let text = await $$('.table-main').get(0).$('a').getText();
|
||||
|
||||
let htmlChanges = await utils.common.outerHtmlChanges('.search-result-table-body');
|
||||
|
||||
let initialCount = await $$('.table-main').count();
|
||||
|
||||
let searchTerm = element(by.model('searchTerm'));
|
||||
|
||||
searchTerm.clear();
|
||||
await searchTerm.clear();
|
||||
|
||||
await searchTerm.sendKeys(text);
|
||||
|
||||
await browser.waitForAngular();
|
||||
await htmlChanges();
|
||||
|
||||
let count = await $$('.table-main').count();
|
||||
|
||||
|
|
|
@ -42,25 +42,6 @@ describe('edit user profile', function() {
|
|||
await utils.lightbox.close(lb);
|
||||
});
|
||||
|
||||
it('edit avatar', async function() {
|
||||
let inputFile = $('#avatar-field');
|
||||
|
||||
let imageContainer = $('.image-container');
|
||||
|
||||
let htmlChanges = await utils.common.outerHtmlChanges(imageContainer);
|
||||
var fileToUpload = utils.common.uploadImagePath();
|
||||
|
||||
await utils.common.uploadFile(inputFile, fileToUpload);
|
||||
|
||||
await htmlChanges();
|
||||
|
||||
let avatar = imageContainer.$('.avatar');
|
||||
|
||||
let src = await avatar.getAttribute('src');
|
||||
|
||||
expect(src).to.contains('upload-image-test.png');
|
||||
});
|
||||
|
||||
it('edit lenguage', async function() {
|
||||
// english
|
||||
$('#lang option:nth-child(4)').click();
|
||||
|
@ -91,4 +72,23 @@ describe('edit user profile', function() {
|
|||
|
||||
await utils.notifications.success.open();
|
||||
});
|
||||
|
||||
it('edit avatar', async function() {
|
||||
let inputFile = $('#avatar-field');
|
||||
|
||||
let imageContainer = $('.image-container');
|
||||
|
||||
let htmlChanges = await utils.common.outerHtmlChanges(imageContainer);
|
||||
var fileToUpload = utils.common.uploadImagePath();
|
||||
|
||||
await utils.common.uploadFile(inputFile, fileToUpload);
|
||||
|
||||
await htmlChanges();
|
||||
|
||||
let avatar = imageContainer.$('.avatar');
|
||||
|
||||
let src = await avatar.getAttribute('src');
|
||||
|
||||
expect(src).to.contains('upload-image-test.png');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -5,9 +5,9 @@ var helper = module.exports;
|
|||
helper.saveWebHook = async function(name, email, key) {
|
||||
let inputs = $$('input[type="text"]');
|
||||
|
||||
await utils.common.clear(inputs.get(0));
|
||||
await utils.common.clear(inputs.get(1));
|
||||
await utils.common.clear(inputs.get(2));
|
||||
await inputs.get(0).clear();
|
||||
await inputs.get(1).clear();
|
||||
await inputs.get(2).clear();
|
||||
|
||||
await inputs.get(0).sendKeys(name);
|
||||
await inputs.get(1).sendKeys(email);
|
||||
|
|
Loading…
Reference in New Issue