Skip to content

Commit

Permalink
Merge pull request jhipster#26938 from mshima/cypress
Browse files Browse the repository at this point in the history
Cypress adjusts
  • Loading branch information
DanielFran authored Aug 10, 2024
2 parents 4580435 + d4cefb4 commit fce2d5a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ describe('<%= entityClass %> e2e test', () => {
const <%= entityInstance %>PageUrlPattern = new RegExp('/<%= entityPage %>(\\?.*)?$');
const username = Cypress.env('E2E_USERNAME') ?? '<%- adminEntity ? 'admin' : 'user' %>';
const password = Cypress.env('E2E_PASSWORD') ?? '<%- adminEntity ? 'admin' : 'user' %>';
<%_ if (!readOnly) { _%>
<% if (skipCreateTest) { %>// <% } %>const <%= entityInstance %>Sample = <%- JSON.stringify(this.generateTestEntity(sampleFields.map(field => field.reference))) %>;
<%_ } _%>
let <%= entityInstance %>;
<%_ for (otherEntity of requiredOtherEntities) { _%>
Expand Down Expand Up @@ -179,7 +181,7 @@ describe('<%= entityClass %> e2e test', () => {
<%_ } _%>
describe('with existing value', () => {
<% if (!readOnly) { %>
<%_ if (!readOnly) { _%>
<%_ if (skipCreateTest) { _%>
/* Disabled due to incompatibility
<%_ } _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
limitations under the License.
-%>
/* eslint-disable @typescript-eslint/no-namespace */
// eslint-disable-next-line spaced-comment
/// <reference types="cypress" />

Cypress.Commands.add('getOauth2Data', () => {
cy.request({
Expand Down Expand Up @@ -158,6 +156,7 @@ Cypress.Commands.add('oauthLogout', () => {

declare global {
namespace Cypress {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface Chainable<Subject> {
getOauth2Data(): Cypress.Chainable;
oauthLogin(oauth2Data, username: string, password: string): Cypress.Chainable;
Expand Down
1 change: 1 addition & 0 deletions test-integration/scripts/99-build-changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ echo "::group::Check Client Common"
git -c color.ui=always diff --exit-code @~1 -- \
'generators/bootstrap-application-client' \
'generators/client/**' \
'generators/cypress/**' \
'generators/javascript/**' \
|| CLIENT_COMMON=true
echo "::endgroup::"
Expand Down

0 comments on commit fce2d5a

Please sign in to comment.