From e17d0b98b1c89e2170a68c5693ffc624956941ae Mon Sep 17 00:00:00 2001 From: grace Date: Tue, 5 Nov 2024 00:14:39 +0800 Subject: [PATCH] Cypress tests for status bar and layout background --- cypress/support/commands.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 3a4108b415..b0bc432ed8 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -865,6 +865,28 @@ Cypress.Commands.add('openToolbarMenuForPlaylist', function(menuIdx) { }); }); +// Open Options Menu within the Layout Editor +Cypress.Commands.add('openOptionsMenu', () => { + cy.get('.navbar-submenu') + .should('be.visible') + .within(() => { + cy.get('#optionsContainerTop') + .should('be.visible') + .and('not.be.disabled') + .click({force: true}) + .should('have.attr', 'aria-expanded', 'true'); + }); +}); + +// Open Row Menu of the first item on the Layouts page +Cypress.Commands.add('openRowMenu', () => { + cy.get('#layouts tbody tr').first().within(() => { + cy.get('.btn-group .btn.dropdown-toggle') + .click() + .should('have.attr', 'aria-expanded', 'true'); + }); +}); + /** * Update data on CKEditor instance