test: tighten up two more cypress tests (#46273)

* test: tighten up user-token

This should be faster and a little more reliable.  before should have
worked, but beforeEach seems more reliable, so I'm trying it.

* test: use a single test for intro-page

Should be more robust as well as a lot faster.
This commit is contained in:
Oliver Eyton-Williams
2022-06-03 11:44:20 +03:00
committed by GitHub
parent eee1db008e
commit f55a4c48db
4 changed files with 19 additions and 22 deletions
@@ -29,7 +29,7 @@ class UserToken extends Component<UserTokenProps> {
const { t } = this.props;
return (
<div className='user-token text-center'>
<div data-cy='user-token' className='user-token text-center'>
<FullWidthRow>
<Panel className='user-panel'>
<Panel.Heading>{t('user-token.title')}</Panel.Heading>
@@ -236,6 +236,7 @@ class ShowCodeAlly extends Component<ShowCodeAllyProps> {
<Helmet title={`${blockName}: ${title} | freeCodeCamp.org`} />
<iframe
className='codeally-frame'
data-cy='codeally-frame'
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
sandbox='allow-modals allow-forms allow-popups allow-scripts allow-same-origin'
src={`https://codeally.io/embed/?repoUrl=${url}&${goBackTo}&${envVariables}&${tempToken}&${date}`}