Additional fixes
This commit is contained in:
parent
8a7453ce0e
commit
3f7b27c266
|
|
@ -1,6 +1,6 @@
|
|||
import { login } from "./helpers";
|
||||
|
||||
describe("notifications.cy.js", () => {
|
||||
describe("notification list page", () => {
|
||||
beforeEach(() => {
|
||||
cy.manageCommand("cypress_reset");
|
||||
cy.manageCommand("create_default_notifications");
|
||||
|
|
@ -9,6 +9,7 @@ describe("notifications.cy.js", () => {
|
|||
it("can paginate notifications", () => {
|
||||
login("admin", "test");
|
||||
cy.visit("/notifications");
|
||||
cy.wait(2000);
|
||||
|
||||
cy.get('[data-cy="no-notifications"]').should("not.exist");
|
||||
cy.get("[data-cy^=notification-idx-]").should("have.length", 7);
|
||||
|
|
@ -21,8 +22,7 @@ describe("notifications.cy.js", () => {
|
|||
|
||||
// We load additional 7 notifications
|
||||
cy.get('[data-cy="load-more-notifications"]').click();
|
||||
cy.get("[data-cy^=notification-idx-]").should("have.length", 13);
|
||||
cy.get('[data-cy="load-more-notifications"]').should("not.exist");
|
||||
cy.get("[data-cy^=notification-idx-]").should("have.length", 14);
|
||||
|
||||
for (let i = 0; i < 7; i++) {
|
||||
cy.get(`[data-cy=notification-idx-${i}]`).within(() => {
|
||||
|
|
@ -109,6 +109,9 @@ describe("email notification settings", () => {
|
|||
cy.get('[data-cy="it-checkbox-USER_INTERACTION"]')
|
||||
.should("exist")
|
||||
.check({ force: true });
|
||||
cy.get('[data-cy="it-checkbox-USER_INTERACTION"]')
|
||||
.should("exist")
|
||||
.should("be.checked");
|
||||
|
||||
cy.reload();
|
||||
cy.wait(1000);
|
||||
|
|
|
|||
|
|
@ -55,15 +55,17 @@ const _ = Cypress._;
|
|||
Cypress.Commands.add("manageCommand", (command, preCommand = "") => {
|
||||
const execCommand = `${preCommand} python server/manage.py ${command} --settings=config.settings.test_cypress`;
|
||||
console.log(execCommand);
|
||||
return cy
|
||||
.exec(
|
||||
// hack to add my asdf python instance to the path
|
||||
// so I can run the test directly from within IntelliJ
|
||||
`PATH=/Users/daniel/workspace/vbv_lernwelt/.direnv/python-3.10.6/bin:$PATH && ${execCommand}`,
|
||||
{
|
||||
failOnNonZeroExit: false,
|
||||
}
|
||||
)
|
||||
let pythonPaths = [
|
||||
"/Users/daniel/workspace/vbv_lernwelt/.direnv/python-3.10.6/bin",
|
||||
"/Users/eliabieri/iterativ/vbv_lernwelt/.direnv/python-3.10.6/bin",
|
||||
];
|
||||
let bashCommand = `PATH=${pythonPaths.join(":")}:$PATH && ${execCommand}`;
|
||||
return cy
|
||||
.exec(`bash -c "${bashCommand}"`, {
|
||||
failOnNonZeroExit: true,
|
||||
})
|
||||
.then((result) => {
|
||||
if (result.code) {
|
||||
throw new Error(`Execution of "${command}" failed
|
||||
|
|
|
|||
Loading…
Reference in New Issue