fix: use modal instead of menu inside of a split pane

Closes #234
This commit is contained in:
Jovan Krunić
2025-07-04 19:02:47 +02:00
committed by Jovan Krunić
parent bbd6b0f874
commit 362f6adf07
13 changed files with 490 additions and 544 deletions

View File

@@ -14,6 +14,8 @@
*/
describe('context menu', function () {
const contextMenuSelector = 'stapps-context-menu-modal';
beforeEach(function () {
cy.interceptSearch({
extends: {query: 'a'},
@@ -33,21 +35,21 @@ describe('context menu', function () {
});
it('should sort', function () {
cy.get('stapps-context').within(() => {
cy.get(contextMenuSelector).within(() => {
cy.contains('ion-item', 'Name').click();
cy.wait('@search');
});
});
it('should filter', function () {
cy.get('stapps-context').within(() => {
cy.get(contextMenuSelector).within(() => {
cy.contains('ion-item', '(17) Akademische Veranstaltung').click();
cy.wait('@search');
});
});
it('should have a working delete button', function () {
cy.get('stapps-context').within(() => {
cy.get(contextMenuSelector).within(() => {
cy.contains('ion-item', '(17) Akademische Veranstaltung').click();
cy.get('.checkbox-checked').should('have.length', 1);
@@ -60,7 +62,7 @@ describe('context menu', function () {
it('should truncate long category items', function () {
cy.contains('ion-list', 'Akademische Veranstaltung / Kategorien').within(() => {
cy.contains('ion-item', '(1) Tutorium').should('not.exist');
cy.get('div > ion-button').click();
cy.get('ion-button').click();
cy.contains('ion-item', '(1) Tutorium').should('exist');
});
});