]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-20366 Fix disabled option styling
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Fri, 15 Sep 2023 14:33:41 +0000 (16:33 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 15 Sep 2023 20:03:06 +0000 (20:03 +0000)
server/sonar-web/src/main/js/apps/quality-profiles/__tests__/QualityProfileApp-it.tsx
server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.tsx

index f8febad6618879fe9d06266577eaaae799e86aaa..4e375c5aa115dd4cb5400afcef0d7d780bd0ba23 100644 (file)
@@ -390,7 +390,7 @@ describe('Admin or user with permission', () => {
       await ui.waitForDataLoaded();
 
       await user.click(await ui.qualityProfileActions.find());
-      expect(ui.setAsDefaultButton.query()).not.toBeInTheDocument();
+      expect(ui.setAsDefaultButton.get()).toBeDisabled();
     });
 
     it("should be able to delete a Quality Profile and it's children", async () => {
index cba17ac635a6c1fc3c0847f7f621ac8ed5c9cb6c..cdcc9aa82d56f2022f3782c7900c36b6888421ef 100644 (file)
@@ -283,9 +283,13 @@ class ProfileActions extends React.PureComponent<Props, State> {
                   placement={PopupPlacement.Left}
                   overlay={translate('quality_profiles.cannot_set_default_no_rules')}
                 >
-                  <span className="it__quality-profiles__set-as-default">
+                  <ItemButton
+                    className="it__quality-profiles__set-as-default"
+                    onClick={this.handleSetDefaultClick}
+                    disabled
+                  >
                     {translate('set_as_default')}
-                  </span>
+                  </ItemButton>
                 </Tooltip>
               </li>
             ) : (