Skip to content

Commit

Permalink
Merge pull request #3201 from serlo/e2e-fix-landing-test
Browse files Browse the repository at this point in the history
fix(e2e): make landing test more resilient
  • Loading branch information
elbotho authored Dec 13, 2023
2 parents 06b1f56 + 338c017 commit 2539a8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/web/src/components/navigation/breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function Breadcrumbs({
noIcon,
}: BreadcrumbsProps) {
return (
<nav className="mx-side mt-5 sm:mb-11 sm:ml-2.5">
<nav className="mx-side mt-5 sm:mb-11 sm:ml-2.5" data-qa="breadcrumbs">
{data &&
data.map((bcEntry, i) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/codecept.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const isChromium = browser === 'chromium'

exports.config = {
tests: 'tests/**.ts',
output: './output', // we are not using any artifacts right now, but still need an output directory
output: './output',
helpers: {
Playwright: {
url: frontendUrl,
Expand Down
5 changes: 3 additions & 2 deletions e2e-tests/tests/100-learners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ async function testLandingPage(I: CodeceptJS.I, data: LandingPageData) {
// Use icon
I.click(data.iconSelector)

I.see(data.headingText)
I.waitForText(data.headingText, 5)

// Visit taxonomy
I.click('Alle Themen')
I.click(data.taxRootName, 'nav > a')
I.waitForElement('$breadcrumbs', 5)
I.click(data.taxRootName, locate('$breadcrumbs').withChild('a'))

// Check correct filter
I.click(subjectQuickbarSelector)
Expand Down

0 comments on commit 2539a8f

Please sign in to comment.