@@ -18,13 +18,7 @@ import {
1818 COMMENT_THREAD_CONTAINER_CYPRESS ,
1919 COMMIT_INFO_DIALOG_CYPRESS ,
2020 CUSTOM_DIALOG_TITLE_CYPRESS ,
21- DISPLAY_SETTINGS_FAB_CYPRESS ,
2221 PLAYER_VIEW_CYPRESS ,
23- REPL_EDITOR_ID_CY ,
24- SETTINGS_DIALOG_CANCEL_BUTTON_CYPRESS ,
25- SETTINGS_DIALOG_SAVE_BUTTON_CYPRESS ,
26- SHOW_LINE_NUMBERS_SWITCH_CYPRESS ,
27- TAB_PRESET_VIEW_CYPRESS ,
2822 TOOLBAR_COMMIT_INFO_BUTTON_CYPRESS ,
2923 TOOLBAR_EDIT_CODE_BUTTON_CYPRESS ,
3024 TOOLBAR_RUN_CODE_BUTTON_CYPRESS ,
@@ -327,77 +321,3 @@ describe('Comment settings', () => {
327321 ) ;
328322 } ) ;
329323} ) ;
330-
331- describe ( 'Show Line Numbers Setting Builder View' , ( ) => {
332- beforeEach ( ( ) => {
333- cy . setUpApi ( {
334- database : {
335- appSettings : [
336- MOCK_GENERAL_SETTINGS ,
337- {
338- ...MOCK_GENERAL_SETTINGS ,
339- data : {
340- ...DEFAULT_GENERAL_SETTINGS ,
341- [ GeneralSettingsKeys . ShowLineNumbers ] : true ,
342- } ,
343- } ,
344- MOCK_CODE_SETTINGS ,
345- ] ,
346- } ,
347- appContext : {
348- context : Context . Builder ,
349- permission : PermissionLevel . Admin ,
350- } ,
351- } ) ;
352- cy . visit ( '/' ) ;
353- } ) ;
354-
355- it ( 'Toggling Line Numbers Switch from Display Settings' , ( ) => {
356- // Check For Line Numbers Are Shown.
357- // Open Preset View.
358- cy . get ( buildDataCy ( TAB_PRESET_VIEW_CYPRESS ) )
359- . should ( 'be.visible' )
360- . as ( 'presetViewTab' )
361- . click ( ) ;
362- // Open Display Settings.
363- cy . get ( buildDataCy ( DISPLAY_SETTINGS_FAB_CYPRESS ) )
364- . should ( 'be.visible' )
365- . as ( 'displaySettingsFab' )
366- . click ( ) ;
367- // Check that Line Numbers Switch is checked.
368- cy . get (
369- `${ buildDataCy ( SHOW_LINE_NUMBERS_SWITCH_CYPRESS ) } input[type="checkbox"]` ,
370- ) . should ( 'be.checked' ) ;
371- // Click on Cancel button from the display settings window.
372- cy . get ( buildDataCy ( SETTINGS_DIALOG_CANCEL_BUTTON_CYPRESS ) )
373- . as ( 'cancelButton' )
374- . should ( 'be.visible' )
375- . click ( ) ;
376- // Check that line numbers are shown.
377- cy . get ( `#${ REPL_EDITOR_ID_CY } .cm-lineNumbers` ) . should ( 'be.visible' ) ;
378- // Check For Line Numbers Are Not Shown.
379- // Open Display Settings.
380- cy . get ( buildDataCy ( DISPLAY_SETTINGS_FAB_CYPRESS ) )
381- . should ( 'be.visible' )
382- . as ( 'displaySettingsFab' )
383- . click ( ) ;
384- cy . wait ( waitingDelay ) ;
385- // Click on switch to toggle setting, check that the switch shouldn't be checked.
386- cy . get (
387- `${ buildDataCy ( SHOW_LINE_NUMBERS_SWITCH_CYPRESS ) } input[type="checkbox"]` ,
388- ) . click ( ) ;
389- cy . get (
390- `${ buildDataCy ( SHOW_LINE_NUMBERS_SWITCH_CYPRESS ) } input[type="checkbox"]` ,
391- ) . should ( 'not.to.be.checked' ) ;
392- // Click on Save button from the display settings window.
393- cy . get ( buildDataCy ( SETTINGS_DIALOG_SAVE_BUTTON_CYPRESS ) )
394- . as ( 'saveButton' )
395- . should ( 'not.be.disabled' ) ;
396- cy . get ( buildDataCy ( SETTINGS_DIALOG_SAVE_BUTTON_CYPRESS ) ) . click ( {
397- // this seems necessary even if the behavior is correct when doing it at human speeds
398- force : true ,
399- } ) ;
400- // Check that line numbers are not shown.
401- cy . get ( `#${ REPL_EDITOR_ID_CY } .cm-lineNumbers` ) . should ( 'not.exist' ) ;
402- } ) ;
403- } ) ;
0 commit comments