Skip to content

Commit

Permalink
fix(test): viewMode tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dhodgsonintergral committed Jan 3, 2025
1 parent b36cec0 commit ba434cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/app/features/scopes/tests/tree.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('Tree', () => {
beforeAll(() => {
config.featureToggles.scopeFilters = true;
config.featureToggles.groupByVariable = true;
config.featureToggles.singleTopNav = true; // Add this line
config.featureToggles.singleTopNav = true;
});

beforeEach(() => {
Expand Down
6 changes: 5 additions & 1 deletion public/app/features/scopes/tests/utils/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ export const querySelectorApply = () => screen.queryByTestId(selectors.selector.
export const getSelectorApply = () => screen.getByTestId(selectors.selector.apply);
export const getSelectorCancel = () => screen.getByTestId(selectors.selector.cancel);

export const getDashboardsExpand = () => screen.getByTestId(selectors.dashboards.expand);
// In selectors.ts, modify getDashboardsExpand
export const getDashboardsExpand = () =>
screen.getByRole('button', {
name: /expand dashboards|collapse dashboards/i
});
export const queryDashboardsContainer = () => screen.queryByTestId(selectors.dashboards.container);
export const queryDashboardsSearch = () => screen.queryByTestId(selectors.dashboards.search);
export const getDashboardsSearch = () => screen.getByTestId<HTMLInputElement>(selectors.dashboards.search);
Expand Down
1 change: 1 addition & 0 deletions public/app/features/scopes/tests/viewMode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('View mode', () => {
beforeAll(() => {
config.featureToggles.scopeFilters = true;
config.featureToggles.groupByVariable = true;
config.featureToggles.singleTopNav = true;
});

beforeEach(() => {
Expand Down

0 comments on commit ba434cc

Please sign in to comment.