Skip to content

Commit

Permalink
fix(react): align component and e2e test generation (#6535)
Browse files Browse the repository at this point in the history
  • Loading branch information
juristr committed Jul 29, 2021
1 parent 07d9d66 commit 7c26151
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Expand Up @@ -108,9 +108,9 @@ describe('react:component-cypress-spec', () => {
beforeEach(() => cy.visit('/iframe.html?id=test--primary&args=name;displayAge:false;'));
it('should render the component', () => {
cy.get('h1').should('contain', 'Welcome to test-ui-lib!');
cy.get('h1').should('contain', 'Welcome to Test!');
});
});
})
`);
});
});
Expand All @@ -135,7 +135,7 @@ describe('react:component-cypress-spec', () => {
beforeEach(() => cy.visit('/iframe.html?id=test--primary'));
it('should render the component', () => {
cy.get('h1').should('contain', 'Welcome to test-ui-lib!');
cy.get('h1').should('contain', 'Welcome to Test!');
});
});
`);
Expand Down
Expand Up @@ -8,6 +8,6 @@ describe('<%=projectName%>: <%= componentSelector %> component', () => {
}%>'));

it('should render the component', () => {
cy.get('h1').should('contain', 'Welcome to <%=projectName%>!');
cy.get('h1').should('contain', 'Welcome to <%=componentSelector%>!');
});
});
Expand Up @@ -33,7 +33,7 @@ export class <%= className %> extends Component<<%= className %>Props> {
return (
<<%= wrapper %>>
<%= styledModule === 'styled-jsx' ? `<style jsx>{\`div { color: pink; }\`}</style>` : `` %>
<p>Welcome to <%= name %>!</p>
<p>Welcome to <%= className %>!</p>
<% if (routing) { %>
<ul>
<li><Link to="/"><%= name %> root</Link></li>
Expand All @@ -49,7 +49,7 @@ export function <%= className %>(props: <%= className %>Props) {
return (
<<%= wrapper %>>
<% if (styledModule === 'styled-jsx') { %><style jsx>{`div { color: pink; }`}</style><% } %>
<h1>Welcome to <%= name %>!</h1>
<h1>Welcome to <%= className %>!</h1>
<% if (routing) { %>
<ul>
<li><Link to="/"><%= name %> root</Link></li>
Expand Down

0 comments on commit 7c26151

Please sign in to comment.