Bugzilla – Attachment 187835 Details for
Bug 40982
Basket: Orders table — "Modify" and "Cancel order" columns missing or displayed incorrectly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40982: Add Cypress tests
Bug-40982-Add-Cypress-tests.patch (text/plain), 3.79 KB, created by
Jonathan Druart
on 2025-10-13 12:17:02 UTC
(
hide
)
Description:
Bug 40982: Add Cypress tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-10-13 12:17:02 UTC
Size:
3.79 KB
patch
obsolete
>From d419b22a526656d2dfca76186cce7686854fb69a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 13 Oct 2025 14:14:24 +0200 >Subject: [PATCH] Bug 40982: Add Cypress tests > >--- > .../integration/KohaTable/KohaTable_spec.ts | 77 +++++++++++++++++++ > 1 file changed, 77 insertions(+) > >diff --git a/t/cypress/integration/KohaTable/KohaTable_spec.ts b/t/cypress/integration/KohaTable/KohaTable_spec.ts >index a53974f2560..a1d6f7b650c 100644 >--- a/t/cypress/integration/KohaTable/KohaTable_spec.ts >+++ b/t/cypress/integration/KohaTable/KohaTable_spec.ts >@@ -206,6 +206,83 @@ describe("kohaTable (using REST API)", () => { > }); > }); > >+ it("Force visibility of one column", () => { >+ build_libraries().then(() => { >+ cy.visit("/cgi-bin/koha/admin/branches.pl"); >+ >+ // default settings: show "Code" >+ cy.mock_table_settings({ >+ default_save_state: 1, >+ columns: { library_code: { is_hidden: 0 } }, >+ }); >+ >+ cy.get("@columns").then(columns => { >+ cy.get(`#${table_id} th`).should( >+ "have.length", >+ columns.length >+ ); >+ cy.get(`#${table_id} th`).contains("Name"); >+ cy.get(`#${table_id} th`).contains("Code"); >+ >+ // Hide "Code" >+ cy.get(`#${table_id}_wrapper .buttons-colvis`).click(); >+ cy.get(`#${table_id}_wrapper .dt-button-collection`) >+ .contains("Code") >+ .click(); >+ cy.get(`#${table_id} th`).should( >+ "have.length", >+ columns.length - 1 >+ ); >+ cy.get(`#${table_id} th`).contains("Name"); >+ cy.get(`#${table_id} th`) >+ .contains("Code") >+ .should("not.exist"); >+ }); >+ >+ // "Code" has been hidden by the user >+ cy.visit("/cgi-bin/koha/admin/branches.pl"); >+ >+ // But we want to display it >+ cy.mock_table_settings({ >+ default_save_state: 1, >+ columns: { >+ library_code: { is_hidden: 0, force_visibility: 1 }, >+ }, >+ }); >+ >+ cy.get("@columns").then(columns => { >+ cy.get(`#${table_id} th`).should( >+ "have.length", >+ columns.length >+ ); >+ // Both are shown >+ cy.get(`#${table_id} th`).contains("Name"); >+ cy.get(`#${table_id} th`).contains("Code"); >+ }); >+ >+ // Now hide it >+ cy.visit("/cgi-bin/koha/admin/branches.pl"); >+ >+ cy.mock_table_settings({ >+ default_save_state: 1, >+ columns: { >+ library_code: { is_hidden: 1, force_visibility: 1 }, >+ }, >+ }); >+ >+ cy.get("@columns").then(columns => { >+ cy.get(`#${table_id} th`).should( >+ "have.length", >+ columns.length - 1 >+ ); >+ cy.get(`#${table_id} th`).contains("Name"); >+ cy.get(`#${table_id} th`) >+ .contains("Code") >+ .should("not.exist"); >+ }); >+ }); >+ }); >+ > it("Shareable link", { scrollBehavior: false }, () => { > build_libraries().then(() => { > cy.visit("/cgi-bin/koha/admin/branches.pl"); >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40982
:
187651
|
187711
|
187712
|
187724
|
187726
|
187735
|
187736
|
187737
|
187738
|
187833
|
187834
|
187835
|
187986
|
187987
|
187988
|
187989
|
187990
|
187991