Skip to content

Commit

Permalink
remove integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pragatimodi committed Oct 18, 2023
1 parent f130cbf commit 23d0349
Showing 1 changed file with 1 addition and 43 deletions.
44 changes: 1 addition & 43 deletions test/integration/auth.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
AuthProviderConfig, CreateTenantRequest, DeleteUsersResult, PhoneMultiFactorInfo,
TenantAwareAuth, UpdatePhoneMultiFactorInfoRequest, UpdateTenantRequest, UserImportOptions,
UserImportRecord, UserRecord, getAuth, UpdateProjectConfigRequest, UserMetadata, MultiFactorConfig,
PasswordPolicyConfig, SmsRegionConfig
PasswordPolicyConfig, SmsRegionConfig,
} from '../../lib/auth/index';
import * as sinon from 'sinon';
import * as sinonChai from 'sinon-chai';
Expand Down Expand Up @@ -2197,48 +2197,6 @@ describe('admin.auth', () => {
});
});

describe('Passkey config management operations', () => {

// Before each test, reset the passkey config to the initial state
beforeEach(async () => {
// const resetRequest = { expectedOrigins: expectedPasskeyConfig.expectedOrigins };
// await getAuth().passkeyConfigManager().updatePasskeyConfig(resetRequest);
});

it('createPasskeyConfig() should create passkey config with expected passkeyConfig', async () => {
const rpId = projectId + '.firebaseapp.com';
const createRequest = { expectedOrigins: ['app1', 'example.com'] };
const createdPasskeyConfig = await getAuth().passkeyConfigManager().createPasskeyConfig(rpId, createRequest);

expect(createdPasskeyConfig.name).to.deep.equal('projects/' + projectId + '/passkeyConfig');
expect(createdPasskeyConfig.rpId).to.deep.equal(projectId + '.firebaseapp.com');
expect(createdPasskeyConfig.expectedOrigins).to.deep.equal(['app1', 'example.com']);
});

// TODO: uncomment when the GET endpoint is released in prod
// it('getPasskeyConfig() should resolve with expected passkeyConfig', async () => {
// const actualPasskeyConfig = await getAuth().passkeyConfigManager().getPasskeyConfig();

// expect(actualPasskeyConfig.name).to.deep.equal('projects/' + projectId + '/passkeyConfig');
// expect(actualPasskeyConfig.rpId).to.deep.equal(projectId + '.firebaseapp.com');
// expect(actualPasskeyConfig.expectedOrigins).to.deep.equal(['app1', 'example.com']);
// });

it('updatePasskeyConfig() should resolve with updated expectedOrigins', async () => {
const updateRequest = {
expectedOrigins: ['app1', 'example.com', 'app2']
};

const updatedPasskeyConfig = await getAuth().passkeyConfigManager().updatePasskeyConfig(updateRequest);

expect(updatedPasskeyConfig.name).to.deep.equal('projects/' + projectId + '/passkeyConfig');
// TODO: backend validation needs to fixed in order for this statement to succeed.
// expect(updatedPasskeyConfig.rpId).to.deep.equal(projectId + '.firebaseapp.com');
expect(updatedPasskeyConfig.expectedOrigins).to.deep.equal(['app1', 'example.com', 'app2']);
});
});


describe('SAML configuration operations', () => {
const authProviderConfig1 = {
providerId: randomSamlProviderId(),
Expand Down

0 comments on commit 23d0349

Please sign in to comment.