@@ -8,9 +8,9 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
88 var newFilePath ;
99
1010 beforeEach ( function ( ) {
11+ cy . viewport ( 1920 , 1080 ) ;
1112 newFilePath = helper . setupAndLoadDocument ( 'writer/top_toolbar.odt' ) ;
1213 desktopHelper . switchUIToNotebookbar ( ) ;
13- cy . viewport ( 1920 , 1080 ) ;
1414
1515 if ( Cypress . env ( 'INTEGRATION' ) === 'nextcloud' ) {
1616 desktopHelper . showSidebar ( ) ;
@@ -26,7 +26,7 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
2626
2727 it ( 'Apply highlight color.' , function ( ) {
2828 helper . setDummyClipboardForCopy ( ) ;
29- desktopHelper . actionOnSelector ( 'backColor ', ( selector ) => { cy . cGet ( selector ) . click ( ) ; } ) ;
29+ desktopHelper . getNbIconArrow ( 'CharBackColor ', 'Home' ) . click ( ) ;
3030 desktopHelper . selectColorFromPalette ( 'FFB66C' ) ;
3131 writerHelper . selectAllTextOfDoc ( ) ;
3232 helper . copy ( ) ;
@@ -36,20 +36,18 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
3636
3737 it ( 'Apply transparent highlight color.' , function ( ) {
3838 helper . setDummyClipboardForCopy ( ) ;
39- desktopHelper . actionOnSelector ( 'backColor' ,
40- ( selector ) => { cy . cGet ( selector . replace ( '.unoarrow' , '' ) + ' .unobutton' ) . click ( ) ; } ) ;
39+ desktopHelper . getNbIcon ( 'CharBackColor' , 'Home' ) . first ( ) . click ( ) ;
4140 writerHelper . selectAllTextOfDoc ( ) ;
4241 helper . copy ( ) ;
4342 cy . cGet ( '#copy-paste-container p font span' )
4443 . should ( 'have.attr' , 'style' , 'background: transparent' ) ;
45- desktopHelper . actionOnSelector ( 'backColor' ,
46- ( selector ) => { cy . cGet ( selector . replace ( '.unoarrow' , '' ) + ' .selected-color' )
47- . should ( 'have.attr' , 'style' , 'background-color: transparent; border-color: var(--color-border);' ) } ) ;
44+ desktopHelper . getNbIcon ( 'CharBackColor' ) . find ( '.selected-color' )
45+ . should ( 'have.attr' , 'style' , 'background-color: transparent; border-color: var(--color-border);' ) ;
4846 } ) ;
4947
5048 it ( 'Apply font color.' , function ( ) {
5149 helper . setDummyClipboardForCopy ( ) ;
52- desktopHelper . actionOnSelector ( 'fontColor ', ( selector ) => { cy . cGet ( selector ) . click ( ) ; } ) ;
50+ desktopHelper . getNbIconArrow ( 'FontColor ', 'Home' ) . click ( ) ;
5351 desktopHelper . selectColorFromPalette ( '3FAF46' ) ;
5452 writerHelper . selectAllTextOfDoc ( ) ;
5553 helper . copy ( ) ;
0 commit comments