@@ -12,7 +12,7 @@ test.afterEach(async () => {
12
12
gitbutler ?. destroy ( ) ;
13
13
} ) ;
14
14
15
- test ( 'move branch to top of other stack' , async ( { page, context } , testInfo ) => {
15
+ test ( 'move branch to top of other stack and tear it off ' , async ( { page, context } , testInfo ) => {
16
16
const workdir = testInfo . outputPath ( 'workdir' ) ;
17
17
const configdir = testInfo . outputPath ( 'config' ) ;
18
18
gitbutler = await startGitButler ( workdir , configdir , context ) ;
@@ -51,6 +51,23 @@ test('move branch to top of other stack', async ({ page, context }, testInfo) =>
51
51
await expect ( stacks ) . toHaveCount ( 1 ) ;
52
52
branchHeaders = page . getByTestId ( 'branch-header' ) ;
53
53
await expect ( branchHeaders ) . toHaveCount ( 2 ) ;
54
+
55
+ // Now tear off branch2
56
+ const updatedBranch1Locator = branchHeaders . filter ( { hasText : 'branch2' } ) ;
57
+ const stackDropzone = await waitForTestId ( page , 'stack-offlane-dropzone' ) ;
58
+ await dragAndDropByLocator ( page , updatedBranch1Locator , stackDropzone , {
59
+ force : true ,
60
+ position : {
61
+ x : 10 ,
62
+ y : 10
63
+ }
64
+ } ) ;
65
+
66
+ // Should have two stacks again
67
+ stacks = page . getByTestId ( 'stack' ) ;
68
+ await expect ( stacks ) . toHaveCount ( 2 ) ;
69
+ branchHeaders = page . getByTestId ( 'branch-header' ) ;
70
+ await expect ( branchHeaders ) . toHaveCount ( 2 ) ;
54
71
} ) ;
55
72
56
73
test ( 'move branch to the middle of other stack' , async ( { page, context } , testInfo ) => {
0 commit comments