diff --git a/console/src/app/modules/policies/notification-sms-provider/notification-sms-provider.component.ts b/console/src/app/modules/policies/notification-sms-provider/notification-sms-provider.component.ts index eb14ce8a0c..f13a3e6992 100644 --- a/console/src/app/modules/policies/notification-sms-provider/notification-sms-provider.component.ts +++ b/console/src/app/modules/policies/notification-sms-provider/notification-sms-provider.component.ts @@ -1,4 +1,4 @@ -import { Component, Input } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { AddSMSProviderTwilioRequest, UpdateSMSProviderTwilioRequest } from 'src/app/proto/generated/zitadel/admin_pb'; import { SMSProvider, SMSProviderConfigState } from 'src/app/proto/generated/zitadel/settings_pb'; @@ -15,7 +15,7 @@ import { DialogAddSMSProviderComponent } from './dialog-add-sms-provider/dialog- templateUrl: './notification-sms-provider.component.html', styleUrls: ['./notification-sms-provider.component.scss'], }) -export class NotificationSMSProviderComponent { +export class NotificationSMSProviderComponent implements OnInit { @Input() public serviceType!: PolicyComponentServiceType; public smsProviders: SMSProvider.AsObject[] = []; @@ -30,6 +30,9 @@ export class NotificationSMSProviderComponent { private toast: ToastService, ) {} + ngOnInit(): void { + this.fetchData(); + } private fetchData(): void { this.smsProvidersLoading = true; this.service diff --git a/e2e/cypress/e2e/instance/settings/notifications.cy.ts b/e2e/cypress/e2e/instance/settings/notifications.cy.ts index 02548d6636..f2685c5d92 100644 --- a/e2e/cypress/e2e/instance/settings/notifications.cy.ts +++ b/e2e/cypress/e2e/instance/settings/notifications.cy.ts @@ -57,6 +57,8 @@ describe('instance notifications', () => { cy.get('[formcontrolname="senderNumber"]').clear().type('2312123132'); cy.get('[data-e2e="save-sms-settings-button"]').click(); cy.shouldConfirmSuccess(); + cy.get('h4').contains('Twilio'); + cy.get('.state').contains('Inactive'); }); }); });