Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address Security issues identified by internal component governance services #1715

Merged
merged 1 commit into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions AISKU/Tests/Unit/src/SnippetInitialization.Tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: "[" + snippetName + "] : Public Members exist",
stepDelay: 1,
stepDelay: 100,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding test delay as these are randomly failing (assuming that sometimes it was taking more than 1ms)

steps: [() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix))) as any;
_expectedTrackMethods.forEach(method => {
Expand Down Expand Up @@ -277,7 +277,7 @@ export class SnippetInitializationTests extends AITestClass {
public addAsyncTests(snippetName: string, snippetCreator: (config:any) => Snippet): void {
this.testCaseAsync({
name: 'E2E.GenericTests: trackEvent sends to backend',
stepDelay: 1,
stepDelay: 100,
steps: [() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
theSnippet.trackEvent({ name: 'event', properties: { "prop1": "value1" }, measurements: { "measurement1": 200 } });
Expand All @@ -295,7 +295,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: 'E2E.GenericTests: trackTrace sends to backend',
stepDelay: 1,
stepDelay: 100,
steps: [() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
theSnippet.trackTrace({ message: 'trace', properties: { "foo": "bar", "prop2": "value2" } });
Expand All @@ -312,7 +312,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: 'E2E.GenericTests: trackException sends to backend',
stepDelay: 1,
stepDelay: 100,
steps: [() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
let exception: Error = null;
Expand All @@ -329,7 +329,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: 'E2E.GenericTests: legacy trackException sends to backend',
stepDelay: 1,
stepDelay: 100,
steps: [() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
let exception: Error = null;
Expand All @@ -346,7 +346,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: "TelemetryContext: track metric",
stepDelay: 1,
stepDelay: 100,
steps: [
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
Expand Down Expand Up @@ -387,7 +387,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: "TelemetryContext: track page view performance",
stepDelay: 1,
stepDelay: 100,
steps: [
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
Expand All @@ -398,7 +398,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: "TelemetryContext: track all types in batch",
stepDelay: 1,
stepDelay: 100,
steps: [
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
Expand All @@ -423,7 +423,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: "TelemetryContext: track all types in a large batch",
stepDelay: 1,
stepDelay: 100,
steps: [
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
Expand All @@ -447,7 +447,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: "TelemetryInitializer: E2E override envelope data",
stepDelay: 1,
stepDelay: 100,
steps: [
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
Expand Down Expand Up @@ -488,7 +488,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: "TelemetryContext: trackDependencyData",
stepDelay: 1,
stepDelay: 100,
steps: [
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
Expand All @@ -507,7 +507,7 @@ export class SnippetInitializationTests extends AITestClass {
// If we are emulating ES3 then XHR is not hooked
this.testCaseAsync({
name: "TelemetryContext: auto collection of ajax requests",
stepDelay: 1,
stepDelay: 100,
steps: [
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
Expand Down Expand Up @@ -588,7 +588,7 @@ export class SnippetInitializationTests extends AITestClass {
public addPropertiesPluginTests(snippetName: string, snippetCreator: (config:any) => Snippet): void {
this.testCaseAsync({
name: 'Custom Tags: allowed to send custom properties via addTelemetryInitializer',
stepDelay: 1,
stepDelay: 100,
steps: [
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
Expand Down Expand Up @@ -619,7 +619,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: 'Custom Tags: allowed to send custom properties via addTelemetryInitializer & shimmed addTelemetryInitializer',
stepDelay: 1,
stepDelay: 100,
steps: [
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
Expand Down Expand Up @@ -650,7 +650,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: 'Custom Tags: allowed to send custom properties via shimmed addTelemetryInitializer',
stepDelay: 1,
stepDelay: 100,
steps: [
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
Expand Down Expand Up @@ -696,7 +696,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: 'AuthenticatedUserContext: setAuthenticatedUserContext authId',
stepDelay: 1,
stepDelay: 100,
steps: [
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
Expand Down Expand Up @@ -728,7 +728,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: 'AuthenticatedUserContext: setAuthenticatedUserContext authId and accountId',
stepDelay: 1,
stepDelay: 100,
steps: [
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
Expand Down Expand Up @@ -759,7 +759,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: 'AuthenticatedUserContext: setAuthenticatedUserContext non-ascii authId and accountId',
stepDelay: 1,
stepDelay: 100,
steps: [
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
Expand Down Expand Up @@ -790,7 +790,7 @@ export class SnippetInitializationTests extends AITestClass {

this.testCaseAsync({
name: 'AuthenticatedUserContext: clearAuthenticatedUserContext',
stepDelay: 1,
stepDelay: 100,
steps: [
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
Expand Down
1 change: 0 additions & 1 deletion AISKU/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0",
"@microsoft/applicationinsights-rollup-es3": "1.1.3",
"sinon": "^7.3.1",
"chromedriver": "^2.45.0",
"@microsoft/api-extractor": "^7.18.1",
"finalhandler": "^1.1.1",
"grunt": "^1.4.1",
Expand Down
Loading