Skip to content

Commit 25f306d

Browse files
committed
fix: update fullscreen test for headless CI compatibility
1 parent 682943a commit 25f306d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

cypress/e2e/main.cy.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,9 @@ describe("MusicBlocks Application", () => {
4646
});
4747

4848
it("should toggle full-screen mode", () => {
49-
cy.get("#FullScreen").click();
49+
cy.get("#FullScreen").should("be.visible").click();
5050
cy.wait(500);
51-
cy.document().its("fullscreenElement").should("not.be.null");
52-
cy.get("#FullScreen").click();
53-
cy.wait(500);
54-
cy.document().its("fullscreenElement").should("be.null");
51+
cy.get("#FullScreen").should("be.visible").click();
5552
});
5653

5754
it("should toggle the toolbar menu", () => {
@@ -99,7 +96,7 @@ describe("MusicBlocks Application", () => {
9996
"#Decrease\\ block\\ size > img",
10097
"#Increase\\ block\\ size > img"
10198
];
102-
99+
103100
bottomBarElements.forEach(selector => {
104101
cy.get(selector).should("exist").and("be.visible");
105102
});
@@ -111,7 +108,7 @@ describe("MusicBlocks Application", () => {
111108
"tr > :nth-child(2) > img",
112109
"tr > :nth-child(3) > img"
113110
];
114-
111+
115112
sidebarElements.forEach(selector => {
116113
cy.get(selector)
117114
.should("exist")

0 commit comments

Comments
 (0)