Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename fakePassword variable in tests ax #7362

Merged
2 changes: 1 addition & 1 deletion packages/auth/test/helpers/integration/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ export function getTotpCode(
return token;
}
export const email = 'totpuser-donotdelete@test.com';
export const fakePassword = 'password';
export const password = 'password';
//1000000 is always incorrect since it has 7 digits and we expect 6.
export const incorrectTotpCode = '1000000';
14 changes: 7 additions & 7 deletions packages/auth/test/integration/flows/totp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
getTestInstance,
getTotpCode,
email,
fakePassword,
password,
incorrectTotpCode
} from '../../helpers/integration/helpers';

Expand Down Expand Up @@ -77,7 +77,7 @@ describe(' Integration tests: Mfa enrollement using totp', () => {
this.skip();
}

const cr = await signInWithEmailAndPassword(auth, email, fakePassword);
const cr = await signInWithEmailAndPassword(auth, email, password);
mfaUser = multiFactor(cr.user);
const session = await mfaUser.getSession();
totpSecret = await TotpMultiFactorGenerator.generateSecret(session);
Expand All @@ -98,7 +98,7 @@ describe(' Integration tests: Mfa enrollement using totp', () => {
this.skip();
}

const cr = await signInWithEmailAndPassword(auth, email, fakePassword);
const cr = await signInWithEmailAndPassword(auth, email, password);
mfaUser = multiFactor(cr.user);
const session = await mfaUser.getSession();
totpSecret = await TotpMultiFactorGenerator.generateSecret(session);
Expand Down Expand Up @@ -130,7 +130,7 @@ describe('Integration tests: sign-in for mfa-enrolled users', () => {
auth = getTestInstance();
displayName = 'totp-integration-test';

const cr = await signInWithEmailAndPassword(auth, email, fakePassword);
const cr = await signInWithEmailAndPassword(auth, email, password);
mfaUser = multiFactor(cr.user);
const session = await mfaUser.getSession();
totpSecret = await TotpMultiFactorGenerator.generateSecret(session);
Expand Down Expand Up @@ -169,7 +169,7 @@ describe('Integration tests: sign-in for mfa-enrolled users', () => {
this.skip();
}
try {
await signInWithEmailAndPassword(auth, email, fakePassword);
await signInWithEmailAndPassword(auth, email, password);

throw new Error('Signin should not have been successful');
} catch (error) {
Expand All @@ -196,7 +196,7 @@ describe('Integration tests: sign-in for mfa-enrolled users', () => {
this.skip();
}
try {
await signInWithEmailAndPassword(auth, email, fakePassword);
await signInWithEmailAndPassword(auth, email, password);

throw new Error('Signin should not have been successful');
} catch (error) {
Expand All @@ -223,7 +223,7 @@ describe('Integration tests: sign-in for mfa-enrolled users', () => {
mfaUser = multiFactor(userCredential.user);

await expect(mfaUser.unenroll(resolver.hints[0].uid)).to.be.fulfilled;
await expect(signInWithEmailAndPassword(auth, email, fakePassword)).to.be
await expect(signInWithEmailAndPassword(auth, email, password)).to.be
.fulfilled;
}
});
Expand Down