Bugzilla – Attachment 161440 Details for
Bug 32607
Add record sources CRUD
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32607: Add cypress tests
Bug-32607-Add-cypress-tests.patch (text/plain), 2.99 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-01-25 15:44:58 UTC
(
hide
)
Description:
Bug 32607: Add cypress tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-01-25 15:44:58 UTC
Size:
2.99 KB
patch
obsolete
>From 15b459b04c669a0bbd9e342d680d149d9ba80fd7 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 24 Jan 2024 16:18:55 -0300 >Subject: [PATCH] Bug 32607: Add cypress tests > >--- > t/cypress/integration/RecordSources_spec.ts | 69 +++++++++++++++++++++ > 1 file changed, 69 insertions(+) > create mode 100644 t/cypress/integration/RecordSources_spec.ts > >diff --git a/t/cypress/integration/RecordSources_spec.ts b/t/cypress/integration/RecordSources_spec.ts >new file mode 100644 >index 00000000000..6775083e0dd >--- /dev/null >+++ b/t/cypress/integration/RecordSources_spec.ts >@@ -0,0 +1,69 @@ >+import { mount } from "@cypress/vue"; >+const dayjs = require("dayjs"); /* Cannot use our calendar JS code, it's in an include file (!) >+ Also note that moment.js is deprecated */ >+ >+describe("Breadcrumbs tests", () => { >+ beforeEach(() => { >+ cy.login(); >+ cy.title().should("eq", "Koha staff interface"); >+ }); >+ >+ it("Breadcrumbs", () => { >+ cy.visit("/cgi-bin/koha/admin/admin-home.pl"); >+ cy.contains("Record sources").click(); >+ cy.get("#breadcrumbs").contains("Administration"); >+ cy.get(".item-last").contains("Record sources"); >+ // use the 'New' button >+ cy.contains("New record source").click(); >+ cy.wait(500); >+ cy.get(".item-last").contains("Add record source"); >+ cy.get("#breadcrumbs") >+ .contains("Record sources") >+ .should("have.attr", "href") >+ .and("equal", "/cgi-bin/koha/admin/record-sources"); >+ }); >+}); >+ >+describe("Record sources CRUD tests", () => { >+ beforeEach(() => { >+ cy.login(); >+ cy.title().should("eq", "Koha staff interface"); >+ }); >+ >+ it("Add", () => { >+ cy.visit("/cgi-bin/koha/admin/admin-home.pl"); >+ cy.contains("Record sources").click(); >+ // use the 'New' button >+ cy.contains("New record source").click(); >+ // fill the form >+ cy.get("#name").type("Poop"); >+ >+ // Submit the form, get 500 >+ cy.intercept("POST", "/api/v1/record_sources", { >+ statusCode: 201, >+ body: {} >+ }); >+ cy.get("#record_source_edit").contains("Submit").click(); >+ }); >+ >+ it("Edit", () => { >+ cy.visit("/cgi-bin/koha/admin/admin-home.pl"); >+ cy.contains("Record sources").click(); >+ cy.get("#breadcrumbs").contains("Administration"); >+ cy.get(".item-last").contains("Record sources"); >+ }); >+ >+ it("List", () => { >+ cy.visit("/cgi-bin/koha/admin/admin-home.pl"); >+ cy.contains("Record sources").click(); >+ cy.get("#breadcrumbs").contains("Administration"); >+ cy.get(".item-last").contains("Record sources"); >+ }); >+ >+ it("Delete", () => { >+ cy.visit("/cgi-bin/koha/admin/admin-home.pl"); >+ cy.contains("Record sources").click(); >+ cy.get("#breadcrumbs").contains("Administration"); >+ cy.get(".item-last").contains("Record sources"); >+ }); >+}); >-- >2.43.0
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 32607
:
146410
|
146411
|
146412
|
149777
|
149827
|
149828
|
149829
|
154006
|
154007
|
154008
|
154009
|
154010
|
154438
|
155682
|
155683
|
155684
|
155685
|
155686
|
155958
|
157756
|
157757
|
157758
|
157759
|
157760
|
157761
|
157762
|
161362
|
161363
|
161364
|
161365
|
161366
|
161367
|
161435
|
161436
|
161437
|
161438
|
161439
| 161440 |
161441
|
161474