feat: sort journeys by the last edit date instead of the date created #30194
Annotations
6 errors and 10 warnings
run tests:
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx#L31
TestingLibraryElementError: Unable to find an element with the text: January 1, 2021 - a published journey. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<span
class="MuiBadge-root css-12zozd9-MuiBadge-root"
data-testid="new-journey-badge"
>
<div
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom MuiTypography-noWrap css-1n8slvo-MuiTypography-root"
>
Published Journey Heading
</div>
<span
class="MuiBadge-badge MuiBadge-standard MuiBadge-invisible MuiBadge-anchorOriginTopRight MuiBadge-anchorOriginTopRightRectangular MuiBadge-overlapRectangular css-z28gz6-MuiBadge-badge"
/>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-noWrap css-1u8gm7p-MuiTypography-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-mpaqru-MuiTypography-root"
>
4 years ago
</span>
- a published journey
</span>
</div>
</body>
at Object.getElementError (../../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx:31:7)
|
run tests:
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx#L42
TestingLibraryElementError: Unable to find an element with the text: January 1, 2021. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<span
class="MuiBadge-root css-12zozd9-MuiBadge-root"
data-testid="new-journey-badge"
>
<div
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom MuiTypography-noWrap css-1n8slvo-MuiTypography-root"
>
Default Journey Heading
</div>
<span
class="MuiBadge-badge MuiBadge-standard MuiBadge-invisible MuiBadge-anchorOriginTopRight MuiBadge-anchorOriginTopRightRectangular MuiBadge-overlapRectangular css-z28gz6-MuiBadge-badge"
/>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-noWrap css-1u8gm7p-MuiTypography-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-mpaqru-MuiTypography-root"
>
4 years ago
</span>
</span>
</div>
</body>
at Object.getElementError (../../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx:42:12)
|
run tests:
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx#L53
TestingLibraryElementError: Unable to find an element with the text: November 19, 2020 - Journey created before the current year should also show the year in the date. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<span
class="MuiBadge-root css-12zozd9-MuiBadge-root"
data-testid="new-journey-badge"
>
<div
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom MuiTypography-noWrap css-1n8slvo-MuiTypography-root"
>
An Old Journey Heading
</div>
<span
class="MuiBadge-badge MuiBadge-standard MuiBadge-invisible MuiBadge-anchorOriginTopRight MuiBadge-anchorOriginTopRightRectangular MuiBadge-overlapRectangular css-z28gz6-MuiBadge-badge"
/>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-noWrap css-1u8gm7p-MuiTypography-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-mpaqru-MuiTypography-root"
>
4 years ago
</span>
- Journey created before the current year should also show the year in the date
</span>
</div>
</body>
at Object.getElementError (../../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx:53:7)
|
run tests:
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCard.spec.tsx#L33
TestingLibraryElementError: Unable to find an accessible element with the role "link" and name "Default Journey Heading January 1, 2021"
Here are the accessible roles:
link:
Name "Default Journey Heading 4 years ago":
<a
aria-disabled="true"
class="MuiButtonBase-root Mui-disabled MuiCardActionArea-root css-rcauak-MuiButtonBase-root-MuiCardActionArea-root"
href="/journeys/journey-id"
tabindex="-1"
/>
--------------------------------------------------
button:
Name "overflow-notification-badge":
<div
class="MuiBox-root css-82ics8"
data-testid="JourneysAdminAccessAvatars"
role="button"
/>
Name "overflow-notification-badge":
<div
class="MuiBox-root css-82ics8"
data-testid="JourneysAdminAccessAvatars"
role="button"
/>
Name "":
<button
aria-controls="journey-actions"
aria-expanded="false"
aria-haspopup="true"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-edgeEnd MuiIconButton-sizeMedium css-oeq6yz-MuiButtonBase-root-MuiIconButton-root"
id="journey-actions"
tabindex="0"
type="button"
/>
--------------------------------------------------
img:
Name "Coral Three":
<img
alt="Coral Three"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3nlwUwJ"
/>
Name "Horace Two":
<img
alt="Horace Two"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3rgHd6a"
/>
Name "Amin One":
<img
alt="Amin One"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3Gth4Yf"
/>
Name "Coral Three":
<img
alt="Coral Three"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3nlwUwJ"
/>
Name "Horace Two":
<img
alt="Horace Two"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3rgHd6a"
/>
Name "Amin One":
<img
alt="Amin One"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3Gth4Yf"
/>
--------------------------------------------------
Ignored nodes: comments, script, style
<body>
<div>
<div
aria-label="journey-card"
class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-1sazqez-MuiPaper-root-MuiCard-root"
data-testid="JourneyCard-journey-id"
>
<a
aria-disabled="true"
class="MuiButtonBase-root Mui-disabled MuiCardActionArea-root css-rcauak-MuiButtonBase-root-MuiCardActionArea-root"
href="/journeys/journey-id"
tabindex="-1"
>
<div
class="MuiCardContent-root css-uqig0s-MuiCardContent-root"
>
<span
class="MuiBadge-root css-12zozd9-MuiBadge-root"
data-testid="new-journey-badge"
>
<div
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom MuiTypography-noWrap css-1rgdk52-MuiTypography-root"
>
Default Journey Heading
</div>
<span
class="MuiBadge-badge MuiBadge-standard MuiBadge-invisible MuiBadge-anchorOriginTopRight MuiBadge-anchorOriginTopRightRectangular MuiBadge-overlapRectangular css-zixdrk-MuiBadge-badge"
/>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-noWrap css-1iacvje-MuiTypography-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-1ol5qe7-MuiTypography-root"
>
4 years ago
</span>
</span>
</div>
<span
class="MuiCardActionArea-focusHighlight css-1h5un5t-MuiCardActionArea-focusHighlight"
/>
</a>
<div
class="MuiCardActions-root MuiCardActions-spacing css-1n39bf9-MuiCardActions-root"
>
<div
class="MuiStack-root css-1n8o6vx-MuiStack-root"
data-testid="JourneyCardInfo"
>
<div
class="MuiBox-root css-0"
>
<div
class="MuiBox-root css-10q9jzs"
|
run tests:
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCard.spec.tsx#L52
TestingLibraryElementError: Unable to find an accessible element with the role "link" and name "Default Journey Heading January 1, 2021"
Here are the accessible roles:
link:
Name "Default Journey Heading 4 years ago":
<a
aria-disabled="true"
class="MuiButtonBase-root Mui-disabled MuiCardActionArea-root css-rcauak-MuiButtonBase-root-MuiCardActionArea-root"
href="/journeys/journey-id"
tabindex="-1"
/>
--------------------------------------------------
button:
Name "overflow-notification-badge":
<div
class="MuiBox-root css-82ics8"
data-testid="JourneysAdminAccessAvatars"
role="button"
/>
Name "overflow-notification-badge":
<div
class="MuiBox-root css-82ics8"
data-testid="JourneysAdminAccessAvatars"
role="button"
/>
Name "":
<button
aria-controls="journey-actions"
aria-expanded="false"
aria-haspopup="true"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-edgeEnd MuiIconButton-sizeMedium css-oeq6yz-MuiButtonBase-root-MuiIconButton-root"
id="journey-actions"
tabindex="0"
type="button"
/>
--------------------------------------------------
img:
Name "Coral Three":
<img
alt="Coral Three"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3nlwUwJ"
/>
Name "Horace Two":
<img
alt="Horace Two"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3rgHd6a"
/>
Name "Amin One":
<img
alt="Amin One"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3Gth4Yf"
/>
Name "Coral Three":
<img
alt="Coral Three"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3nlwUwJ"
/>
Name "Horace Two":
<img
alt="Horace Two"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3rgHd6a"
/>
Name "Amin One":
<img
alt="Amin One"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3Gth4Yf"
/>
--------------------------------------------------
Ignored nodes: comments, script, style
<body>
<div>
<div
aria-label="journey-card"
class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-1sazqez-MuiPaper-root-MuiCard-root"
data-testid="JourneyCard-journey-id"
>
<a
aria-disabled="true"
class="MuiButtonBase-root Mui-disabled MuiCardActionArea-root css-rcauak-MuiButtonBase-root-MuiCardActionArea-root"
href="/journeys/journey-id"
tabindex="-1"
>
<div
class="MuiCardContent-root css-uqig0s-MuiCardContent-root"
>
<span
class="MuiBadge-root css-12zozd9-MuiBadge-root"
data-testid="new-journey-badge"
>
<div
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom MuiTypography-noWrap css-1rgdk52-MuiTypography-root"
>
Default Journey Heading
</div>
<span
class="MuiBadge-badge MuiBadge-standard MuiBadge-invisible MuiBadge-anchorOriginTopRight MuiBadge-anchorOriginTopRightRectangular MuiBadge-overlapRectangular css-zixdrk-MuiBadge-badge"
/>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-noWrap css-1iacvje-MuiTypography-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-1ol5qe7-MuiTypography-root"
>
4 years ago
</span>
</span>
</div>
<span
class="MuiCardActionArea-focusHighlight css-1h5un5t-MuiCardActionArea-focusHighlight"
/>
</a>
<div
class="MuiCardActions-root MuiCardActions-spacing css-1n39bf9-MuiCardActions-root"
>
<div
class="MuiStack-root css-1n8o6vx-MuiStack-root"
data-testid="JourneyCardInfo"
>
<div
class="MuiBox-root css-0"
>
<div
class="MuiBox-root css-10q9jzs"
|
run tests
Error: The process '/opt/hostedtoolcache/node/20.18.2/x64/bin/npx' failed with exit code 1
|
run tests:
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx#L31
TestingLibraryElementError: Unable to find an element with the text: January 1, 2021 - a published journey. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<span
class="MuiBadge-root css-12zozd9-MuiBadge-root"
data-testid="new-journey-badge"
>
<div
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom MuiTypography-noWrap css-1n8slvo-MuiTypography-root"
>
Published Journey Heading
</div>
<span
class="MuiBadge-badge MuiBadge-standard MuiBadge-invisible MuiBadge-anchorOriginTopRight MuiBadge-anchorOriginTopRightRectangular MuiBadge-overlapRectangular css-z28gz6-MuiBadge-badge"
/>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-noWrap css-1u8gm7p-MuiTypography-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-mpaqru-MuiTypography-root"
>
4 years ago
</span>
- a published journey
</span>
</div>
</body>
at Object.getElementError (../../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx:31:7)
|
run tests:
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx#L31
TestingLibraryElementError: Unable to find an element with the text: January 1, 2021 - a published journey. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<span
class="MuiBadge-root css-12zozd9-MuiBadge-root"
data-testid="new-journey-badge"
>
<div
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom MuiTypography-noWrap css-1n8slvo-MuiTypography-root"
>
Published Journey Heading
</div>
<span
class="MuiBadge-badge MuiBadge-standard MuiBadge-invisible MuiBadge-anchorOriginTopRight MuiBadge-anchorOriginTopRightRectangular MuiBadge-overlapRectangular css-z28gz6-MuiBadge-badge"
/>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-noWrap css-1u8gm7p-MuiTypography-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-mpaqru-MuiTypography-root"
>
4 years ago
</span>
- a published journey
</span>
</div>
</body>
at Object.getElementError (../../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx:31:7)
|
run tests:
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx#L31
TestingLibraryElementError: Unable to find an element with the text: January 1, 2021 - a published journey. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<span
class="MuiBadge-root css-12zozd9-MuiBadge-root"
data-testid="new-journey-badge"
>
<div
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom MuiTypography-noWrap css-1n8slvo-MuiTypography-root"
>
Published Journey Heading
</div>
<span
class="MuiBadge-badge MuiBadge-standard MuiBadge-invisible MuiBadge-anchorOriginTopRight MuiBadge-anchorOriginTopRightRectangular MuiBadge-overlapRectangular css-z28gz6-MuiBadge-badge"
/>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-noWrap css-1u8gm7p-MuiTypography-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-mpaqru-MuiTypography-root"
>
4 years ago
</span>
- a published journey
</span>
</div>
</body>
at Object.getElementError (../../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx:31:7)
|
run tests:
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx#L42
TestingLibraryElementError: Unable to find an element with the text: January 1, 2021. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<span
class="MuiBadge-root css-12zozd9-MuiBadge-root"
data-testid="new-journey-badge"
>
<div
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom MuiTypography-noWrap css-1n8slvo-MuiTypography-root"
>
Default Journey Heading
</div>
<span
class="MuiBadge-badge MuiBadge-standard MuiBadge-invisible MuiBadge-anchorOriginTopRight MuiBadge-anchorOriginTopRightRectangular MuiBadge-overlapRectangular css-z28gz6-MuiBadge-badge"
/>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-noWrap css-1u8gm7p-MuiTypography-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-mpaqru-MuiTypography-root"
>
4 years ago
</span>
</span>
</div>
</body>
at Object.getElementError (../../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx:42:12)
|
run tests:
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx#L42
TestingLibraryElementError: Unable to find an element with the text: January 1, 2021. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<span
class="MuiBadge-root css-12zozd9-MuiBadge-root"
data-testid="new-journey-badge"
>
<div
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom MuiTypography-noWrap css-1n8slvo-MuiTypography-root"
>
Default Journey Heading
</div>
<span
class="MuiBadge-badge MuiBadge-standard MuiBadge-invisible MuiBadge-anchorOriginTopRight MuiBadge-anchorOriginTopRightRectangular MuiBadge-overlapRectangular css-z28gz6-MuiBadge-badge"
/>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-noWrap css-1u8gm7p-MuiTypography-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-mpaqru-MuiTypography-root"
>
4 years ago
</span>
</span>
</div>
</body>
at Object.getElementError (../../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx:42:12)
|
run tests:
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx#L42
TestingLibraryElementError: Unable to find an element with the text: January 1, 2021. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<span
class="MuiBadge-root css-12zozd9-MuiBadge-root"
data-testid="new-journey-badge"
>
<div
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom MuiTypography-noWrap css-1n8slvo-MuiTypography-root"
>
Default Journey Heading
</div>
<span
class="MuiBadge-badge MuiBadge-standard MuiBadge-invisible MuiBadge-anchorOriginTopRight MuiBadge-anchorOriginTopRightRectangular MuiBadge-overlapRectangular css-z28gz6-MuiBadge-badge"
/>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-noWrap css-1u8gm7p-MuiTypography-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-mpaqru-MuiTypography-root"
>
4 years ago
</span>
</span>
</div>
</body>
at Object.getElementError (../../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx:42:12)
|
run tests:
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx#L53
TestingLibraryElementError: Unable to find an element with the text: November 19, 2020 - Journey created before the current year should also show the year in the date. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<span
class="MuiBadge-root css-12zozd9-MuiBadge-root"
data-testid="new-journey-badge"
>
<div
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom MuiTypography-noWrap css-1n8slvo-MuiTypography-root"
>
An Old Journey Heading
</div>
<span
class="MuiBadge-badge MuiBadge-standard MuiBadge-invisible MuiBadge-anchorOriginTopRight MuiBadge-anchorOriginTopRightRectangular MuiBadge-overlapRectangular css-z28gz6-MuiBadge-badge"
/>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-noWrap css-1u8gm7p-MuiTypography-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-mpaqru-MuiTypography-root"
>
4 years ago
</span>
- Journey created before the current year should also show the year in the date
</span>
</div>
</body>
at Object.getElementError (../../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx:53:7)
|
run tests:
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx#L53
TestingLibraryElementError: Unable to find an element with the text: November 19, 2020 - Journey created before the current year should also show the year in the date. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<span
class="MuiBadge-root css-12zozd9-MuiBadge-root"
data-testid="new-journey-badge"
>
<div
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom MuiTypography-noWrap css-1n8slvo-MuiTypography-root"
>
An Old Journey Heading
</div>
<span
class="MuiBadge-badge MuiBadge-standard MuiBadge-invisible MuiBadge-anchorOriginTopRight MuiBadge-anchorOriginTopRightRectangular MuiBadge-overlapRectangular css-z28gz6-MuiBadge-badge"
/>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-noWrap css-1u8gm7p-MuiTypography-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-mpaqru-MuiTypography-root"
>
4 years ago
</span>
- Journey created before the current year should also show the year in the date
</span>
</div>
</body>
at Object.getElementError (../../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx:53:7)
|
run tests:
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx#L53
TestingLibraryElementError: Unable to find an element with the text: November 19, 2020 - Journey created before the current year should also show the year in the date. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<span
class="MuiBadge-root css-12zozd9-MuiBadge-root"
data-testid="new-journey-badge"
>
<div
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom MuiTypography-noWrap css-1n8slvo-MuiTypography-root"
>
An Old Journey Heading
</div>
<span
class="MuiBadge-badge MuiBadge-standard MuiBadge-invisible MuiBadge-anchorOriginTopRight MuiBadge-anchorOriginTopRightRectangular MuiBadge-overlapRectangular css-z28gz6-MuiBadge-badge"
/>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-noWrap css-1u8gm7p-MuiTypography-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-mpaqru-MuiTypography-root"
>
4 years ago
</span>
- Journey created before the current year should also show the year in the date
</span>
</div>
</body>
at Object.getElementError (../../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (src/components/JourneyList/JourneyCard/JourneyCardText/JourneyCardText.spec.tsx:53:7)
|
run tests:
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCard.spec.tsx#L33
TestingLibraryElementError: Unable to find an accessible element with the role "link" and name "Default Journey Heading January 1, 2021"
Here are the accessible roles:
link:
Name "Default Journey Heading 4 years ago":
<a
class="MuiButtonBase-root MuiCardActionArea-root css-eetu4t-MuiButtonBase-root-MuiCardActionArea-root"
href="/journeys/journey-id"
tabindex="0"
/>
--------------------------------------------------
button:
Name "overflow-notification-badge":
<div
class="MuiBox-root css-82ics8"
data-testid="JourneysAdminAccessAvatars"
role="button"
/>
Name "overflow-notification-badge":
<div
class="MuiBox-root css-82ics8"
data-testid="JourneysAdminAccessAvatars"
role="button"
/>
Name "":
<button
aria-controls="journey-actions"
aria-expanded="false"
aria-haspopup="true"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-edgeEnd MuiIconButton-sizeMedium css-oeq6yz-MuiButtonBase-root-MuiIconButton-root"
id="journey-actions"
tabindex="0"
type="button"
/>
--------------------------------------------------
img:
Name "Coral Three":
<img
alt="Coral Three"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3nlwUwJ"
/>
Name "Horace Two":
<img
alt="Horace Two"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3rgHd6a"
/>
Name "Amin One":
<img
alt="Amin One"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3Gth4Yf"
/>
Name "Coral Three":
<img
alt="Coral Three"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3nlwUwJ"
/>
Name "Horace Two":
<img
alt="Horace Two"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3rgHd6a"
/>
Name "Amin One":
<img
alt="Amin One"
class="MuiAvatar-img css-1su80sj-MuiAvatar-img"
src="https://bit.ly/3Gth4Yf"
/>
--------------------------------------------------
Ignored nodes: comments, script, style
<body>
<div>
<div
aria-label="journey-card"
class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-1sazqez-MuiPaper-root-MuiCard-root"
data-testid="JourneyCard-journey-id"
>
<a
class="MuiButtonBase-root MuiCardActionArea-root css-eetu4t-MuiButtonBase-root-MuiCardActionArea-root"
href="/journeys/journey-id"
tabindex="0"
>
<div
class="MuiCardContent-root css-uqig0s-MuiCardContent-root"
>
<span
class="MuiBadge-root css-12zozd9-MuiBadge-root"
data-testid="new-journey-badge"
>
<div
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom MuiTypography-noWrap css-1rgdk52-MuiTypography-root"
>
Default Journey Heading
</div>
<span
class="MuiBadge-badge MuiBadge-standard MuiBadge-invisible MuiBadge-anchorOriginTopRight MuiBadge-anchorOriginTopRightRectangular MuiBadge-overlapRectangular css-zixdrk-MuiBadge-badge"
/>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-noWrap css-1iacvje-MuiTypography-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-1ol5qe7-MuiTypography-root"
>
4 years ago
</span>
</span>
</div>
<span
class="MuiCardActionArea-focusHighlight css-1h5un5t-MuiCardActionArea-focusHighlight"
/>
</a>
<div
class="MuiCardActions-root MuiCardActions-spacing css-1n39bf9-MuiCardActions-root"
>
<div
class="MuiStack-root css-1n8o6vx-MuiStack-root"
data-testid="JourneyCardInfo"
>
<div
class="MuiBox-root css-0"
>
<div
class="MuiBox-root css-10q9jzs"
>
<div
class="MuiBox-root css-82ics8"
|
Loading