Skip to content

Commit

Permalink
test: Unit test for 'Endpoint Type' column in the Bucket Landing Table
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh-akamai committed Aug 30, 2024
1 parent 35c2bab commit 475d702
Showing 1 changed file with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import * as React from 'react';
import { debug } from 'vitest-preview';

import { objectStorageBucketFactory } from 'src/factories';
import { renderWithTheme, mockMatchMedia } from 'src/utilities/testHelpers';
import {
objectStorageBucketFactory,
objectStorageBucketFactoryGen2,
} from 'src/factories';
import { mockMatchMedia, renderWithTheme } from 'src/utilities/testHelpers';

import { BucketTable } from './BucketTable';

Expand Down Expand Up @@ -43,4 +47,20 @@ describe('BucketTable', () => {
expect(getByText(bucket.label)).toBeVisible();
}
});

it('renders "Endpoint Type" column when Gen 2 is enabled', () => {
const bucket = objectStorageBucketFactoryGen2.buildList(1);
const { getByText } = renderWithTheme(
<BucketTable
data={bucket}
handleClickDetails={vi.fn()}
handleClickRemove={vi.fn()}
handleOrderChange={vi.fn()}
order="asc"
orderBy="label"
/>
);
debug();
expect(getByText('Endpoint Type')).toBeVisible();
});
});

0 comments on commit 475d702

Please sign in to comment.