@@ -330,7 +330,6 @@ describe('App', () => {
330330 projectInitialized : false ,
331331 sectionCollapsed : {
332332 [ SetupSection . DVC ] : false ,
333- [ SetupSection . GET_STARTED ] : true ,
334333 [ SetupSection . EXPERIMENTS ] : true ,
335334 [ SetupSection . REMOTES ] : true ,
336335 [ SetupSection . STUDIO ] : true
@@ -437,6 +436,21 @@ describe('App', () => {
437436 } )
438437 } )
439438
439+ it ( 'should show a "Show Walkthrough" button if dvc is installed and a project is initalized' , ( ) => {
440+ renderApp ( )
441+
442+ const walkthroughButton = within (
443+ screen . getByTestId ( 'dvc-section-details' )
444+ ) . getByText ( 'Show Walkthrough' )
445+
446+ expect ( walkthroughButton ) . toBeInTheDocument ( )
447+
448+ fireEvent . click ( walkthroughButton )
449+ expect ( mockPostMessage ) . toHaveBeenCalledWith ( {
450+ type : MessageFromWebviewType . SHOW_WALKTHROUGH
451+ } )
452+ } )
453+
440454 it ( 'should show an error icon if DVC is not initialized' , ( ) => {
441455 renderApp ( {
442456 projectInitialized : false
@@ -487,57 +501,6 @@ describe('App', () => {
487501 } )
488502 } )
489503
490- describe ( 'Get Started' , ( ) => {
491- it ( 'should show a screen saying that dvc is not setup if DVC is not found or initialized' , ( ) => {
492- renderApp ( {
493- cliCompatible : undefined
494- } )
495-
496- const details = screen . getByTestId ( 'get-started-section-details' )
497-
498- expect ( within ( details ) . getByText ( 'DVC is not setup' ) ) . toBeInTheDocument ( )
499-
500- sendSetDataMessage ( { ...DEFAULT_DATA , projectInitialized : false } )
501-
502- expect ( within ( details ) . getByText ( 'DVC is not setup' ) ) . toBeInTheDocument ( )
503- } )
504-
505- it ( 'should open the dvc section when clicking the Setup DVC button on the dvc is not setup screen' , ( ) => {
506- renderApp ( {
507- projectInitialized : false ,
508- remoteList : { mockRoot : undefined }
509- } )
510-
511- const details = screen . getByTestId ( 'get-started-section-details' )
512- const getStartedText = within ( details ) . getByText ( 'DVC is not setup' )
513- expect ( getStartedText ) . toBeInTheDocument ( )
514-
515- mockPostMessage . mockClear ( )
516- const button = within ( details ) . getByText ( 'Setup DVC' )
517- fireEvent . click ( button )
518- expect ( screen . getByText ( 'DVC is not initialized' ) ) . toBeVisible ( )
519- expect ( getStartedText ) . not . toBeVisible ( )
520- } )
521-
522- it ( 'should show a button that takes the user to the "Get Started" walkthrough' , ( ) => {
523- renderApp ( )
524-
525- expect (
526- within ( screen . getByTestId ( 'get-started-section-details' ) ) . getAllByText (
527- 'Get Started'
528- )
529- ) . toHaveLength ( 2 )
530- const walkthroughButton = screen . getByText ( 'Show Walkthrough' )
531-
532- expect ( walkthroughButton ) . toBeInTheDocument ( )
533-
534- fireEvent . click ( walkthroughButton )
535- expect ( mockPostMessage ) . toHaveBeenCalledWith ( {
536- type : MessageFromWebviewType . SHOW_WALKTHROUGH
537- } )
538- } )
539- } )
540-
541504 describe ( 'Experiments' , ( ) => {
542505 it ( 'should show a screen saying that dvc is not setup if the project is not initialized' , ( ) => {
543506 renderApp ( {
@@ -791,7 +754,6 @@ describe('App', () => {
791754 isStudioConnected : true ,
792755 sectionCollapsed : {
793756 [ SetupSection . DVC ] : false ,
794- [ SetupSection . GET_STARTED ] : true ,
795757 [ SetupSection . EXPERIMENTS ] : true ,
796758 [ SetupSection . REMOTES ] : true ,
797759 [ SetupSection . STUDIO ] : true
@@ -814,7 +776,6 @@ describe('App', () => {
814776 isStudioConnected : true ,
815777 sectionCollapsed : {
816778 [ SetupSection . DVC ] : true ,
817- [ SetupSection . GET_STARTED ] : true ,
818779 [ SetupSection . EXPERIMENTS ] : false ,
819780 [ SetupSection . REMOTES ] : true ,
820781 [ SetupSection . STUDIO ] : true
@@ -837,7 +798,6 @@ describe('App', () => {
837798 isStudioConnected : true ,
838799 sectionCollapsed : {
839800 [ SetupSection . DVC ] : true ,
840- [ SetupSection . GET_STARTED ] : true ,
841801 [ SetupSection . EXPERIMENTS ] : true ,
842802 [ SetupSection . REMOTES ] : true ,
843803 [ SetupSection . STUDIO ] : false
@@ -862,7 +822,6 @@ describe('App', () => {
862822 remoteList : undefined ,
863823 sectionCollapsed : {
864824 [ SetupSection . DVC ] : true ,
865- [ SetupSection . GET_STARTED ] : true ,
866825 [ SetupSection . EXPERIMENTS ] : true ,
867826 [ SetupSection . REMOTES ] : false ,
868827 [ SetupSection . STUDIO ] : true
@@ -880,7 +839,6 @@ describe('App', () => {
880839 remoteList : { demo : undefined , 'example-get-started' : undefined } ,
881840 sectionCollapsed : {
882841 [ SetupSection . DVC ] : true ,
883- [ SetupSection . GET_STARTED ] : true ,
884842 [ SetupSection . EXPERIMENTS ] : true ,
885843 [ SetupSection . REMOTES ] : false ,
886844 [ SetupSection . STUDIO ] : true
@@ -898,7 +856,6 @@ describe('App', () => {
898856 remoteList : { demo : undefined , 'example-get-started' : undefined } ,
899857 sectionCollapsed : {
900858 [ SetupSection . DVC ] : true ,
901- [ SetupSection . GET_STARTED ] : true ,
902859 [ SetupSection . EXPERIMENTS ] : true ,
903860 [ SetupSection . REMOTES ] : false ,
904861 [ SetupSection . STUDIO ] : true
@@ -923,7 +880,6 @@ describe('App', () => {
923880 } ,
924881 sectionCollapsed : {
925882 [ SetupSection . DVC ] : true ,
926- [ SetupSection . GET_STARTED ] : true ,
927883 [ SetupSection . EXPERIMENTS ] : true ,
928884 [ SetupSection . REMOTES ] : false ,
929885 [ SetupSection . STUDIO ] : true
@@ -951,7 +907,6 @@ describe('App', () => {
951907 } ,
952908 sectionCollapsed : {
953909 [ SetupSection . DVC ] : true ,
954- [ SetupSection . GET_STARTED ] : true ,
955910 [ SetupSection . EXPERIMENTS ] : true ,
956911 [ SetupSection . REMOTES ] : false ,
957912 [ SetupSection . STUDIO ] : true
0 commit comments