Below is my code, when I use this cypress test, I am getting the error Cypress error The chainer colored was not found. Could not build assertion.
import chai from 'chai';
import chaiColors from 'chai-colors';
chai.use(chaiColors);
const toasts = [
{ _id: '1', message: 'success toast notification', type: 'success' },
{ _id: '2', message: '2 success toast notification', type: 'error' },
{ _id: '3', message: 'error toast notification', type: 'error' },
];
describe('Toast.cy.tsx', () => {
it('Toast component renders toasts properly', () => {
themedMount(<Toast toasts={toasts} />);
toasts.forEach((t) => {
const toastElement = cy.contains(t.message);
toastElement
.should('have.css', 'background-color')
.and('be.colored', '#fbcfc8');
});
});
});