Skip to content

Commit

Permalink
feat(KUI-1600): update test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
amirhossein-haerian committed Nov 20, 2024
1 parent 6ef8318 commit b32a0dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions public/js/app/pages/__tests__/AboutCourseMemoEN.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('User language: English. Component <AboutCourseMemo> show all memos: pd
const mainContent = screen.getByRole('main')

const allH3Headers = within(mainContent).getAllByRole('heading', { level: 3 })
expect(allH3Headers.length).toBe(5)
expect(allH3Headers.length).toBe(4)
const expectedh3ds = [
'Course offerings starting Autumn 2020',
'Course offerings starting Autumn 2019',
Expand All @@ -109,7 +109,7 @@ describe('User language: English. Component <AboutCourseMemo> show all memos: pd

test('renders text about empty fields (Course Contact, Examiner) ', () => {
const noInfo = getAllByText('No information inserted')
expect(noInfo.length).toBe(2)
expect(noInfo.length).toBe(1)
})

test('renders menu link of web-based memo as expected', () => {
Expand Down
7 changes: 1 addition & 6 deletions public/js/app/pages/__tests__/AboutCourseMemoSV.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('User language: Swedish. Component <AboutCourseMemo> show all memos: pd
test('renders h3 ', () => {
const mainContent = screen.getByRole('main')
const allH3Headers = within(mainContent).getAllByRole('heading', { level: 3 })
expect(allH3Headers.length).toBe(5)
expect(allH3Headers.length).toBe(4)
const expectedh3ds = [
'Kursomgångar som startar HT 2020',
'Kursomgångar som startar HT 2019',
Expand All @@ -108,11 +108,6 @@ describe('User language: Swedish. Component <AboutCourseMemo> show all memos: pd
expectedh4ds.map((h4, index) => expect(allH4Headers[index]).toHaveTextContent(h4))
})

test('renders text about empty fields (Kontaktperson) ', () => {
const noInfo = getAllByText('Ingen information tillagd')
expect(noInfo.length).toBe(1)
})

test('renders menu link of web-based memo as expected', done => {
const menuItems = getAllByText('Course memo Autumn 2019-1')
expect(menuItems.length).toBe(2)
Expand Down

0 comments on commit b32a0dc

Please sign in to comment.