Skip to content

Commit

Permalink
Cypress upgrade to 12.17.*
Browse files Browse the repository at this point in the history
  • Loading branch information
milanmajchrak committed Oct 2, 2023
1 parent 71615c6 commit cd44b49
Show file tree
Hide file tree
Showing 32 changed files with 121 additions and 90 deletions.
44 changes: 44 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { defineConfig } from 'cypress';

export default defineConfig({
videosFolder: 'cypress/videos',
screenshotsFolder: 'cypress/screenshots',
fixturesFolder: 'cypress/fixtures',
retries: {
runMode: 2,
openMode: 0,
},
env: {
DSPACE_TEST_ADMIN_USER: '[email protected]',
DSPACE_TEST_ADMIN_PASSWORD: 'dspace',
DSPACE_TEST_COMMUNITY: 'c4c8da3d-8105-49a1-94fa-f89ad3e9a887',
DSPACE_TEST_COLLECTION: 'c6579e21-4d9b-44c7-a557-186c5e3471eb',
DSPACE_TEST_ENTITY_PUBLICATION: 'e98b0f27-5c19-49a0-960d-eb6ad5287067',
DSPACE_TEST_SEARCH_TERM: 'test',
DSPACE_TEST_SUBMIT_COLLECTION_NAME: 'Sample Collection',
DSPACE_TEST_SUBMIT_COLLECTION_UUID: '9d8334e9-25d3-4a67-9cea-3dffdef80144',
DSPACE_TEST_SUBMIT_CLARIAH_COLLECTION_UUID:
'7eb3562b-27f5-445f-8303-db771969cbff',
DSPACE_TEST_SUBMIT_USER: '[email protected]',
DSPACE_TEST_SUBMIT_USER_PASSWORD: 'dspace',
CLARIN_TEST_WITHDRAWN_ITEM: '7282fc76-0941-4055-a5a3-1f582c638050',
CLARIN_TEST_WITHDRAWN_ITEM_WITH_REASON:
'8ae76fcf-b26b-42f2-84d3-9a85e0517bca',
CLARIN_TEST_WITHDRAWN_ITEM_WITH_REASON_AND_AUTHORS:
'cd368b6a-0019-4813-bad9-5050e50ba36d',
CLARIN_TEST_WITHDRAWN_REPLACED_ITEM: '566b1b8b-840d-476c-9fb0-b92fb92d4aad',
CLARIN_TEST_WITHDRAWN_REPLACED_ITEM_WITH_AUTHORS:
'600a9e09-dd31-428e-9328-2ed6631aa50a',
CLARIN_TEST_WITHDRAWN_REASON: 'reason',
CLARIN_TEST_WITHDRAWN_REPLACEMENT: 'new URL',
CLARIN_TEST_WITHDRAWN_AUTHORS: 'author1, author2',
},
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.ts')(on, config)
},
baseUrl: 'http://127.0.0.1:4000',
},
});
34 changes: 0 additions & 34 deletions cypress.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
TEST_ADMIN_PASSWORD,
TEST_ADMIN_USER,
TEST_SUBMIT_COLLECTION_UUID,
} from '../support';
} from '../support/e2e';

/**
* Test menu options for admin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TEST_ENTITY_PUBLICATION } from 'cypress/support';
import { TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Breadcrumbs', () => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TEST_ADMIN_PASSWORD, TEST_ADMIN_USER } from '../support';
import { TEST_ADMIN_PASSWORD, TEST_ADMIN_USER } from '../support/e2e';

/**
* Test to check if the license administration page is loaded after redirecting.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TEST_COLLECTION } from 'cypress/support';
import { TEST_COLLECTION } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Collection Page', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TEST_COLLECTION } from 'cypress/support';
import { TEST_COLLECTION } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Collection Statistics Page', () => {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TEST_COMMUNITY } from 'cypress/support';
import { TEST_COMMUNITY } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Community Page', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TEST_COMMUNITY } from 'cypress/support';
import { TEST_COMMUNITY } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Community Statistics Page', () => {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TEST_ADMIN_PASSWORD, TEST_ADMIN_USER } from '../support';
import { TEST_ADMIN_PASSWORD, TEST_ADMIN_USER } from '../support/e2e';

/**
* Test for checking if the handle page is loaded after redirecting.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Options } from 'cypress-axe';
import { TEST_ENTITY_PUBLICATION } from 'cypress/support';
import { TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Item Page', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TEST_ENTITY_PUBLICATION } from 'cypress/support';
import { TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Item Statistics Page', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TEST_ADMIN_PASSWORD, TEST_ADMIN_USER, TEST_ENTITY_PUBLICATION } from 'cypress/support';
import { TEST_ADMIN_PASSWORD, TEST_ADMIN_USER, TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e';

const page = {
openLoginMenu() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// TEST_SUBMIT_USER_PASSWORD,
// TEST_SUBMIT_COLLECTION_NAME,
// TEST_SUBMIT_USER
// } from 'cypress/support';
// } from 'cypress/support/e2e';

// CLARIN - When the user is redirected into /mydspace the default search configuration is for
// supervisedItems and the yourSubmission is missing. TODO fix this
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TEST_SEARCH_TERM } from 'cypress/support';
import { TEST_SEARCH_TERM } from 'cypress/support/e2e';

const page = {
fillOutQueryInNavBar(query) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
TEST_ADMIN_USER,
TEST_SUBMIT_CLARIAH_COLLECTION_UUID,
TEST_SUBMIT_COLLECTION_UUID
} from '../support';
} from '../support/e2e';
import { createItemProcess } from '../support/commands';


Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import {
TEST_SUBMIT_USER,
TEST_SUBMIT_USER_PASSWORD,
TEST_SUBMIT_COLLECTION_NAME,
TEST_ADMIN_PASSWORD, TEST_ADMIN_USER, TEST_SUBMIT_COLLECTION_NAME,
TEST_SUBMIT_COLLECTION_UUID,
TEST_ADMIN_USER, TEST_ADMIN_PASSWORD
}
from 'cypress/support';
TEST_SUBMIT_USER,
TEST_SUBMIT_USER_PASSWORD
} from 'cypress/support/e2e';
import { createItemProcess } from '../support/commands';

describe('New Submission page', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
TEST_WITHDRAWN_ITEM,
TEST_WITHDRAWN_ITEM_WITH_REASON, TEST_WITHDRAWN_ITEM_WITH_REASON_AND_AUTHORS, TEST_WITHDRAWN_REASON,
TEST_WITHDRAWN_REPLACED_ITEM, TEST_WITHDRAWN_REPLACED_ITEM_WITH_AUTHORS, TEST_WITHDRAWN_REPLACEMENT
} from '../support';
} from '../support/e2e';

const ITEMPAGE_WITHDRAWN = '/items/' + TEST_WITHDRAWN_ITEM;
const ITEMPAGE_WITHDRAWN_REASON = '/items/' + TEST_WITHDRAWN_ITEM_WITH_REASON;
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@
"compression-webpack-plugin": "^9.2.0",
"copy-webpack-plugin": "^6.4.1",
"cross-env": "^7.0.3",
"cypress": "9.7.0",
"cypress-axe": "^0.14.0",
"cypress": "12.17.4",
"cypress-axe": "^1.4.0",
"deep-freeze": "0.0.1",
"eslint": "^8.2.0",
"eslint-plugin-deprecation": "^1.3.2",
Expand Down
Loading

0 comments on commit cd44b49

Please sign in to comment.