Adjust behavior to current functionality

This commit is contained in:
mildred 2024-03-06 22:26:36 +01:00
parent ff2a3c7026
commit 76e20770d9
7 changed files with 29 additions and 18 deletions

8
.gitignore vendored
View File

@ -7,3 +7,11 @@ node_modules/
.vscode .vscode
.github .github
.DS_Store .DS_Store
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/

24
package-lock.json generated
View File

@ -9,17 +9,17 @@
"version": "1.0.0", "version": "1.0.0",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@playwright/test": "^1.40.1", "@playwright/test": "^1.42.1",
"@types/node": "^20.10.6" "@types/node": "^20.10.6"
} }
}, },
"node_modules/@playwright/test": { "node_modules/@playwright/test": {
"version": "1.40.1", "version": "1.42.1",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.1.tgz", "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.42.1.tgz",
"integrity": "sha512-EaaawMTOeEItCRvfmkI9v6rBkF1svM8wjl/YPRrg2N2Wmp+4qJYkWtJsbew1szfKKDm6fPLy4YAanBhIlf9dWw==", "integrity": "sha512-Gq9rmS54mjBL/7/MvBaNOBwbfnh7beHvS6oS4srqXFcQHpQCV1+c8JXWE8VLPyRDhgS3H8x8A7hztqI9VnwrAQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"playwright": "1.40.1" "playwright": "1.42.1"
}, },
"bin": { "bin": {
"playwright": "cli.js" "playwright": "cli.js"
@ -52,12 +52,12 @@
} }
}, },
"node_modules/playwright": { "node_modules/playwright": {
"version": "1.40.1", "version": "1.42.1",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.1.tgz", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.42.1.tgz",
"integrity": "sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==", "integrity": "sha512-PgwB03s2DZBcNRoW+1w9E+VkLBxweib6KTXM0M3tkiT4jVxKSi6PmVJ591J+0u10LUrgxB7dLRbiJqO5s2QPMg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"playwright-core": "1.40.1" "playwright-core": "1.42.1"
}, },
"bin": { "bin": {
"playwright": "cli.js" "playwright": "cli.js"
@ -70,9 +70,9 @@
} }
}, },
"node_modules/playwright-core": { "node_modules/playwright-core": {
"version": "1.40.1", "version": "1.42.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.1.tgz", "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.42.1.tgz",
"integrity": "sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==", "integrity": "sha512-mxz6zclokgrke9p1vtdy/COWBH+eOZgYUVVU34C73M+4j4HLlQJHtfcqiqqxpP0o8HhMkflvfbquLX5dg6wlfA==",
"dev": true, "dev": true,
"bin": { "bin": {
"playwright-core": "cli.js" "playwright-core": "cli.js"

View File

@ -8,7 +8,7 @@
"author": "Orchestral team", "author": "Orchestral team",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@playwright/test": "^1.40.1", "@playwright/test": "^1.42.1",
"@types/node": "^20.10.6" "@types/node": "^20.10.6"
} }
} }

View File

@ -42,11 +42,11 @@ export const SCHEMA_TYPE_CC = 'CourseCredential' //Revisar este valor en la inte
//Messages //Messages
export const ALERT_FILE_IMPORTED_SUCCESSFULLY = "The file was imported successfully!" export const ALERT_FILE_IMPORTED_SUCCESSFULLY = "The file was imported successfully!"
export const ALERT_FILE_TO_IMPORT_IS_EMPTY = "The file you try to import is empty" export const ALERT_FILE_TO_IMPORT_IS_EMPTY = "The file you try to import is empty!"
export const ALERT_FILE_IS_BADLY_FORMATTED = "This file is badly formatted!" export const ALERT_FILE_IS_BADLY_FORMATTED = "This file is badly formatted!"
export const ALERT_FILE_TO_IMPORT_WITHOUT_REQUIRED_COLUMS = "line 1: 'email' is a required property" export const ALERT_FILE_TO_IMPORT_WITHOUT_REQUIRED_COLUMS = "line 2: 'email' is a required property"
export const ALERT_FILE_TO_IMPORT_WITH_ALIEN_COLUMS = "line 1: Additional properties are not allowed ('alien1', 'alien2' were unexpected)" export const ALERT_FILE_TO_IMPORT_WITH_ALIEN_COLUMS = "line 2: Additional properties are not allowed ('alien1', 'alien2' were unexpected)"
export const ALERT_USER_CREATED_SUCESSFULLY_MESSAGE = 'The account was created successfully' export const ALERT_USER_CREATED_SUCESSFULLY_MESSAGE = 'The account was created successfully'
export const ERROR_INCORRECT_EMAIL_PASSWORD = 'Please enter a correct Email address and password. Note that both fields may be case-sensitive.' export const ERROR_INCORRECT_EMAIL_PASSWORD = 'Please enter a correct Email address and password. Note that both fields may be case-sensitive.'

View File

@ -2,8 +2,8 @@
export const ADMIN_EMAIL = "idhub_admin@pangea.org" export const ADMIN_EMAIL = "idhub_admin@pangea.org"
export const ADMIN_K = "1234" export const ADMIN_K = "1234"
export const KO_ADMIN_K = "876" export const KO_ADMIN_K = "876"
//export const URL_IDHUB = "https://idhub-autotest.demo.pangea.org" export const URL_IDHUB = "https://idhub-autotest.demo.pangea.org"
export const URL_IDHUB = "https://idhub-nightly.demo.pangea.org" //export const URL_IDHUB = "https://idhub-nightly.demo.pangea.org"
export const USER1_EMAIL = "user1@example.org" export const USER1_EMAIL = "user1@example.org"
export const USER2_EMAIL = "user2@example.org" export const USER2_EMAIL = "user2@example.org"

View File

@ -110,6 +110,7 @@ export class ImportDataPage {
const text = await element.innerText(); const text = await element.innerText();
console.log(text); console.log(text);
expect(text).toBe(expectedMessage); expect(text).toBe(expectedMessage);
return true;
} }
} }
return false; return false;

View File

@ -143,8 +143,10 @@ export class ViewImportedDataPage {
const text = await element.innerText(); const text = await element.innerText();
console.log(text); console.log(text);
expect(text).toBe(ALERT_FILE_IMPORTED_SUCCESSFULLY); expect(text).toBe(ALERT_FILE_IMPORTED_SUCCESSFULLY);
return true;
} }
} }
return false; return false;
} catch (error) { } catch (error) {
console.error("Failed to check for successful file import alert:", error); console.error("Failed to check for successful file import alert:", error);