Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
lukestanley committed Jan 9, 2024
1 parent 759d6b3 commit 26fb79c
Show file tree
Hide file tree
Showing 79 changed files with 4,998 additions and 4,358 deletions.
4 changes: 1 addition & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"plugins": ["@typescript-eslint"],
"rules": {}
}
35 changes: 13 additions & 22 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@
"@schematics/angular:application": {
"strict": true
}
},
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"allowedCommonJsDependencies": [
"lodash"
],
"allowedCommonJsDependencies": ["lodash"],
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
Expand All @@ -36,7 +34,11 @@
"src/mstile-150x150.png",
"src/assets",
"src/manifest.json",
{ "glob": "**/*", "input": "node_modules/monaco-editor", "output": "/assets/monaco/" }
{
"glob": "**/*",
"input": "node_modules/monaco-editor",
"output": "/assets/monaco/"
}
],
"styles": [
"node_modules/@fortawesome/fontawesome-free/css/all.css",
Expand Down Expand Up @@ -160,24 +162,17 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss"
],
"styles": ["src/styles.scss"],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets",
"src/manifest.json"
]
"assets": ["src/favicon.ico", "src/assets", "src/manifest.json"]
}
},
"cypress-run": {
"builder": "@cypress/schematic:cypress",
"options": {
"devServerTarget": "kendraio-app:serve"
},
"configurations": {
}
"configurations": {}
},
"cypress-open": {
"builder": "@cypress/schematic:cypress",
Expand All @@ -193,8 +188,7 @@
"watch": true,
"headless": false
},
"configurations": {
}
"configurations": {}
}
}
},
Expand All @@ -218,12 +212,9 @@
}
}
}

},
"cli": {
"analytics": false,
"schematicCollections": [
"@ngrx/schematics"
]
"schematicCollections": ["@ngrx/schematics"]
}
}
}
83 changes: 42 additions & 41 deletions cypress/e2e/gosub.ts
Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
import { loadFlowCode } from '../support/helper';
import { loadFlowCode } from "../support/helper";
// tslint:disable: quotemark

describe('Subroutine workflow block', () => {
describe("Subroutine workflow block", () => {
it("should display dropdown options from the workflow cloud", () => {
cy.intercept("GET", "https://app.kendra.io/api", {
fixture: "flowList.json",
}).as("flowList.json");

it('should display dropdown options from the workflow cloud', () => {
cy.intercept('GET', 'https://app.kendra.io/api', {
fixture: 'flowList.json'
}
).as('flowList.json');

// Prevent external network request for adapter config
cy.intercept('GET', 'https://kendraio.github.io/kendraio-adapter/config.json', {
fixture: 'adapterConfig.json'
}
).as('adapterConfig.json');

// Prevent external network requests for fonts with empty CSS rule
cy.intercept('https://fonts.googleapis.com/**', "*{ }");
loadFlowCode([
{
"type": "gosub",
"adapterName": "someAdapterA",
"workflowId": "madeUpFlowIDA"
}
]);
cy.get('mat-toolbar > button mat-icon').contains('settings').click({force: true});
cy.get("#mat-expansion-panel-header-0").click();
// cy.pause();
cy.get("#mat-input-0")
.clear()
.type("s")
.type("o")
.get("mat-option", { timeout: 1000 })
.contains("someAdapterB");
cy.get("#mat-input-0")
.clear()
.type("someAdapterB")
.get("#mat-input-1")
.clear()
.get("mat-option", { timeout: 1000 })
.contains("madeUpFlowIDB");
});
// Prevent external network request for adapter config
cy.intercept(
"GET",
"https://kendraio.github.io/kendraio-adapter/config.json",
{
fixture: "adapterConfig.json",
},
).as("adapterConfig.json");

// Prevent external network requests for fonts with empty CSS rule
cy.intercept("https://fonts.googleapis.com/**", "*{ }");
loadFlowCode([
{
type: "gosub",
adapterName: "someAdapterA",
workflowId: "madeUpFlowIDA",
},
]);
cy.get("mat-toolbar > button mat-icon")
.contains("settings")
.click({ force: true });
cy.get("#mat-expansion-panel-header-0").click();
// cy.pause();
cy.get("#mat-input-0")
.clear()
.type("s")
.type("o")
.get("mat-option", { timeout: 1000 })
.contains("someAdapterB");
cy.get("#mat-input-0")
.clear()
.type("someAdapterB")
.get("#mat-input-1")
.clear()
.get("mat-option", { timeout: 1000 })
.contains("madeUpFlowIDB");
});
});

98 changes: 51 additions & 47 deletions cypress/e2e/share.ts
Original file line number Diff line number Diff line change
@@ -1,47 +1,51 @@

describe('Share functionality', () => {

beforeEach(() => {
// Prevent external network request for adapter config
cy.intercept('GET', 'https://kendraio.github.io/kendraio-adapter/config.json', {
fixture: 'adapterConfig.json'
}
).as('adapterConfig.json');

// Prevent external network requests for Workflow cloud
cy.intercept('GET', 'https://app.kendra.io/api/workflowCloud/listWorkflows', {
fixture: 'workflow-cloud.json'
}
).as('workflow-cloud.json');


// Prevent external network requests for fonts with empty CSS rule
cy.intercept('https://fonts.googleapis.com/**', "*{ }");

});

it('should assert a shared database loads as expected using given URL', () => {
const databaseUrl = "/workflow-builder?metadata=NobwRArhCWAmYC4wGZkEMAsAOWBTADALT4BsAjLoRgKwCcAZobbWbYblgEwDGJyJnarGTwANGDSw0ABwAuuAE4A5NAFtciMAGduAC1yq0WsOJ37DK9ZukLo6gPqroAO2hb5C4+Kmy0icM5qGkgASm660GAAvuIANmgARrixmmFaEdGi4FBwmhj41NT0+ADsyIQlFGzYZGSEWCU87PjIZdTc+LQkuLQmElJyipbB2noGRn1m48PWtg5Oru6KXmA+fggBQZoAQgD2tsYxYPFJKUh7B5nZMPBIlZwJ1D3cVCW4JVS0aNT1WBgkxGQtGQ+FwsBKGH+Yn6Mg8MyQU0MK0RaHhYBsdlwjhcbg8KzW-jAgSsSAAMtAAF6ZY6JZKaclUmLXXJId5oTi1ESEJLvKj4WCwJiFH5oLokDD0LDIehkBJ+cSSWFDLYIsZIyZq1Eq0bmCbeNC+Qk5W5gNkcshcnkffICoWFQiikjiyXS2Xy9EKXbSRSyaC4YwIUBgADWuAAnppiRpxL7ZLERjMY2HvZoACq4AAesmiAF1xFH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htrXIQWRJLK8kfl 1jXPNtrFCpanBsgUhxDJThyXII2yPN6Yrpm3xyKeIr YFumXqFQWIBFUlKcgACCaymBVnBVWgEhUHIqlAVggLxUIPnlslRCpelfpkFlP05QKeWCAVkj1cgpVuO99CfQBSC1cmKOcY1iatdQHUIl1PWWH1YADWAe1tkuY0TVaqileRc3FJFyDyoqpjAbC5pXXSINIQp4NpWwGXQ7GcOWAjlmFfjYgKu440lcz01swhqteauWbIGd3joNgzrEFLq3eE4ISCLGhD5VZRVyCIaBoDbYA68d65-M7QK7ne81AA";

cy.visit(databaseUrl)
.contains("Flow");
cy.on('window:confirm', () => true);

cy.wait(3000);

cy.visit(flowUrl)
.contains('Boris');
cy.contains('Liz');
cy.contains('Rishi');

// Now we press the share button, and select share database:
cy.get('mat-icon').contains("settings").click({force: true});
cy.get('mat-icon').contains("share").click({force: true});
cy.get('button:contains("Share database")').click({force: true});

// assert shareValue is in the databaseUrl
cy.get('app-show-share-link-dialog textarea').should('contain', databaseUrl);
});

});
describe("Share functionality", () => {
beforeEach(() => {
// Prevent external network request for adapter config
cy.intercept(
"GET",
"https://kendraio.github.io/kendraio-adapter/config.json",
{
fixture: "adapterConfig.json",
},
).as("adapterConfig.json");

// Prevent external network requests for Workflow cloud
cy.intercept(
"GET",
"https://app.kendra.io/api/workflowCloud/listWorkflows",
{
fixture: "workflow-cloud.json",
},
).as("workflow-cloud.json");

// Prevent external network requests for fonts with empty CSS rule
cy.intercept("https://fonts.googleapis.com/**", "*{ }");
});

it("should assert a shared database loads as expected using given URL", () => {
const databaseUrl =
"/workflow-builder?metadata=NobwRArhCWAmYC4wGZkEMAsAOWBTADALT4BsAjLoRgKwCcAZobbWbYblgEwDGJyJnarGTwANGDSw0ABwAuuAE4A5NAFtciMAGduAC1yq0WsOJ37DK9ZukLo6gPqroAO2hb5C4+Kmy0icM5qGkgASm660GAAvuIANmgARrixmmFaEdGi4FBwmhj41NT0+ADsyIQlFGzYZGSEWCU87PjIZdTc+LQkuLQ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CWaSAgVCwcEfz74WkxPwiEQYgYN 8i-gAys0gSIEBIFwGWDrelQXS8CgKEkAA8hQnq6DwiDgPCKAuAEuHvp YFESRHoZAACkQkoQU4ABeTArLYYDpGIWD0LocRwCI GgGAHCkNQQZykks68Dys6yMgM5iEKokkOJ1pyNh1CkRkyicbOYgAEpZKpVDUHIAjCOIkhGboJlmUS k2XZVD0Yi9D4eAbzqEJKLeEQLA0XhrxYDGOlIMJilyAAoiQbjLt54W XI-hYLo7C8P6FBmcwya6RZogSNI8lgHAsUQFIwS8BOPzgOaMhxkaCamgAjl VBQK5DAYEmAr1YQqGNIkJodKhtrXIQWRJLK8kfl 1jXPNtrFCpanBsgUhxDJThyXII2yPN6Yrpm3xyKeIr YFumXqFQWIBFUlKcgACCaymBVnBVWgEhUHIqlAVggLxUIPnlslRCpelfpkFlP05QKeWCAVkj1cgpVuO99CfQBSC1cmKOcY1iatdQHUIl1PWWH1YADWAe1tkuY0TVaqileRc3FJFyDyoqpjAbC5pXXSINIQp4NpWwGXQ7GcOWAjlmFfjYgKu440lcz01swhqteauWbIGd3joNgzrEFLq3eE4ISCLGhD5VZRVyCIaBoDbYA68d65-M7QK7ne81AA";

cy.visit(databaseUrl).contains("Flow");
cy.on("window:confirm", () => true);

cy.wait(3000);

cy.visit(flowUrl).contains("Boris");
cy.contains("Liz");
cy.contains("Rishi");

// Now we press the share button, and select share database:
cy.get("mat-icon").contains("settings").click({ force: true });
cy.get("mat-icon").contains("share").click({ force: true });
cy.get('button:contains("Share database")').click({ force: true });

// assert shareValue is in the databaseUrl
cy.get("app-show-share-link-dialog textarea").should(
"contain",
databaseUrl,
);
});
});
Loading

0 comments on commit 26fb79c

Please sign in to comment.