Skip to content

Commit

Permalink
test: change class regex not to include ant
Browse files Browse the repository at this point in the history
  • Loading branch information
shootermv committed Nov 16, 2023
1 parent 5a225b7 commit 1a2b33e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 151 deletions.
8 changes: 8 additions & 0 deletions src/layout/sidebar/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import './sidebar.scss'
import { Drawer, Layout } from 'antd'
import { useContext, useState } from 'react'
import { LayoutContextInterface, LayoutCtx } from '../LayoutContext'
import GitHubLink from './GitHubLink/GitHubLink'

const { Sider } = Layout

Expand All @@ -26,7 +27,11 @@ export default function SideBar() {
open={drawerOpen}
className="hideOnDesktop"
bodyStyle={{ padding: '0' }}>
<Logo />
<div className="sidebar-divider"></div>
<Menu />
<div className="sidebar-divider"></div>
<GitHubLink />
</Drawer>
<Sider
theme="light"
Expand All @@ -37,7 +42,10 @@ export default function SideBar() {
onCollapse={(value: boolean) => setCollapsed(value)}
className="hideOnMobile">
{collapsed ? <CollapsedLogo /> : <Logo />}
<div className="sidebar-divider"></div>
<Menu />
<div className="sidebar-divider"></div>
<GitHubLink />
</Sider>
</>
)
Expand Down
11 changes: 11 additions & 0 deletions src/layout/sidebar/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,15 @@
border-bottom: 8px solid gray;
padding-bottom: 0;
line-height: 25px;
}

.sidebar-section {
display: flex;
flex-direction: column;
}

.sidebar-divider {
height: 1px;
background-color: #ccc;
margin: 8px 0;
}
41 changes: 0 additions & 41 deletions src/pages/components/header/sidebar/SideBar.tsx

This file was deleted.

109 changes: 0 additions & 109 deletions src/pages/components/header/sidebar/sidebar.scss

This file was deleted.

2 changes: 1 addition & 1 deletion tests/about.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test.describe('About Page Tests', () => {
await page.getByText('אודות').click()
await expect(page).toHaveURL('http://localhost:3000/about')
const locator = await page.locator('li:has-text("אודות")')
await expect(locator).toHaveClass(/ant-menu-item-selected/)
await expect(locator).toHaveClass(/menu-item-selected/)
})
test('page display title `מהו אתר “דאטאבוס”?`', async ({ page }) => {
await page.goto('/about')
Expand Down

0 comments on commit 1a2b33e

Please sign in to comment.