Skip to content

Commit 47c8067

Browse files
feat: move auto refresh button and update display name (#3722)
* feat: change display name for auto refresh button & move this button next to run button * fix(test): update the display name for auto refresh button in test
1 parent fbf4c42 commit 47c8067

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

cypress/e2e/shared/dashboardsRefresh.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,14 @@ describe('Dashboard refresh', () => {
172172
cy.wait(5000)
173173
cy.getByTestID(
174174
'enable-auto-refresh-button'
175-
).contains('ENABLE AUTO REFRESH', {matchCase: false})
175+
).contains('SET AUTO REFRESH', {matchCase: false})
176176
})
177177
})
178178
it('can timeout on a preset inactivity timeout', done => {
179179
cy.get<Organization>('@org').then((org: Organization) => {
180180
cy.getByTestID(
181181
'enable-auto-refresh-button'
182-
).contains('ENABLE AUTO REFRESH', {matchCase: false})
182+
).contains('SET AUTO REFRESH', {matchCase: false})
183183

184184
cy.getByTestID('enable-auto-refresh-button').click()
185185
cy.getByTestID('auto-refresh-input')
@@ -214,7 +214,7 @@ describe('Dashboard refresh', () => {
214214
cy.wait(3100)
215215
cy.getByTestID(
216216
'enable-auto-refresh-button'
217-
).contains('ENABLE AUTO REFRESH', {matchCase: false})
217+
).contains('SET AUTO REFRESH', {matchCase: false})
218218

219219
cy.wait('@refreshQuery')
220220
cy.wait('@refreshQuery')

src/dashboards/components/DashboardHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ const DashboardHeader: FC<Props> = ({
258258
text={
259259
isActive
260260
? `Refreshing Every ${autoRefresh.label}`
261-
: 'Enable Auto Refresh'
261+
: 'Set Auto Refresh'
262262
}
263263
color={isActive ? ComponentColor.Secondary : ComponentColor.Default}
264264
onClick={

src/flows/components/header/AutoRefreshButton.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ const AutoRefreshButton: FC = () => {
100100
return (
101101
<Button
102102
text={
103-
isActive
104-
? `Refreshing Every ${autoRefresh?.label}`
105-
: 'Enable Auto Refresh'
103+
isActive ? `Refreshing Every ${autoRefresh?.label}` : 'Set Auto Refresh'
106104
}
107105
color={isActive ? ComponentColor.Secondary : ComponentColor.Default}
108106
onClick={

src/flows/components/header/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,13 +389,13 @@ const FlowHeader: FC = () => {
389389
<Page.ControlBar fullWidth>
390390
<Page.ControlBarLeft>
391391
<Submit />
392+
{isFlagEnabled('flowAutoRefresh') && <AutoRefreshButton />}
392393
<SaveState />
393394
</Page.ControlBarLeft>
394395
<Page.ControlBarRight>
395396
<PresentationMode />
396397
<TimeZoneDropdown />
397398
<TimeRangeDropdown />
398-
{isFlagEnabled('flowAutoRefresh') && <AutoRefreshButton />}
399399
{flow?.id && (
400400
<>
401401
<SquareButton

0 commit comments

Comments
 (0)