File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed
src/frontend/apps/e2e/__tests__/app-impress Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ export const createRootSubPage = async (
4040 . getByTestId ( `doc-sub-page-item-${ subPageJson . id } ` )
4141 . first ( ) ;
4242 await expect ( subPageItem ) . toBeVisible ( ) ;
43- await clickLocatorEvenIfOutOfViewport ( subPageItem ) ;
4443
4544 if ( isMobile ) {
4645 await closeHeaderMenu ( page ) ;
@@ -54,28 +53,6 @@ export const createRootSubPage = async (
5453 return { name : randomDocs [ 0 ] , docTreeItem : subPageItem , item : subPageJson } ;
5554} ;
5655
57- const clickLocatorEvenIfOutOfViewport = async ( locator : Locator ) => {
58- await locator . scrollIntoViewIfNeeded ( ) ;
59- try {
60- await locator . click ( { force : true } ) ;
61- } catch ( error ) {
62- if (
63- error instanceof Error &&
64- error . message . includes ( 'outside of the viewport' )
65- ) {
66- const elementHandle = await locator . elementHandle ( ) ;
67- if ( ! elementHandle ) {
68- throw error ;
69- }
70- await elementHandle . evaluate ( ( element ) =>
71- ( element as HTMLElement ) . click ( ) ,
72- ) ;
73- } else {
74- throw error ;
75- }
76- }
77- } ;
78-
7956export const clickOnAddRootSubPage = async ( page : Page ) => {
8057 const rootItem = page . getByTestId ( 'doc-tree-root-item' ) ;
8158 await expect ( rootItem ) . toBeVisible ( ) ;
You can’t perform that action at this time.
0 commit comments