PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.12
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.12
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__ / pages / NotFound.test.jsx

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

31 lines 837 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 NotFound from '../../pages/NotFound';
4 import { renderWithProviders } from '../setup/helpers';
5
6 describe('NotFound', () => {
7 it('renders the not found heading', () => {
8 renderWithProviders(<NotFound />);
9
10 expect(screen.getByText('Page not found')).toBeInTheDocument();
11 });
12
13 it('renders the description message', () => {
14 renderWithProviders(<NotFound />);
15
16 expect(
17 screen.getByText(
18 "The page you're looking for doesn't exist or has been moved."
19 )
20 ).toBeInTheDocument();
21 });
22
23 it('renders a link back to the dashboard', () => {
24 renderWithProviders(<NotFound />);
25
26 const link = screen.getByText('Back to Dashboard');
27 expect(link).toBeInTheDocument();
28 expect(link.closest('a')).toHaveAttribute('href', '/');
29 });
30 });
31