Skip to content

Commit

Permalink
ZKUI-397: Select the error toast by the role
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengYanJin committed Nov 14, 2023
1 parent bdcf36b commit e88ec5e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ const selectors = {
name: /edit default retention/i,
}),
bucketTaggingErrorToastCloseButton: () =>
screen.getByRole('button', {
within(screen.getByRole('status')).getByRole('button', {
name: /close/i,
}),
bucketTaggingErrorToast: () =>
screen.getByText(
within(screen.getByRole('status')).getByText(
/Encountered issues loading bucket tagging, causing uncertainty about the use-case. Please refresh the page./i,
),
};
Expand Down
4 changes: 1 addition & 3 deletions src/react/reducers/initialConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ export const initialAuthState: AuthState = {
configFailure: false,
stsClient: new MockSTSClient(),
managementClient: new MockManagementClient(),
config: {
features: ['Veeam'],
},
config: { features: [] },
oidcLogout: null,
};
export const initialConfigUIState = {
Expand Down
1 change: 1 addition & 0 deletions src/react/utils/testUtil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export const realStoreWithInitState = (state) => {
...(state || {}),
};
tmpState.auth.managementClient = TEST_MANAGEMENT_CLIENT;
tmpState.auth.config.features = ['Veeam'];
const store = createStore(
zenkoUIReducer(),
tmpState,
Expand Down

0 comments on commit e88ec5e

Please sign in to comment.