Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chained relation puts for campaign to avoid deadlocks #234

Merged
merged 8 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

- [#234](https://github.com/os2display/display-admin-client/pull/234)
- Cleaned up code flow in playlist saving.
- Changed to chaining relations puts.
- [#235](https://github.com/os2display/display-admin-client/pull/235)
- Added roles to users list.
- [#233](https://github.com/os2display/display-admin-client/pull/233)
Expand Down
20 changes: 0 additions & 20 deletions src/components/playlist/campaign.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,26 +76,6 @@ describe("Campaign pages work", () => {
cy.get("#slides-section").find("tbody").should("not.exist");
});

it("It displays success toast on save", () => {
// Mock successful response on post
cy.intercept("PUT", "**/playlists/*", {
statusCode: 201,
fixture: "playlists/playlist-successful.json",
});

// Mock successful response on get
cy.intercept("GET", "**/playlists/*", {
fixture: "playlists/playlist-successful.json",
});

cy.visit("/campaign/edit/123");

// Displays success toast and redirects
cy.get(".Toastify").find(".Toastify__toast--success").should("not.exist");
cy.get("#save_playlist").click();
cy.get(".Toastify").find(".Toastify__toast--success").contains("gemt");
});

it("It display error toast on save error", () => {
// Mock error response on post
cy.intercept("PUT", "**/playlists/*", {
Expand Down
Loading
Loading