-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(schematics): adding multi-user support. (#2958)
Utilize firebase-tools multi user support to allow an account picker on `ng add`
- Loading branch information
1 parent
73bde38
commit ca6eac2
Showing
5 changed files
with
72 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,10 @@ const SERVER_BUILD_TARGET: BuildTarget = { | |
name: `${PROJECT}:server:production` | ||
}; | ||
|
||
const login = () => Promise.resolve(); | ||
const login = () => Promise.resolve({ user: { email: '[email protected]' }}); | ||
login.list = () => Promise.resolve([{ user: { email: '[email protected]' }}]); | ||
login.add = () => Promise.resolve([{ user: { email: '[email protected]' }}]); | ||
login.use = () => Promise.resolve('[email protected]'); | ||
|
||
const initMocks = () => { | ||
fsHost = { | ||
|
@@ -104,7 +106,7 @@ describe('Deploy Angular apps', () => { | |
beforeEach(() => initMocks()); | ||
|
||
it('should call login', async () => { | ||
const spy = spyOn(firebaseMock, 'login'); | ||
const spy = spyOn(firebaseMock, 'login').and.resolveTo({ email: '[email protected]' }); | ||
await deploy( | ||
firebaseMock, context, STATIC_BUILD_TARGET, undefined, | ||
undefined, undefined, { projectId: FIREBASE_PROJECT, preview: false } | ||
|
@@ -149,6 +151,7 @@ describe('Deploy Angular apps', () => { | |
only: 'hosting:' + PROJECT, | ||
token: FIREBASE_TOKEN, | ||
nonInteractive: true, | ||
projectRoot: 'cwd', | ||
}); | ||
}); | ||
|
||
|
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
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