From 475d702ab659b8b7297a709e130b1a68b3ebf043 Mon Sep 17 00:00:00 2001 From: hrao Date: Fri, 30 Aug 2024 11:34:47 +0530 Subject: [PATCH] test: Unit test for 'Endpoint Type' column in the Bucket Landing Table --- .../BucketLanding/BucketTable.test.tsx | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/packages/manager/src/features/ObjectStorage/BucketLanding/BucketTable.test.tsx b/packages/manager/src/features/ObjectStorage/BucketLanding/BucketTable.test.tsx index bbce7fa8900..41259a54925 100644 --- a/packages/manager/src/features/ObjectStorage/BucketLanding/BucketTable.test.tsx +++ b/packages/manager/src/features/ObjectStorage/BucketLanding/BucketTable.test.tsx @@ -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'; @@ -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( + + ); + debug(); + expect(getByText('Endpoint Type')).toBeVisible(); + }); });