11import { test } from "./fixtures/lxd-test" ;
2+ import { getClipPosition } from "./helpers/doc-screenshots" ;
23import { gotoURL } from "./helpers/navigate" ;
34import { createPool , deletePool } from "./helpers/storagePool" ;
45
@@ -9,17 +10,6 @@ test.beforeEach(() => {
910 ) ;
1011} ) ;
1112
12- // x,y is top left coordinate, xx,yy is bottom right coordinate
13- // gimp provides the coordinates of the area easily
14- const getClipPosition = ( x : number , y : number , xx : number , yy : number ) => {
15- return {
16- x : x ,
17- y : y ,
18- width : xx - x ,
19- height : yy - y ,
20- } ;
21- } ;
22-
2313//Run in a clustered backend
2414
2515test ( "clustered storage pools" , async ( { page } ) => {
@@ -64,3 +54,25 @@ test("Clustered storage volumes", async ({ page }) => {
6454 } ) ;
6555 await deletePool ( page , poolName ) ;
6656} ) ;
57+
58+ test ( "LXD - UI Folder - Clustered" , async ( { page } ) => {
59+ //This test assumes that there is a cluster member named micro2 within the environment. This is the value within the original screenshot, but it can also be changed to accomodate alternative names.
60+ const clusterMemberName = "micro2" ;
61+ page . setViewportSize ( { width : 1440 , height : 800 } ) ;
62+ await gotoURL ( page , "/ui/" ) ;
63+ await page . getByRole ( "link" , { name : "Instances" , exact : true } ) . click ( ) ;
64+ await page . getByText ( "Create instance" ) . click ( ) ;
65+ await page . getByPlaceholder ( "Enter name" ) . fill ( "Ubuntu-vm-server2" ) ;
66+ await page . getByRole ( "button" , { name : "Browse images" } ) . click ( ) ;
67+ await page
68+ . locator ( "tr" )
69+ . filter ( { hasText : "Ubuntu24.04 LTSnoblealldefaultUbuntuSelect" } )
70+ . getByRole ( "button" )
71+ . click ( ) ;
72+ await page . getByLabel ( "Cluster member" ) . selectOption ( clusterMemberName ) ;
73+ await page . getByLabel ( "Cluster member" ) . dblclick ( ) ;
74+ await page . screenshot ( {
75+ path : "tests/screenshots/doc/images/ui/create_instance_ex4.png" ,
76+ clip : getClipPosition ( 240 , 0 , 1440 , 760 ) ,
77+ } ) ;
78+ } ) ;
0 commit comments