-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
261 changed files
with
21,633 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
QASE_TESTOPS_PROJECT: ${{ secrets.QASE_TESTOPS_PROJECT }} | ||
QASE_TESTOPS_API_TOKEN: ${{ secrets.QASE_TESTOPS_API_TOKEN }} | ||
QASE_ENVIRONMENT: ${{ secrets.QASE_ENVIRONMENT }} | ||
|
||
jobs: | ||
tests_e2e: | ||
name: Run end-to-end tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install playwright browsers | ||
run: npx playwright install --with-deps | ||
- name: Run tests | ||
run: npx playwright test | ||
- name: Upload test results to Qase | ||
run: | | ||
npx qase-playwright --reporter qase --token=${{ secrets.QASE_TESTOPS_API_TOKEN }} --project=${{ secrets.QASE_TESTOPS_PROJECT }} | ||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !cancelled() }} | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
QASE_TESTOPS_PROJECT: ${{ secrets.QASE_TESTOPS_PROJECT }} | ||
QASE_TESTOPS_API_TOKEN: ${{ secrets.QASE_TESTOPS_API_TOKEN }} | ||
QASE_ENVIRONMENT: ${{ secrets.QASE_ENVIRONMENT }} | ||
|
||
jobs: | ||
tests_e2e: | ||
name: Run end-to-end tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install playwright browsers | ||
run: npx playwright install --with-deps | ||
- name: Run tests | ||
run: npx playwright test | ||
- name: Upload test results to Qase | ||
run: | | ||
npx qase-playwright --reporter qase --token=${{ secrets.QASE_TESTOPS_API_TOKEN }} --project=${{ secrets.QASE_TESTOPS_PROJECT }} | ||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !cancelled() }} | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
QASE_TESTOPS_PROJECT: ${{ secrets.QASE_TESTOPS_PROJECT }} | ||
QASE_TESTOPS_API_TOKEN: ${{ secrets.QASE_TESTOPS_API_TOKEN }} | ||
QASE_ENVIRONMENT: ${{ secrets.QASE_ENVIRONMENT }} | ||
|
||
jobs: | ||
tests_e2e: | ||
name: Run end-to-end tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install playwright browsers | ||
run: npx playwright install --with-deps | ||
- name: Run tests | ||
run: npx playwright test | ||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !cancelled() }} | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { faker } from '@faker-js/faker'; | ||
|
||
/** | ||
* Test Data: | ||
* Test data files store the input values and expected outputs used across test cases. | ||
* They help separate the test logic from the data, ensuring tests remain flexible and reusable. | ||
* By keeping data like form inputs, URLs, or expected messages in dedicated files, you can | ||
* easily update and manage values without changing the test logic. This approach also allows | ||
* for dynamic data generation using libraries like Faker, and ensures test cases remain clean | ||
* and focused on behavior rather than hardcoded values. | ||
*/ | ||
|
||
// Test data for tests, static hardcoded and also autogenerated by faker | ||
|
||
export const testData = { | ||
|
||
// User credentials for login - hardcoded | ||
email: 'petr.brablc@gmail.com', | ||
password: '123456', | ||
|
||
// User credentials for login - generated by faker | ||
randomEmail: () => faker.internet.email(), | ||
randomPassword: () => faker.internet.password(), | ||
|
||
// New upload test data | ||
upload: { | ||
recordTitle: () => faker.lorem.sentence(), // Function to generate a random title | ||
familyName: () => faker.lorem.word(), // Function to generate a random family name | ||
recordDescription: () => faker.lorem.paragraph(), // Function to generate a random description | ||
|
||
// Dynamic resource type - Select randomly from a list | ||
resourceType: (): string => faker.helpers.arrayElement(['Image', 'Video', 'Dataset', 'Other', 'Audio']), | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { faker } from '@faker-js/faker'; | ||
|
||
/** | ||
* Test Data: | ||
* Test data files store the input values and expected outputs used across test cases. | ||
* They help separate the test logic from the data, ensuring tests remain flexible and reusable. | ||
* By keeping data like form inputs, URLs, or expected messages in dedicated files, you can | ||
* easily update and manage values without changing the test logic. This approach also allows | ||
* for dynamic data generation using libraries like Faker, and ensures test cases remain clean | ||
* and focused on behavior rather than hardcoded values. | ||
*/ | ||
|
||
// Test data for tests, static hardcoded and also autogenerated by faker | ||
|
||
export const testData = { | ||
|
||
// User credentials for login - hardcoded | ||
email: 'petr.brablc@gmail.com', | ||
password: '123456', | ||
|
||
// User credentials for login - generated by faker | ||
randomEmail: () => faker.internet.email(), | ||
randomPassword: () => faker.internet.password(), | ||
|
||
// New upload test data | ||
upload: { | ||
recordTitle: () => faker.lorem.sentence(), // Function to generate a random title | ||
familyName: () => faker.lorem.word(), // Function to generate a random family name | ||
recordDescription: () => faker.lorem.paragraph(), // Function to generate a random description | ||
|
||
// Dynamic resource type - Select randomly from a list | ||
resourceType: (): string => faker.helpers.arrayElement(['Image', 'Video', 'Dataset', 'Other', 'Audio', 'Software', 'Workflow', 'Poster', 'Model', 'Lesson', 'Event']), | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { faker } from '@faker-js/faker'; | ||
|
||
/** | ||
* Test Data: | ||
* Test data files store the input values and expected outputs used across test cases. | ||
* They help separate the test logic from the data, ensuring tests remain flexible and reusable. | ||
* By keeping data like form inputs, URLs, or expected messages in dedicated files, you can | ||
* easily update and manage values without changing the test logic. This approach also allows | ||
* for dynamic data generation using libraries like Faker, and ensures test cases remain clean | ||
* and focused on behavior rather than hardcoded values. | ||
*/ | ||
|
||
// Test data for tests, static hardcoded and also autogenerated by faker | ||
|
||
export const testData = { | ||
|
||
// User credentials for login - hardcoded | ||
email: 'petr.brablc@gmail.com', | ||
password: '123456', | ||
|
||
// User credentials for login - generated by faker | ||
randomEmail: () => faker.internet.email(), | ||
randomPassword: () => faker.internet.password(), | ||
|
||
// New upload test data | ||
upload: { | ||
recordTitle: () => faker.lorem.sentence(), // Function to generate a random title | ||
familyName: () => faker.lorem.word(), // Function to generate a random family name | ||
recordDescription: () => faker.lorem.paragraph(), // Function to generate a random description | ||
|
||
// Dynamic resource type - Select randomly from a list | ||
resourceType: (): string => faker.helpers.arrayElement(['Image', 'Video', 'Dataset', 'Other', 'Audio', 'Software', 'Workflow', 'Poster', 'Model', 'Lesson', 'Event']), | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { faker } from '@faker-js/faker'; | ||
|
||
/** | ||
* Test Data: | ||
* Test data files store the input values and expected outputs used across test cases. | ||
* They help separate the test logic from the data, ensuring tests remain flexible and reusable. | ||
* By keeping data like form inputs, URLs, or expected messages in dedicated files, you can | ||
* easily update and manage values without changing the test logic. This approach also allows | ||
* for dynamic data generation using libraries like Faker, and ensures test cases remain clean | ||
* and focused on behavior rather than hardcoded values. | ||
*/ | ||
|
||
// Test data for tests, static hardcoded and also autogenerated by faker | ||
|
||
export const testData = { | ||
|
||
// User credentials for login - hardcoded | ||
email: 'petr.brablc@gmail.com', | ||
password: '123456', | ||
|
||
// User credentials for login - generated by faker | ||
randomEmail: () => faker.internet.email(), | ||
randomPassword: () => faker.internet.password(), | ||
|
||
// New upload test data | ||
upload: { | ||
recordTitle: () => faker.lorem.sentence(), // Function to generate a random title | ||
familyName: () => faker.lorem.word(), // Function to generate a random family name | ||
recordDescription: () => faker.lorem.paragraph(), // Function to generate a random description | ||
|
||
// Dynamic resource type - Select randomly from a list, ensuring it's not the same as the currently selected type | ||
resourceType: (currentlySelected: string | null): string => { | ||
const resourceTypes = ['Image', 'Video', 'Dataset', 'Other', 'Audio', 'Software', 'Workflow', 'Poster', 'Model', 'Lesson', 'Event']; | ||
|
||
// Filter out the currently selected type from the available types | ||
const availableTypes = currentlySelected ? resourceTypes.filter(type => type !== currentlySelected) : resourceTypes; | ||
|
||
// Select a random type from the available types | ||
return faker.helpers.arrayElement(availableTypes); | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { faker } from '@faker-js/faker'; | ||
|
||
/** | ||
* Test Data: | ||
* Test data files store the input values and expected outputs used across test cases. | ||
* They help separate the test logic from the data, ensuring tests remain flexible | ||
* and reusable. By keeping data like form inputs, URLs, or expected messages in | ||
* dedicated files, you can easily update and manage values without changing the | ||
* test logic. This approach also allows for dynamic data generation using | ||
* libraries like Faker, and ensures test cases remain clean and focused on | ||
* behavior rather than hardcoded values. | ||
*/ | ||
|
||
// Test data for tests, static hardcoded and also autogenerated by faker | ||
|
||
export const testData = { | ||
|
||
// User credentials for login - hardcoded | ||
email: 'petr.brablc@gmail.com', | ||
password: '123456', | ||
|
||
// User credentials for login - generated by faker | ||
randomEmail: () => faker.internet.email(), | ||
randomPassword: () => faker.internet.password(), | ||
|
||
// New upload test data | ||
upload: { | ||
recordTitle: () => faker.lorem.sentence(), // Function to generate a random title | ||
familyName: () => faker.lorem.word(), // Function to generate a random family name | ||
recordDescription: () => faker.lorem.paragraph(), // Function to generate a random description | ||
|
||
// Dynamic resource type - Select randomly from a list, ensuring it's not | ||
// the same as the currently selected type | ||
resourceType: (currentlySelected: string | null): string => { | ||
const resourceTypes = [ | ||
'Image', | ||
'Video', | ||
'Dataset', | ||
'Other', | ||
'Audio', | ||
'Software', | ||
'Workflow', | ||
'Poster', | ||
'Model', | ||
'Lesson', | ||
'Event' | ||
]; | ||
|
||
// Filter out the currently selected type from the available types | ||
const availableTypes = currentlySelected | ||
? resourceTypes.filter(type => type !== currentlySelected) | ||
: resourceTypes; | ||
|
||
// Select a random type from the available types | ||
return faker.helpers.arrayElement(availableTypes); | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { faker } from '@faker-js/faker'; | ||
|
||
/** | ||
* Test Data: | ||
* Test data files store the input values and expected outputs used across test cases. | ||
* They help separate the test logic from the data, ensuring tests remain flexible | ||
* and reusable. By keeping data like form inputs, URLs, or expected messages in | ||
* dedicated files, you can easily update and manage values without changing the | ||
* test logic. This approach also allows for dynamic data generation using | ||
* libraries like Faker, and ensures test cases remain clean and focused on | ||
* behavior rather than hardcoded values. | ||
*/ | ||
|
||
// Test data for tests, static hardcoded and also autogenerated by faker | ||
|
||
export const testData = { | ||
|
||
// User credentials for login - hardcoded | ||
email: 'petr.brablc@gmail.com', | ||
password: '123456', | ||
|
||
// User credentials for login - generated by faker | ||
randomEmail: () => faker.internet.email(), | ||
randomPassword: () => faker.internet.password(), | ||
|
||
// New upload test data | ||
upload: { | ||
recordTitle: () => faker.lorem.sentence(), // Function to generate a random title | ||
familyName: () => faker.lorem.word(), // Function to generate a random family name | ||
recordDescription: () => faker.lorem.paragraph(), // Function to generate a random description | ||
|
||
// Dynamic resource type - Select randomly from a list, ensuring it's not the same as the currently selected type | ||
resourceType: (currentlySelected: string | null): string => { | ||
const resourceTypes = [ | ||
'Image', | ||
'Video', | ||
'Dataset', | ||
'Other', | ||
'Audio', | ||
'Software', | ||
'Workflow', | ||
'Poster', | ||
'Model', | ||
'Lesson', | ||
'Event' | ||
]; | ||
|
||
// Filter out the currently selected type from the available types | ||
const availableTypes = currentlySelected | ||
? resourceTypes.filter(type => type !== currentlySelected) | ||
: resourceTypes; | ||
|
||
// Select a random type from the available types | ||
return faker.helpers.arrayElement(availableTypes); | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Direct URLS for a quick navigation | ||
|
||
export const urls = { | ||
baseURL: 'https://inveniordm.web.cern.ch/', | ||
profileURL: 'https://inveniordm.web.cern.ch/account/settings/profile', | ||
newUploadURL: 'https://inveniordm.web.cern.ch/uploads/new' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Direct URLS for a quick navigation | ||
|
||
export const urls = { | ||
baseURL: 'https://inveniordm.web.cern.ch/', | ||
profileURL: 'https://inveniordm.web.cern.ch/account/settings/profile', | ||
newUploadURL: 'https://inveniordm.web.cern.ch/uploads/new', | ||
myDashboard: 'https://inveniordm.web.cern.ch/me/uploads' | ||
}; |
Oops, something went wrong.