Skip to content

neeto-ui-toastr class missing on thumbs up toast due to className override #2819

@manask-pradhan

Description

@manask-pradhan

Problem
When an API response contains showThumbsUpToastr: true or noticeCode: "thumbs_up", the axios interceptor fires:

https://github.com/neetozone/neeto-commons-frontend/blob/3dd8c39b539f5cfde419da1541e6ab3600f96a3f/src/initializers/axiosInitializer/index.js#L79-L89

Toastr.success("", { icon: "👍", className: "w-20" })

The customConfig { icon: "👍", className: "w-20" } is parsed to the Toast config:

Toastr config merge code

const config = {
  ...TOAST_CONFIG,          // className: "neeto-ui-toastr"
  ...customConfig,         // className: "w-20" overwrites
};

Issue: The resulting DOM element has className="w-20" but not className="neeto-ui-toastr", causing test failures for verifyToast in NeetoPlaywrightCommons (which expects the default class).


Solution
Fix the merging logic so that className is always merged (default + custom), not overwritten.

This ensures all Toast DOM elements retain the required neeto-ui-toastr class even when given custom className.

caught-by-playwright _t

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions