1- import { TEST_NS } from '../../utils/const/index' ;
2- import { authSSHKey } from '../../utils/const/string' ;
3- import { tabModal } from '../../views/actions' ;
4- import { addNew , manageKeysText , secretName , uploadSecret } from '../../views/selector-catalog' ;
5- import { userButtonTxt } from '../../views/selector-instance' ;
61import { tab } from '../../views/tab' ;
72
8- const testSecret = 'test-secret' ;
9-
103describe ( 'Test Virtualization Overview' , ( ) => {
114 before ( ( ) => {
12- cy . visit ( '' ) ;
5+ cy . visitOverview ( ) ;
136 } ) ;
147
158 it ( 'overview page is loaded' , ( ) => {
16- cy . visitOverview ( ) ;
179 cy . contains ( 'VirtualMachine statuses' ) . should ( 'exist' ) ;
1810 } ) ;
1911
@@ -31,31 +23,4 @@ describe('Test Virtualization Overview', () => {
3123 tab . navigateToSettings ( ) ;
3224 cy . contains ( 'General settings' ) . should ( 'be.visible' ) ;
3325 } ) ;
34-
35- it ( 'test saving SSH key' , ( ) => {
36- cy . byButtonText ( userButtonTxt ) . click ( ) ;
37- cy . byButtonText ( manageKeysText ) . click ( ) ;
38- cy . byButtonText ( manageKeysText )
39- . parent ( )
40- . parent ( )
41- . within ( ( ) => {
42- cy . contains ( authSSHKey , { timeout : 20000 } ) . should ( 'be.visible' ) ;
43- } ) ;
44- // configure public ssh key when it's not configured
45- cy . get ( '.settings-tab__content' ) . then ( ( $body ) => {
46- if ( $body . text ( ) . includes ( 'Select project' ) ) {
47- cy . contains ( 'Select project' ) . click ( ) ;
48- cy . byLegacyTestID ( TEST_NS ) . click ( { force : true } ) ;
49- }
50- } ) ;
51- cy . get ( 'button.project-ssh-row__secret-name' ) . click ( ) ;
52- cy . get ( tabModal ) . within ( ( ) => {
53- cy . get ( addNew ) . click ( ) ;
54- cy . dropFile ( './fixtures/rsa.pub' , 'rsa.pub' , uploadSecret ) ;
55- cy . wait ( 1000 ) ;
56- cy . get ( secretName ) . type ( testSecret ) ;
57- cy . clickSaveBtn ( ) ;
58- } ) ;
59- cy . byButtonText ( testSecret ) . should ( 'exist' ) ;
60- } ) ;
6126} ) ;
0 commit comments