@@ -8,10 +8,7 @@ import {
88 type ModelCatalogInterceptOptions ,
99} from '~/__tests__/cypress/cypress/support/interceptHelpers/modelCatalog' ;
1010import { NBSP } from '~/__tests__/cypress/cypress/support/constants' ;
11- import {
12- DEFAULT_VISIBLE_COLUMN_FIELDS ,
13- HARDWARE_CONFIG_COLUMNS_STORAGE_KEY as STORAGE_KEY ,
14- } from '~/app/pages/modelCatalog/components/HardwareConfigurationTableColumns' ;
11+ import { HARDWARE_CONFIG_COLUMNS_STORAGE_KEY as STORAGE_KEY } from '~/app/pages/modelCatalog/components/HardwareConfigurationTableColumns' ;
1512
1613const initIntercepts = ( options : Partial < ModelCatalogInterceptOptions > = { } ) => {
1714 const resolvedOptions = {
@@ -53,17 +50,12 @@ describe('Manage Columns Modal', () => {
5350 initIntercepts ( ) ;
5451 } ) ;
5552
56- describe ( 'Opening the Modal ' , ( ) => {
57- it ( 'should open the modal when clicking the Customize columns button ' , ( ) => {
53+ describe ( 'Smoke Test ' , ( ) => {
54+ it ( 'should open the manage columns modal and display its controls ' , ( ) => {
5855 navigateToPerformanceInsights ( ) ;
5956
6057 modelCatalog . findManageColumnsButton ( ) . should ( 'be.visible' ) ;
6158 modelCatalog . openManageColumnsModal ( ) ;
62- } ) ;
63-
64- it ( 'should display search input and column list in the modal' , ( ) => {
65- navigateToPerformanceInsights ( ) ;
66- modelCatalog . openManageColumnsModal ( ) ;
6759
6860 modelCatalog . findManageColumnsSearch ( ) . should ( 'be.visible' ) ;
6961 modelCatalog . findManageColumnsUpdateButton ( ) . should ( 'be.visible' ) ;
@@ -81,61 +73,7 @@ describe('Manage Columns Modal', () => {
8173 modelCatalog . findManageColumnsModal ( ) . should ( 'not.contain.text' , 'Workload type' ) ;
8274 } ) ;
8375
84- it ( 'should always show sticky columns in the table regardless of manage columns settings' , ( ) => {
85- navigateToPerformanceInsights ( ) ;
86-
87- modelCatalog
88- . findHardwareConfigurationTableHeaders ( )
89- . should ( 'contain.text' , 'Hardware configuration' ) ;
90- modelCatalog . findHardwareConfigurationTableHeaders ( ) . should ( 'contain.text' , 'Workload type' ) ;
91- } ) ;
92- } ) ;
93-
94- describe ( 'Toggling Columns Off/On' , ( ) => {
95- it ( 'should remove a column from the table when unchecked and Update is clicked' , ( ) => {
96- navigateToPerformanceInsights ( ) ;
97-
98- modelCatalog . findHardwareConfigurationTableHeaders ( ) . should ( 'contain.text' , 'Replicas' ) ;
99-
100- modelCatalog . openManageColumnsModal ( ) ;
101- modelCatalog . findManageColumnCheckbox ( 'Replicas' ) . uncheck ( ) ;
102- modelCatalog . findManageColumnsUpdateButton ( ) . click ( ) ;
103-
104- modelCatalog . findHardwareConfigurationTableHeaders ( ) . should ( 'not.contain.text' , 'Replicas' ) ;
105- } ) ;
106-
107- it ( 'should add a column back when re-checked and Update is clicked' , ( ) => {
108- const columnsWithoutReplicas = DEFAULT_VISIBLE_COLUMN_FIELDS . filter (
109- ( col ) => col !== 'replicas' ,
110- ) ;
111- cy . window ( ) . then ( ( win ) => {
112- win . localStorage . setItem ( STORAGE_KEY , JSON . stringify ( columnsWithoutReplicas ) ) ;
113- } ) ;
114-
115- navigateToPerformanceInsights ( ) ;
116-
117- modelCatalog . findHardwareConfigurationTableHeaders ( ) . should ( 'not.contain.text' , 'Replicas' ) ;
118-
119- modelCatalog . openManageColumnsModal ( ) ;
120- modelCatalog . findManageColumnCheckbox ( 'Replicas' ) . check ( ) ;
121- modelCatalog . findManageColumnsUpdateButton ( ) . click ( ) ;
122-
123- modelCatalog . findHardwareConfigurationTableHeaders ( ) . should ( 'contain.text' , 'Replicas' ) ;
124- } ) ;
125-
126- it ( 'should not apply changes when Cancel is clicked' , ( ) => {
127- navigateToPerformanceInsights ( ) ;
128-
129- modelCatalog . findHardwareConfigurationTableHeaders ( ) . should ( 'contain.text' , 'Replicas' ) ;
130-
131- modelCatalog . openManageColumnsModal ( ) ;
132- modelCatalog . findManageColumnCheckbox ( 'Replicas' ) . uncheck ( ) ;
133- modelCatalog . findManageColumnsCancelButton ( ) . click ( ) ;
134-
135- modelCatalog . findHardwareConfigurationTableHeaders ( ) . should ( 'contain.text' , 'Replicas' ) ;
136- } ) ;
137-
138- it ( 'should toggle multiple columns at once' , ( ) => {
76+ it ( 'should always show sticky columns in the table after toggling other columns off' , ( ) => {
13977 navigateToPerformanceInsights ( ) ;
14078
14179 modelCatalog . openManageColumnsModal ( ) ;
@@ -147,62 +85,11 @@ describe('Manage Columns Modal', () => {
14785 modelCatalog
14886 . findHardwareConfigurationTableHeaders ( )
14987 . should ( 'not.contain.text' , 'vLLM Version' ) ;
150- } ) ;
151- } ) ;
152-
153- describe ( 'Column Visibility Persistence' , ( ) => {
154- it ( 'should persist column visibility to localStorage' , ( ) => {
155- navigateToPerformanceInsights ( ) ;
156-
157- modelCatalog . openManageColumnsModal ( ) ;
158- modelCatalog . findManageColumnCheckbox ( 'Replicas' ) . uncheck ( ) ;
159- modelCatalog . findManageColumnsUpdateButton ( ) . click ( ) ;
160-
161- cy . window ( ) . then ( ( win ) => {
162- const stored = win . localStorage . getItem ( STORAGE_KEY ) ;
163- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
164- expect ( stored ) . to . not . be . null ;
165- const parsed = JSON . parse ( stored ! ) ;
166- expect ( parsed ) . to . be . an ( 'array' ) ;
167- expect ( parsed ) . to . not . include ( 'replicas' ) ;
168- } ) ;
169- } ) ;
170-
171- it ( 'should restore column visibility from localStorage on reload' , ( ) => {
172- navigateToPerformanceInsights ( ) ;
173-
174- modelCatalog . openManageColumnsModal ( ) ;
175- modelCatalog . findManageColumnCheckbox ( 'Replicas' ) . uncheck ( ) ;
176- modelCatalog . findManageColumnsUpdateButton ( ) . click ( ) ;
177-
178- modelCatalog . findHardwareConfigurationTableHeaders ( ) . should ( 'not.contain.text' , 'Replicas' ) ;
179-
180- navigateToPerformanceInsights ( ) ;
181-
182- modelCatalog . findHardwareConfigurationTableHeaders ( ) . should ( 'not.contain.text' , 'Replicas' ) ;
183- } ) ;
184- } ) ;
18588
186- describe ( 'Restore Defaults' , ( ) => {
187- it ( 'should restore default column visibility when Restore default columns is clicked' , ( ) => {
188- navigateToPerformanceInsights ( ) ;
189-
190- modelCatalog . openManageColumnsModal ( ) ;
191- modelCatalog . findManageColumnCheckbox ( 'Replicas' ) . uncheck ( ) ;
192- modelCatalog . findManageColumnCheckbox ( 'vLLM Version' ) . uncheck ( ) ;
193- modelCatalog . findManageColumnsUpdateButton ( ) . click ( ) ;
194-
195- modelCatalog . findHardwareConfigurationTableHeaders ( ) . should ( 'not.contain.text' , 'Replicas' ) ;
19689 modelCatalog
19790 . findHardwareConfigurationTableHeaders ( )
198- . should ( 'not.contain.text' , 'vLLM Version' ) ;
199-
200- modelCatalog . openManageColumnsModal ( ) ;
201- modelCatalog . findManageColumnsRestoreDefaults ( ) . click ( ) ;
202- modelCatalog . findManageColumnsUpdateButton ( ) . click ( ) ;
203-
204- modelCatalog . findHardwareConfigurationTableHeaders ( ) . should ( 'contain.text' , 'Replicas' ) ;
205- modelCatalog . findHardwareConfigurationTableHeaders ( ) . should ( 'contain.text' , 'vLLM Version' ) ;
91+ . should ( 'contain.text' , 'Hardware configuration' ) ;
92+ modelCatalog . findHardwareConfigurationTableHeaders ( ) . should ( 'contain.text' , 'Workload type' ) ;
20693 } ) ;
20794 } ) ;
20895
@@ -260,18 +147,4 @@ describe('Manage Columns Modal', () => {
260147 modelCatalog . findHardwareConfigurationTableHeaders ( ) . should ( 'contain.text' , 'Workload type' ) ;
261148 } ) ;
262149 } ) ;
263-
264- describe ( 'Search' , ( ) => {
265- it ( 'should filter columns when typing in the search input' , ( ) => {
266- navigateToPerformanceInsights ( ) ;
267- modelCatalog . openManageColumnsModal ( ) ;
268-
269- modelCatalog . findManageColumnsSearch ( ) . type ( 'TTFT' ) ;
270-
271- modelCatalog . findManageColumnsModal ( ) . should ( 'contain.text' , `TTFT${ NBSP } Latency Mean` ) ;
272- modelCatalog . findManageColumnsModal ( ) . should ( 'contain.text' , `TTFT${ NBSP } Latency P90` ) ;
273- modelCatalog . findManageColumnsModal ( ) . should ( 'not.contain.text' , 'Replicas' ) ;
274- modelCatalog . findManageColumnsModal ( ) . should ( 'not.contain.text' , 'vLLM Version' ) ;
275- } ) ;
276- } ) ;
277150} ) ;
0 commit comments