Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { delay } from "@azure/ms-rest-js";

let appIds: Array<string> = [];

describe("Import Tests", () => {
describe("Import Tests", function () {

it("should import version", async () => {
it("should import version", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {
fs.readFile("test/SessionRecords/ImportApp.json", "utf-8", async (err, data) => {
if (err) {
Expand All @@ -40,7 +40,7 @@ describe("Import Tests", () => {
});
});

it("should import version in Lu format", async () => {
it("should import version in Lu format", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {
fs.readFile("test/SessionRecords/ImportLuApp.json", "utf-8", async (err, app) => {
if (err) {
Expand All @@ -65,7 +65,7 @@ describe("Import Tests", () => {
});
});

it("should import v2 version", async () => {
it("should import v2 version", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {
fs.readFile("test/SessionRecords/ImportV2App.json", "utf-8", async (err, data) => {
if (err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { AppsAddResponse } from "../../src/models";
const trainedAppID = BaseTest.GlobalAppId;
let testingApp: AppsAddResponse;

describe("Apps Module Functionality Tests", () => {
describe("Apps Module Functionality Tests", function () {

before('add new app to test on', async () => {
before('add new app to test on', async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {
testingApp = await client.apps.add({
name: "Existing LUIS App",
Expand All @@ -26,13 +26,13 @@ describe("Apps Module Functionality Tests", () => {
});
});

after('delete testing app', async () => {
after('delete testing app', async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {
await client.apps.deleteMethod(testingApp.body);
});
});

it('should list all luis applications', async () => {
it('should list all luis applications', async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {

const list = await client.apps.list();
Expand All @@ -43,7 +43,7 @@ describe("Apps Module Functionality Tests", () => {
});
});

it("should add application", async () => {
it("should add application", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {
const appId = await client.apps.add({
name: "New LUIS App",
Expand All @@ -68,7 +68,7 @@ describe("Apps Module Functionality Tests", () => {
chai.expect(saved_app.usageScenario).to.eql("IoT");
});

it("should get application", async () => {
it("should get application", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {

let result = await client.apps.get(testingApp.body);
Expand All @@ -82,7 +82,7 @@ describe("Apps Module Functionality Tests", () => {
});
});

it("should update application", async () => {
it("should update application", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {

await client.apps.update(testingApp.body, { name: "LUIS App name updated", description: "LUIS App description updated" });
Expand All @@ -94,7 +94,7 @@ describe("Apps Module Functionality Tests", () => {
});
});

it("should delete application", async () => {
it("should delete application", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {

const appId = await client.apps.add({
Expand All @@ -115,7 +115,7 @@ describe("Apps Module Functionality Tests", () => {
});
});

it("should list all endpoints", async () => {
it("should list all endpoints", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {
const result = await client.apps.listEndpoints(testingApp.body);

Expand All @@ -127,7 +127,7 @@ describe("Apps Module Functionality Tests", () => {
});
});

it("should publish application", async () => {
it("should publish application", async function () {

await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {
const result = await client.apps.publish(trainedAppID, {
Expand All @@ -140,7 +140,7 @@ describe("Apps Module Functionality Tests", () => {
});
});

it("download query logs", async () => {
it("download query logs", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {

const stream = await client.apps.downloadQueryLogs(testingApp.body);
Expand All @@ -150,7 +150,7 @@ describe("Apps Module Functionality Tests", () => {
});
});

it("should get settings", async () => {
it("should get settings", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {


Expand All @@ -161,7 +161,7 @@ describe("Apps Module Functionality Tests", () => {
});
});

it("should update settings", async () => {
it("should update settings", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {

await client.apps.updateSettings(testingApp.body, {
Expand All @@ -174,7 +174,7 @@ describe("Apps Module Functionality Tests", () => {

});

it("should get publish settings", async () => {
it("should get publish settings", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {

const settings = await client.apps.getPublishSettings(testingApp.body);
Expand All @@ -186,7 +186,7 @@ describe("Apps Module Functionality Tests", () => {
});
});

it("should update publish settings", async () => {
it("should update publish settings", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {

await client.apps.updatePublishSettings(testingApp.body, {
Expand All @@ -203,7 +203,7 @@ describe("Apps Module Functionality Tests", () => {
});


it("should list domains", async () => {
it("should list domains", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {
const result = await client.apps.listDomains();
for (let domain of result) {
Expand All @@ -212,7 +212,7 @@ describe("Apps Module Functionality Tests", () => {
});
});

it("should list supported cultures", async () => {
it("should list supported cultures", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {
let cultures_map = {
'en-us': 'English',
Expand Down Expand Up @@ -245,7 +245,7 @@ describe("Apps Module Functionality Tests", () => {
});
});

it("should list usage scenarios", async () => {
it("should list usage scenarios", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {

const result = await client.apps.listUsageScenarios();
Expand All @@ -255,7 +255,7 @@ describe("Apps Module Functionality Tests", () => {
});
});

it("should list available custom prebuild domains", async () => {
it("should list available custom prebuild domains", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {

const result = await client.apps.listAvailableCustomPrebuiltDomains();
Expand All @@ -268,7 +268,7 @@ describe("Apps Module Functionality Tests", () => {
});
});

it.skip("should list available custom prebuilt domains for culture", async () => {
it.skip("should list available custom prebuilt domains for culture", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {
let resultsUS = await client.apps.listAvailableCustomPrebuiltDomainsForCulture("en-us");
let resultsCN = await client.apps.listAvailableCustomPrebuiltDomainsForCulture("zh-cn");
Expand All @@ -283,7 +283,7 @@ describe("Apps Module Functionality Tests", () => {
});


it("should add custom prebuilt application", async () => {
it("should add custom prebuilt application", async function () {
await BaseTest.useClientFor(async (client: LUISAuthoringClient) => {
const appId = await client.apps.addCustomPrebuiltDomain({
culture: "en-us",
Expand Down
Loading