1
1
2
2
import { expect , test } from '@playwright/test' ;
3
- import { checkColumnCellsHaveExpectedValues , checkOpenTaskpane , clickButtonAndAwaitResponse , clickTab , getMitoFrame , getMitoFrameWithTestCSV } from '../utils' ;
3
+ import { awaitResponse , checkColumnCellsHaveExpectedValues , checkOpenTaskpane , clickButtonAndAwaitResponse , clickTab , getMitoFrame , getMitoFrameWithTestCSV } from '../utils' ;
4
4
5
5
const openImportTaskpaneAndSelectData = async ( mito : any , file : string ) => {
6
6
await mito . locator ( '.mito-toolbar-button' , { hasText : 'Import' } ) . click ( ) ;
@@ -9,7 +9,7 @@ const openImportTaskpaneAndSelectData = async (mito: any, file: string) => {
9
9
}
10
10
11
11
test . describe ( 'File Import Taskpane' , ( ) => {
12
-
12
+
13
13
test ( 'Test import CSV file' , async ( { page } ) => {
14
14
const mito = await getMitoFrameWithTestCSV ( page ) ;
15
15
await clickTab ( page , mito , 'Data' ) ;
@@ -20,8 +20,7 @@ test.describe('File Import Taskpane', () => {
20
20
21
21
test ( 'Test import CSV File with double click' , async ( { page } ) => {
22
22
const mito = await getMitoFrame ( page ) ;
23
- await mito . getByRole ( 'button' , { name : 'Import Files' } ) . click ( ) ;
24
- await mito . getByText ( 'test.csv' ) . dblclick ( ) ;
23
+ await openImportTaskpaneAndSelectData ( mito , 'test.csv' )
25
24
await expect ( mito . getByTitle ( 'Column1' ) ) . toBeVisible ( ) ;
26
25
} ) ;
27
26
@@ -146,7 +145,8 @@ test.describe('File Import Taskpane', () => {
146
145
const mito = await getMitoFrame ( page ) ;
147
146
148
147
// Open the configure taskpane for the csv with special delimiters
149
- await mito . getByText ( 'Import Files' ) . click ( ) ;
148
+ await mito . locator ( '.mito-toolbar-button' , { hasText : 'Import' } ) . click ( ) ;
149
+ await mito . locator ( '.mito-dropdown-item' , { hasText : 'Import Files' } ) . click ( ) ;
150
150
await mito . getByText ( 'semicolon-delimiter.csv' ) . click ( ) ;
151
151
await mito . getByText ( 'Configure' ) . click ( ) ;
152
152
0 commit comments