Skip to content

Commit

Permalink
Make less of a diff
Browse files Browse the repository at this point in the history
  • Loading branch information
camertron committed Sep 23, 2024
1 parent 3a125b9 commit 8d852c5
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions packages/react/src/SelectPanel/SelectPanel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function BasicSelectPanel(passthroughProps: Record<string, unknown>) {

global.Element.prototype.scrollTo = jest.fn()

for (const useModernActionList of [true, false]) {
for (const useModernActionList of [false, true]) {
describe('SelectPanel', () => {
describe(`primer_react_select_panel_with_modern_action_list: ${useModernActionList}`, () => {
it('should render an anchor to open the select panel using `placeholder`', () => {
Expand Down Expand Up @@ -389,16 +389,6 @@ for (const useModernActionList of [true, false]) {
// this is only implemented with the feature flag
if (!useModernActionList) return

it('displays a loading spinner on first open', async () => {
const user = userEvent.setup()

renderWithFlag(<LoadingSelectPanel />, useModernActionList)

await user.click(screen.getByText('Select items'))

expect(screen.getByTestId('filtered-action-list-spinner')).toBeTruthy()
})

function LoadingSelectPanel({
initialLoadingType = 'spinner',
items = [],
Expand Down Expand Up @@ -428,6 +418,16 @@ for (const useModernActionList of [true, false]) {
)
}

it('displays a loading spinner on first open', async () => {
const user = userEvent.setup()

renderWithFlag(<LoadingSelectPanel />, useModernActionList)

await user.click(screen.getByText('Select items'))

expect(screen.getByTestId('filtered-action-list-spinner')).toBeTruthy()
})

it('displays a loading skeleton on first open', async () => {
const user = userEvent.setup()

Expand Down

0 comments on commit 8d852c5

Please sign in to comment.