-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
759d6b3
commit 26fb79c
Showing
79 changed files
with
4,998 additions
and
4,358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
}); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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+Qk5W5gNkcshcnkffICoWFQiikjiyXS2Xy9EKXbSRSyaC4YwIUBgADWuAAnppiRpxL7ZLERjMY2HvZoACq4AAesmiAF1xFHZpjsYs8X08DpbHJoLtnJoAAoAWQABLFcX0TnSkAWjh2zh6iwtcctc0A"; | ||
const flowUrl = "/workflow-builder?data=NobwRALgngDgpmAXGA5gewM4FcBGYA0YAhgCZEwRwBOAckQLYLIYDGAFnPURgWAO5oqAawBmAGzR8AkiSRhWHLj0I4JLIQGE09RgDsIcgDJpSAAgWduYAL75w0eHICWupwdv3YTSJxhiilLyU9H4B3gA8bABMAHwAIgFEONxwpixo nD6GOEA9NExNnaQXnJcMDAuKLzllbrVyGQQRMAA-FhYTiQAvN0ABnAA7ERRAIyjAMwkALQ4cEPTACwADC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seUrl) | ||
.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+LQkuLQmElJyipbB2noGRn1m48PWtg5Oru6KXmA+fggBQZoAQgD2tsYxYPFJKUh7B5nZMPBIlZwJ1D3cVCW4JVS0aNT1WBgkxGQtGQ+FwsBKGH+Yn6Mg8MyQU0MK0RaHhYBsdlwjhcbg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QQZykks68Dys6yMgM5iEKokkOJ1pyNh1CkRkyicbOYgAEpZKpVDUHIAjCOIkhGboJlmUS 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, | ||
); | ||
}); | ||
}); |
Oops, something went wrong.