View | Details | Raw Unified | Return to bug 36372
Collapse All | Expand All

(-)a/t/cypress/integration/Catalogue/Detail_spec.ts (-1 / +37 lines)
Line 0 Link Here
0
- 
1
import { mount } from "@cypress/vue";
2
const dayjs = require("dayjs"); /* Cannot use our calendar JS code, it's in an include file (!)
3
                                   Also note that moment.js is deprecated */
4
5
describe("Set record_source button is present", () => {
6
    before(() => {
7
        cy.login();
8
        cy.title().should("eq", "Koha staff interface");
9
        cy.visit("/cgi-bin/koha/admin/record_sources");
10
        cy.contains("New record source").click();
11
        cy.get("#name").type("Poop");
12
        cy.get("#record_source_edit").contains("Submit").click();
13
    });
14
15
    after(() => {
16
        cy.visit("/cgi-bin/koha/cataloguing/record_source.pl?biblionumber=51");
17
        cy.get("select").select("No specified source");
18
        cy.get("input[type=submit]").click();   
19
20
        cy.intercept("GET", '/api/v1/record_sources*').as('listSources')
21
        cy.visit("/cgi-bin/koha/admin/record_sources");
22
        cy.wait('@listSources')
23
        cy.get("tr:last-child a.delete").click();
24
        cy.contains("Poop");
25
        cy.get("button.approve").click();
26
    });
27
28
    it("Set record source", () => {
29
        cy.visit("/cgi-bin/koha/catalogue/detail.pl?biblionumber=51");
30
        cy.contains("Edit").click();
31
        cy.contains("Set record source").click();
32
        cy.get("#record_source_id").select("Poop");
33
        cy.contains("Set record source").click();
34
        cy.visit("/cgi-bin/koha/catalogue/detail.pl?biblionumber=51");
35
        cy.get("#catalogue_detail_record_source").contains("Poop");
36
    });
37
});

Return to bug 36372