diff options
-rw-r--r-- | packages/anastasis-webui/src/pages/home/AddingProviderScreen.stories.tsx | 6 | ||||
-rw-r--r-- | packages/anastasis-webui/src/pages/home/AddingProviderScreen.tsx | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/packages/anastasis-webui/src/pages/home/AddingProviderScreen.stories.tsx b/packages/anastasis-webui/src/pages/home/AddingProviderScreen.stories.tsx index 60261bd0d..a96734caa 100644 --- a/packages/anastasis-webui/src/pages/home/AddingProviderScreen.stories.tsx +++ b/packages/anastasis-webui/src/pages/home/AddingProviderScreen.stories.tsx @@ -40,7 +40,11 @@ export const NewProvider = createExample(TestedComponent, { ...reducerStatesExample.authEditing, } as ReducerState); -export const NewSMSProvider = createExample(TestedComponent, { +export const NewVideoProvider = createExample(TestedComponent, { + ...reducerStatesExample.authEditing, +} as ReducerState, { providerType: 'video'}); + +export const NewSmsProvider = createExample(TestedComponent, { ...reducerStatesExample.authEditing, } as ReducerState, { providerType: 'sms'}); diff --git a/packages/anastasis-webui/src/pages/home/AddingProviderScreen.tsx b/packages/anastasis-webui/src/pages/home/AddingProviderScreen.tsx index d2d22374e..5cf6fbb09 100644 --- a/packages/anastasis-webui/src/pages/home/AddingProviderScreen.tsx +++ b/packages/anastasis-webui/src/pages/home/AddingProviderScreen.tsx @@ -19,12 +19,13 @@ async function testProvider(url: string, expectedMethodType?: string): Promise<v if (!("methods" in json) || !Array.isArray(json.methods)) { throw Error("This provider doesn't have authentication method. Check the provider URL") } + console.log("expected", expectedMethodType) if (!expectedMethodType) { return } let found = false for (let i = 0; i < json.methods.length && !found; i++) { - found = json.methods[i].type !== expectedMethodType + found = json.methods[i].type === expectedMethodType } if (!found) { throw Error(`This provider does not support authentication method ${expectedMethodType}`) |