PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.19
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.19
1.4.19 1.4.18 1.4.17 1.4.16 1.4.15 1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 1.3.51 1.3.50 All 182 releases
disco / backend / views / components / Analytics / __tests__ / layout / CustomerNotFound.test.jsx

CustomerNotFound.test.jsx in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.4.19, at backend/views/components/Analytics/__tests__/layout/CustomerNotFound.test.jsx

31 lines 915 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import '@testing-library/jest-dom';
2 import { screen } from '@testing-library/react';
3 import CustomerNotFound from '../../components/customers/CustomerNotFound';
4 import { renderWithProviders } from '../setup/helpers';
5
6 describe('CustomerNotFound', () => {
7 it('renders the not found heading', () => {
8 renderWithProviders(<CustomerNotFound />);
9
10 expect(screen.getByText('Customer not found')).toBeInTheDocument();
11 });
12
13 it('renders the description message', () => {
14 renderWithProviders(<CustomerNotFound />);
15
16 expect(
17 screen.getByText(
18 "This customer doesn't exist or has no campaign order history."
19 )
20 ).toBeInTheDocument();
21 });
22
23 it('renders a link back to customers list', () => {
24 renderWithProviders(<CustomerNotFound />);
25
26 const link = screen.getByText('Back to Customers');
27 expect(link).toBeInTheDocument();
28 expect(link.closest('a')).toHaveAttribute('href', '/customers');
29 });
30 });
31