From 20edb568a3556cca858d1e95cde1a92e0ea377f7 Mon Sep 17 00:00:00 2001 From: sahandilshan Date: Fri, 7 Jun 2024 14:41:06 +0530 Subject: [PATCH 1/4] Add data-testid to ai features --- .../admin.login-flow.ai.v1/components/login-flow-ai-banner.tsx | 2 ++ features/common.ai.v1/components/ai-banner.tsx | 1 + features/common.ai.v1/components/ai-loading-screen.tsx | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/features/admin.login-flow.ai.v1/components/login-flow-ai-banner.tsx b/features/admin.login-flow.ai.v1/components/login-flow-ai-banner.tsx index d2d57b40e36..1722fc2e5c4 100644 --- a/features/admin.login-flow.ai.v1/components/login-flow-ai-banner.tsx +++ b/features/admin.login-flow.ai.v1/components/login-flow-ai-banner.tsx @@ -208,6 +208,7 @@ const LoginFlowAIBanner: FunctionComponent = ( > = ( color="secondary" size="small" className="login-flow-ai-banner-history-button" + data-testid="login-flow-ai-banner-history-button" > { t("ai:aiLoginFlow.promptsHistory") } diff --git a/features/common.ai.v1/components/ai-banner.tsx b/features/common.ai.v1/components/ai-banner.tsx index d4c311c09e9..3ed14d2dac6 100644 --- a/features/common.ai.v1/components/ai-banner.tsx +++ b/features/common.ai.v1/components/ai-banner.tsx @@ -81,6 +81,7 @@ const AIBanner = (props: AIBannerProps): ReactElement => { onClick={ onActionButtonClick } color="primary" variant="contained" + data-testid="ai-banner-action-button" > { actionButtonText } diff --git a/features/common.ai.v1/components/ai-loading-screen.tsx b/features/common.ai.v1/components/ai-loading-screen.tsx index 1342e3d32f2..e490183f8f3 100644 --- a/features/common.ai.v1/components/ai-loading-screen.tsx +++ b/features/common.ai.v1/components/ai-loading-screen.tsx @@ -84,7 +84,7 @@ const AILoadingScreen = (props: AILoadingScreenProps): ReactElement => { { !isAnimatedBotDisabled && ( -
+
) From 226ab7f3e1d7608f4eaa11365841b99de92f5143 Mon Sep 17 00:00:00 2001 From: sahandilshan Date: Fri, 7 Jun 2024 14:46:52 +0530 Subject: [PATCH 2/4] =?UTF-8?q?Add=20changeset=20=F0=9F=A6=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/spotty-clouds-drum.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/spotty-clouds-drum.md diff --git a/.changeset/spotty-clouds-drum.md b/.changeset/spotty-clouds-drum.md new file mode 100644 index 00000000000..34df2be8870 --- /dev/null +++ b/.changeset/spotty-clouds-drum.md @@ -0,0 +1,7 @@ +--- +"@wso2is/admin.login-flow.ai.v1": patch +"@wso2is/admin.branding.ai.v1": patch +"@wso2is/console": patch +--- + +Add data-testid From dd7793456249413e0e8c9098bd0a4a51fc2ca052 Mon Sep 17 00:00:00 2001 From: sahandilshan Date: Fri, 7 Jun 2024 14:56:21 +0530 Subject: [PATCH 3/4] Fix lint issue --- features/common.ai.v1/components/ai-loading-screen.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/features/common.ai.v1/components/ai-loading-screen.tsx b/features/common.ai.v1/components/ai-loading-screen.tsx index e490183f8f3..2306687fdf6 100644 --- a/features/common.ai.v1/components/ai-loading-screen.tsx +++ b/features/common.ai.v1/components/ai-loading-screen.tsx @@ -84,7 +84,10 @@ const AILoadingScreen = (props: AILoadingScreenProps): ReactElement => { { !isAnimatedBotDisabled && ( -
+
) From 55667fc952fad6fc794581663aa179ca126147f0 Mon Sep 17 00:00:00 2001 From: sahandilshan Date: Mon, 10 Jun 2024 08:54:09 +0530 Subject: [PATCH 4/4] Change testid into componentid --- .../admin.branding.ai.v1/components/branding-ai-banner.tsx | 1 + .../components/login-flow-ai-banner.tsx | 6 ++++-- features/common.ai.v1/components/ai-banner.tsx | 2 +- features/common.ai.v1/components/ai-loading-screen.tsx | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/features/admin.branding.ai.v1/components/branding-ai-banner.tsx b/features/admin.branding.ai.v1/components/branding-ai-banner.tsx index d765e7dd809..e6c929b4ae5 100644 --- a/features/admin.branding.ai.v1/components/branding-ai-banner.tsx +++ b/features/admin.branding.ai.v1/components/branding-ai-banner.tsx @@ -125,6 +125,7 @@ const BrandingAIBanner: FunctionComponent = (): ReactElement => { = ( > = ( color="secondary" size="small" className="login-flow-ai-banner-history-button" - data-testid="login-flow-ai-banner-history-button" + data-componentid="login-flow-ai-banner-history-button" > { t("ai:aiLoginFlow.promptsHistory") } @@ -303,6 +303,8 @@ const LoginFlowAIBanner: FunctionComponent = ( > replacePrompt(prompt) } > diff --git a/features/common.ai.v1/components/ai-banner.tsx b/features/common.ai.v1/components/ai-banner.tsx index 3ed14d2dac6..16f03539293 100644 --- a/features/common.ai.v1/components/ai-banner.tsx +++ b/features/common.ai.v1/components/ai-banner.tsx @@ -81,7 +81,7 @@ const AIBanner = (props: AIBannerProps): ReactElement => { onClick={ onActionButtonClick } color="primary" variant="contained" - data-testid="ai-banner-action-button" + data-componentid="ai-banner-action-button" > { actionButtonText } diff --git a/features/common.ai.v1/components/ai-loading-screen.tsx b/features/common.ai.v1/components/ai-loading-screen.tsx index 2306687fdf6..c7765d5475e 100644 --- a/features/common.ai.v1/components/ai-loading-screen.tsx +++ b/features/common.ai.v1/components/ai-loading-screen.tsx @@ -86,7 +86,7 @@ const AILoadingScreen = (props: AILoadingScreenProps): ReactElement => { !isAnimatedBotDisabled && (