@@ -96,4 +96,32 @@ describe("OIDC authentication", () => {
9696 cy . getByDataHook ( "button-log-in" ) . click ( )
9797 cy . getEditor ( ) . should ( "be.visible" ) ;
9898 } ) ;
99+
100+ it ( "display import panel" , ( ) => {
101+ interceptAuthorizationCodeRequest ( `${ baseUrl } ?code=abcdefgh` ) ;
102+ cy . getByDataHook ( "button-sso-login" ) . click ( ) ;
103+ cy . wait ( "@authorizationCode" ) ;
104+
105+ interceptTokenRequest ( {
106+ "access_token" : "gslpJtzmmi6RwaPSx0dYGD4tEkom" ,
107+ "refresh_token" : "FUuAAqMp6LSTKmkUd5uZuodhiE4Kr6M7Eyv" ,
108+ "id_token" : "eyJhbGciOiJSUzI1NiIsImtpZCI6I" ,
109+ "token_type" : "Bearer" ,
110+ "expires_in" : 300
111+ } ) ;
112+ cy . wait ( "@tokens" ) ;
113+ cy . getEditor ( ) . should ( "be.visible" ) ;
114+
115+ cy . getByDataHook ( "import-panel-button" ) . click ( ) ;
116+ cy . getByDataHook ( "import-dropbox" ) . should ( "be.visible" ) ;
117+ cy . getByDataHook ( "import-browse-from-disk" ) . should ( "be.visible" ) ;
118+
119+ cy . get ( 'input[type="file"]' ) . selectFile ( "cypress/fixtures/test.csv" , { force : true } ) ;
120+ cy . getByDataHook ( "import-table-column-schema" ) . should ( "be.visible" ) ;
121+ cy . getByDataHook ( "import-table-column-owner" ) . should ( "be.visible" ) ;
122+ cy . contains ( "option" , "user1" ) . should ( "not.exist" ) ;
123+ cy . contains ( "option" , "group1" ) . should ( "exist" ) ;
124+
125+ cy . logout ( ) ;
126+ } ) ;
99127} ) ;
0 commit comments