Skip to content

Commit

Permalink
remove deprecated application type references
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandrpravosudko-okta committed Jun 17, 2022
1 parent 2739634 commit 531729a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions test/it/application-provisioning-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ const client = new Client({
});

describe('Application API: provisioning connection for application', () => {
let application: v3.Org2OrgApplication;
let application: v3.BookmarkApplication;

beforeEach(async () => {
application = await client.createApplication(utils.getOrg2OrgApplicationOptions());
application = await client.createApplication(utils.getBookmarkApplication());
});

afterEach(async () => {
Expand Down
12 changes: 4 additions & 8 deletions test/it/client-create-application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('client.createApplication()', () => {
});

it('should allow me to create a SWA plugin application', async () => {
const application: v3.SwaApplication = {
const application: v3.BrowserPluginApplication = {
name: 'template_swa',
label: `node-sdk: Sample Plugin App - ${faker.random.word()}`.substring(0, 49),
signOnMode: 'BROWSER_PLUGIN',
Expand All @@ -110,14 +110,13 @@ describe('client.createApplication()', () => {
}
};

let createdApplication: v3.SwaApplication;
let createdApplication: v3.BrowserPluginApplication;

try {
await utils.removeAppByLabel(client, application.label);
createdApplication = await client.createApplication(application);
expect(createdApplication).to.be.instanceof(v3.Application);
expect(createdApplication).to.be.instanceof(v3.BrowserPluginApplication);
expect(createdApplication).to.be.instanceof(v3.SwaApplication);
expect(createdApplication.name).to.equal(application.name);
expect(createdApplication.label).to.equal(application.label);
expect(createdApplication.signOnMode).to.equal(application.signOnMode);
Expand All @@ -138,7 +137,7 @@ describe('client.createApplication()', () => {
});

it('should allow me to create a 3-field SWA plugin application', async () => {
const application: v3.SwaThreeFieldApplication = {
const application: v3.BrowserPluginApplication = {
name: 'template_swa3field',
label: `node-sdk: Sample Plugin App 3-field - ${faker.random.word()}`.substring(0, 49),
signOnMode: 'BROWSER_PLUGIN',
Expand All @@ -154,21 +153,18 @@ describe('client.createApplication()', () => {
}
};

let createdApplication: v3.SwaThreeFieldApplication;
let createdApplication: v3.BrowserPluginApplication;

try {
await utils.removeAppByLabel(client, application.label);
createdApplication = await client.createApplication(application);
expect(createdApplication).to.be.instanceof(v3.Application);
expect(createdApplication).to.be.instanceof(v3.BrowserPluginApplication);
expect(createdApplication).to.be.instanceof(v3.SwaThreeFieldApplication);
expect(createdApplication.name).to.equal(application.name);
expect(createdApplication.label).to.equal(application.label);
expect(createdApplication.signOnMode).to.equal(application.signOnMode);
// expect(createdApplication.settings).to.be.instanceof(v3.ApplicationSettings);
expect(createdApplication.settings).to.be.instanceof(v3.SwaThreeFieldApplicationSettings);
// expect(createdApplication.settings.app).to.be.instanceof(v3.ApplicationSettingsApplication);
expect(createdApplication.settings.app).to.be.instanceof(v3.SwaThreeFieldApplicationSettingsApplication);
expect(createdApplication.settings.app.buttonSelector).to.equal(application.settings.app.buttonSelector);
expect(createdApplication.settings.app.passwordSelector).to.equal(application.settings.app.passwordSelector);
expect(createdApplication.settings.app.userNameSelector).to.equal(application.settings.app.userNameSelector);
Expand Down

0 comments on commit 531729a

Please sign in to comment.