Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable JSX in Cypress tests #10653

Merged
merged 52 commits into from
Jan 30, 2025
Merged

chore: enable JSX in Cypress tests #10653

merged 52 commits into from
Jan 30, 2025

Conversation

ilhan007
Copy link
Member

@ilhan007 ilhan007 commented Jan 24, 2025

Enable JSX syntax in Cypress tests, further improving the test dev experience as we get TS checks and auto completion for the web components.

Note: From now on, any changes to tests or creating new tests should use jsx for test mounting, instead of lit-html. As the same syntax rules apply as in the component templates, there is nothing new to learn and switching is straightforward.

Before:

cy.mount(html`<ui5-card>
	  <ui5-card-header
                  id="cardHeader2"
		  slot="header"
		  additional-text="4 of 10"
		  title-text="Quick Links"
		  subtitle-text="Quick links sub title"
		  interactive
	  >
	  </ui5-card-header>
       </ui5-card>
`);

After:

cy.mount(<Card>
	  <CardHeader
		  id="cardHeader1"
		  slot="header"
		  additionalText="4 of 10"
		  titleText="Quick Links"
		  subtitleText="Quick links sub title"
		  interactive={true}
	  >
	  </CardHeader>
       </Card>
);

@ilhan007 ilhan007 changed the title [poc]chore: enable JSX in Cypress tests chore: enable JSX in Cypress tests Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants