Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brablcp committed Oct 16, 2024
1 parent ecbfaa5 commit 1abb6b3
Show file tree
Hide file tree
Showing 261 changed files with 21,633 additions and 168 deletions.
36 changes: 36 additions & 0 deletions .history/.github/workflows/tests_20241014181722.yml
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
36 changes: 36 additions & 0 deletions .history/.github/workflows/tests_20241014181733.yml
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
33 changes: 33 additions & 0 deletions .history/.github/workflows/tests_20241015083435.yml
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
34 changes: 34 additions & 0 deletions .history/data/testData_20241014104838.ts
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']),
},
};
34 changes: 34 additions & 0 deletions .history/data/testData_20241015133103.ts
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']),
},
};
34 changes: 34 additions & 0 deletions .history/data/testData_20241015133602.ts
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']),
},
};
42 changes: 42 additions & 0 deletions .history/data/testData_20241015141049.ts
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);
},
},
};
58 changes: 58 additions & 0 deletions .history/data/testData_20241015141140.ts
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);
},
},
};
57 changes: 57 additions & 0 deletions .history/data/testData_20241015141159.ts
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);
},
},
};
7 changes: 7 additions & 0 deletions .history/data/urls_20241014104838.ts
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'
};
8 changes: 8 additions & 0 deletions .history/data/urls_20241016124023.ts
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'
};
Loading

0 comments on commit 1abb6b3

Please sign in to comment.