Skip to content

Commit

Permalink
[CP-2820] Add data-testid selector to "Change Backup location" button
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarski committed Apr 30, 2024
1 parent 6687e22 commit a16cf77
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ exports[`matches snapshot 1`] = `
>
<button
class="c11 c12"
data-testid="settings-backup-change-location-button"
size="1"
type="button"
>
Expand Down
2 changes: 2 additions & 0 deletions libs/core/settings/components/backup/backup-ui.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import ElementWithTooltip, {
} from "Core/__deprecated__/renderer/components/core/tooltip/element-with-tooltip.component"
import { TextTooltip } from "Core/ui/components/text-tooltip/text-tooltip.component"
import Text from "Core/__deprecated__/renderer/components/core/text/text.component"
import { SettingsBackupTestIds } from "Core/settings/components/backup/settings-backup-test-ids.enum"

const BackupTableRow = styled(SettingsTableRow)`
grid-template-areas: "Checkbox Actions";
Expand Down Expand Up @@ -92,6 +93,7 @@ const BackupUI: FunctionComponent<Props> = ({ backupLocation, openDialog }) => (
label={intl.formatMessage({
id: "module.settings.backupButtonLabel",
})}
data-testid={SettingsBackupTestIds.ChangeLocationButton}
/>
</BackupActionsWrapper>
</BackupTableRow>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* Copyright (c) Mudita sp. z o.o. All rights reserved.
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
*/

export enum SettingsBackupTestIds {
ChangeLocationButton = "settings-backup-change-location-button",
}

0 comments on commit a16cf77

Please sign in to comment.