This commit is contained in:
Kamil Szostak 2017-08-03 15:19:51 -07:00
Родитель 06afe35bc7
Коммит 5940adbb8c
7 изменённых файлов: 17 добавлений и 14 удалений

Просмотреть файл

@ -1,6 +1,6 @@
/// <reference path="..\TestFramework\Common.ts" />
/// <reference path="../../javascriptsdk/appinsights.ts" />
/// <reference path="../../javascriptsdk/initialization.ts" />
/// <reference path="../TestFramework/Common.ts" />
/// <reference path="../../JavaScriptSDK/AppInsights.ts" />
/// <reference path="../../JavaScriptSDK/Initialization.ts" />
class ValidateTests extends TestClass {
@ -71,7 +71,10 @@ class ValidateTests extends TestClass {
Assert.ok(!this.successSpy.called, "success not called");
Assert.ok(this.errorSpy.called, "error called");
var result = JSON.parse(this.errorSpy.args[0][1]);
let response = this.errorSpy.args[0][1] as string;
response = response.replace("XMLHttpRequest,Status:400,Response:", "");
var result = JSON.parse(response);
Assert.equal(1, result.itemsReceived, "backend received wrong number of elements");
Assert.equal(0, result.itemsAccepted, "backend accepted invalid number of events");

Просмотреть файл

@ -1,6 +1,6 @@
/// <reference path="../../javascriptsdk/telemetry/exception.ts" />
/// <reference path="..\TestFramework\Common.ts" />
/// <reference path="../../javascriptsdk/appinsights.ts" />
/// <reference path="../../JavaScriptSDK/Telemetry/Exception.ts" />
/// <reference path="../../JavaScriptSDK/AppInsights.ts" />
/// <reference path="../TestFramework/Common.ts" />
class AutoCollectionTests extends TestClass {

Просмотреть файл

@ -106,18 +106,18 @@ module.exports = function (grunt) {
options: {
urls: [
'JavaScript/JavaScriptSDK.Tests/Selenium/Tests.html',
'JavaScript/JavaScriptSDK.Tests/E2ETests/E2E.DisableTelemetryTests.htm',
'JavaScript/JavaScriptSDK.Tests/E2ETests/E2E.PublicApiTests.htm',
'JavaScript/JavaScriptSDK.Tests/E2ETests/E2E.SanitizerE2ETests.htm',
'JavaScript/JavaScriptSDK.Tests/E2ETests/E2E.DisableTelemetry.tests.htm',
'JavaScript/JavaScriptSDK.Tests/E2ETests/E2E.PublicApi.tests.htm',
'JavaScript/JavaScriptSDK.Tests/E2ETests/E2E.SanitizerE2E.tests.htm',
'JavaScript/JavaScriptSDK.Tests/E2ETests/E2E.Sender.tests.htm',
'JavaScript/JavaScriptSDK.Tests/E2ETests/E2E.snippetTests.htm',
// FIX: 'JavaScript/JavaScriptSDK.Tests/E2ETests/E2E.ValidateApiTests.htm'
// FIX: 'JavaScript/JavaScriptSDK.Tests/E2ETests/E2E.autoCollection.tests.htm'
'JavaScript/JavaScriptSDK.Tests/E2ETests/E2E.ValidateApi.tests.htm',
'JavaScript/JavaScriptSDK.Tests/E2ETests/E2E.AutoCollection.tests.htm'
],
timeout: 120 * 1000,
timeout: 300 * 1000, // 5 min
console: false,
summaryOnly: true,
'--web-security': 'false'
'--web-security': 'false' // we need this to allow CORS requests in PhantomJS
}
}
}