@@ -19,43 +19,25 @@ test('Create Collection', async ({ page }) => {
19
19
const collectionName = generateRandomCollectionName ( ) ;
20
20
// ------------code from playwright------------ //
21
21
await page . getByRole ( 'img' ) . first ( ) . click ( ) ;
22
- console . log ( 'clicked on the sidebar menu icon' ) ;
23
22
await page . locator ( '#tippy-2' ) . getByText ( 'Create Collection' ) . click ( ) ;
24
- console . log ( 'clicked on the create collection' ) ;
25
23
await page . getByLabel ( 'Name' ) . click ( ) ;
26
24
await page . getByLabel ( 'Name' ) . fill ( collectionName ) ;
27
- console . log ( 'filled the collection name' ) ;
28
25
await page . getByLabel ( 'Name' ) . press ( 'Tab' ) ;
29
- console . log ( 'pressed tab' ) ;
30
26
await page . getByLabel ( 'Location' ) . fill ( await collection_location ) ;
31
27
await page . getByRole ( 'button' , { name : 'Create' , exact : true } ) . click ( ) ;
32
- console . log ( 'clicked on the create button' ) ;
28
+
33
29
//await page.pause();
34
- await page . waitForTimeout ( 1000 ) ;
35
30
await expect ( page . getByText ( collectionName ) ) . toBeVisible ( ) ;
36
- console . log ( 'collection verified successfully' ) ;
37
- await page . waitForTimeout ( 1000 ) ;
38
31
39
32
// duplicate collection creation to verify the error.
40
33
await page . getByRole ( 'img' ) . first ( ) . click ( ) ;
41
- console . log ( 'clicked on the sidebar menu icon' ) ;
42
34
await page . locator ( '#tippy-2' ) . getByText ( 'Create Collection' ) . click ( ) ;
43
- console . log ( 'clicked on the create collection' ) ;
44
35
await page . getByLabel ( 'Name' ) . click ( ) ;
45
36
await page . getByLabel ( 'Name' ) . fill ( collectionName ) ;
46
- console . log ( 'filled the collection name' ) ;
47
37
await page . getByLabel ( 'Name' ) . press ( 'Tab' ) ;
48
- console . log ( 'pressed tab' ) ;
49
38
await page . getByLabel ( 'Location' ) . fill ( collection_location ) ;
50
39
await page . getByRole ( 'button' , { name : 'Create' , exact : true } ) . click ( ) ;
51
- console . log ( 'clicked on the create button' ) ;
52
- console . log ( 'log message' ) ;
53
- console . error ( 'error message' ) ;
54
-
55
- //await page.pause();
56
- await page . waitForTimeout ( 500 ) ;
57
40
await expect ( page . getByText ( 'An error occurred while' ) ) . toBeVisible ( ) ;
58
- console . log ( 'collection already exists error verified successfully' ) ;
59
41
60
42
execSync ( `rm -rf ${ collection_location } /${ collectionName } ` ) ;
61
43
} ) ;
0 commit comments