Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions .github/workflows/dotnet-core-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,12 @@ jobs:
cp -av eform-angular-timeplanning-plugin/eform-client/playwright/helpers eform-angular-frontend/eform-client/playwright/helpers
cp -av eform-angular-timeplanning-plugin/eform-client/playwright.config.ts eform-angular-frontend/eform-client/playwright.config.ts
cd eform-angular-frontend/eform-client && ../../eform-angular-timeplanning-plugin/testinginstallpn.sh
- name: Enable Corepack
run: corepack enable
- name: yarn install
run: cd eform-angular-frontend/eform-client && yarn install
- name: Run Angular unit tests
run: |
cd eform-angular-frontend/eform-client
# Check if Jest is configured
if [ ! -f "jest.config.js" ] && [ ! -f "jest.config.ts" ]; then
echo "⚠️ Jest is not configured in the frontend repository."
echo "Unit tests require Jest to be configured. Skipping unit tests."
echo ""
echo "To enable unit tests, ensure Jest is configured in the frontend repository."
exit 0
fi

# Run Jest tests for time-planning-pn plugin
echo "Running Jest tests for time-planning-pn plugin..."
npm run test:unit -- --testPathPatterns=time-planning-pn --coverage --collectCoverageFrom='src/app/plugins/modules/time-planning-pn/**/*.ts' --coveragePathIgnorePatterns='\.spec\.ts$'
run: cd eform-angular-frontend/eform-client && npx ng test --watch=false --include='src/app/plugins/modules/time-planning-pn/**/*.spec.ts'
pn-playwright-test:
needs: build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -148,6 +137,8 @@ jobs:
cp -av eform-angular-timeplanning-plugin/eform-client/playwright.config.ts eform-angular-frontend/eform-client/playwright.config.ts
cp -av eform-angular-timeplanning-plugin/eform-client/cypress.config.ts eform-angular-frontend/eform-client/cypress.config.ts
cd eform-angular-frontend/eform-client && ../../eform-angular-timeplanning-plugin/testinginstallpn.sh
- name: Enable Corepack
run: corepack enable
- name: yarn install
run: cd eform-angular-frontend/eform-client && yarn install
- name: Install Playwright browsers
Expand Down
25 changes: 8 additions & 17 deletions .github/workflows/dotnet-core-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
fetch-depth: 0
repository: microting/eform-angular-frontend
ref: stable
ref: ${{ github.base_ref }}
path: eform-angular-frontend
- name: Copy dependencies
run: |
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
with:
fetch-depth: 0
repository: microting/eform-angular-frontend
ref: stable
ref: ${{ github.base_ref }}
path: eform-angular-frontend
- name: Use Node.js
uses: actions/setup-node@v3
Expand All @@ -69,23 +69,12 @@ jobs:
cp -av eform-angular-timeplanning-plugin/eform-client/playwright/helpers eform-angular-frontend/eform-client/playwright/helpers
cp -av eform-angular-timeplanning-plugin/eform-client/playwright.config.ts eform-angular-frontend/eform-client/playwright.config.ts
cd eform-angular-frontend/eform-client && ../../eform-angular-timeplanning-plugin/testinginstallpn.sh
- name: Enable Corepack
run: corepack enable
- name: yarn install
run: cd eform-angular-frontend/eform-client && yarn install
- name: Run Angular unit tests
run: |
cd eform-angular-frontend/eform-client
# Check if Jest is configured
if [ ! -f "jest.config.js" ] && [ ! -f "jest.config.ts" ]; then
echo "⚠️ Jest is not configured in the frontend repository."
echo "Unit tests require Jest to be configured. Skipping unit tests."
echo ""
echo "To enable unit tests, ensure Jest is configured in the frontend repository."
exit 0
fi

# Run Jest tests for time-planning-pn plugin
echo "Running Jest tests for time-planning-pn plugin..."
npm run test:unit -- --testPathPatterns=time-planning-pn --coverage --collectCoverageFrom='src/app/plugins/modules/time-planning-pn/**/*.ts' --coveragePathIgnorePatterns='\.spec\.ts$'
run: cd eform-angular-frontend/eform-client && npx ng test --watch=false --include='src/app/plugins/modules/time-planning-pn/**/*.spec.ts'
pn-playwright-test:
needs: build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -124,7 +113,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
ref: ${{ github.base_ref }}
path: eform-angular-frontend
- name: Copy dependencies
run: |
Expand All @@ -137,6 +126,8 @@ jobs:
cp -av eform-angular-timeplanning-plugin/eform-client/playwright.config.ts eform-angular-frontend/eform-client/playwright.config.ts
cp -av eform-angular-timeplanning-plugin/eform-client/cypress.config.ts eform-angular-frontend/eform-client/cypress.config.ts
cd eform-angular-frontend/eform-client && ../../eform-angular-timeplanning-plugin/testinginstallpn.sh
- name: Enable Corepack
run: corepack enable
- name: yarn install
run: cd eform-angular-frontend/eform-client && yarn install
- name: Install Playwright browsers
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ARG DISABLE_SENTRY
ENV PATH /app/node_modules/.bin:$PATH
ENV DISABLE_SENTRY=${DISABLE_SENTRY}
COPY eform-angular-frontend/eform-client ./
RUN corepack enable
RUN yarn install
RUN yarn build

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Enable Backend Config plugin', () => {
const pluginName = 'Microting Time Planning Plugin';

// Open action menu for the plugin
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

// Click the status button inside the menu to enable the plugin
Expand All @@ -36,7 +36,7 @@ describe('Enable Backend Config plugin', () => {

// Verify the plugin is enabled by checking the status
// Re-open the action menu to check the status
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

cy.get('#plugin-status-button0')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Enable Backend Config plugin', () => {
const pluginName = 'Microting Time Planning Plugin';

// Open action menu for the plugin
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

// Click the status button inside the menu to enable the plugin
Expand All @@ -33,7 +33,7 @@ describe('Enable Backend Config plugin', () => {

// Verify the plugin is enabled by checking the status
// Re-open the action menu to check the status
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

cy.get('#plugin-status-button0')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ describe('Dashboard assert', () => {
pluginPage.Navbar.goToPluginsPage();

cy.task('log', '[Folder b - Dashboard Assert] Clicking action menu');
cy.get('#actionMenu')
cy.get('[id^="actionMenu"]')
.scrollIntoView().should('be.visible')
.click({ force: true });
cy.task('log', '[Folder b - Dashboard Assert] Setting up intercept for settings-get');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Enable Backend Config plugin', () => {
it('should validate default Time registration plugin settings', () => {
cy.task('log', '[Folder b - Settings] ========== Test: Validate default Time registration plugin settings ==========');
cy.task('log', '[Folder b - Settings] Clicking action menu');
cy.get('#actionMenu')
cy.get('[id^="actionMenu"]')
.scrollIntoView().should('be.visible')
.click({ force: true });
cy.task('log', '[Folder b - Settings] Setting up intercept for settings-get');
Expand Down Expand Up @@ -138,7 +138,7 @@ describe('Enable Backend Config plugin', () => {
it('should activate auto calculation break times', () => {
cy.task('log', '[Folder b - Settings] ========== Test: Activate auto calculation break times ==========');
cy.task('log', '[Folder b - Settings] Clicking action menu');
cy.get('#actionMenu')
cy.get('[id^="actionMenu"]')
.scrollIntoView().should('be.visible')
.click({ force: true });
cy.task('log', '[Folder b - Settings] Setting up intercept for settings-get');
Expand Down Expand Up @@ -300,7 +300,7 @@ describe('Enable Backend Config plugin', () => {
pluginPage.Navbar.goToPluginsPage();

cy.task('log', '[Folder b - Settings] Clicking action menu to verify settings');
cy.get('#actionMenu')
cy.get('[id^="actionMenu"]')
.scrollIntoView().should('be.visible')
.click({ force: true });
cy.task('log', '[Folder b - Settings] Setting up intercept for settings-get');
Expand Down Expand Up @@ -363,7 +363,7 @@ describe('Enable Backend Config plugin', () => {
cy.task('log', '[Folder b - Settings] ========== Test: Toggle GPS and Snapshot settings ==========');
// Navigate to settings page
cy.task('log', '[Folder b - Settings] Clicking action menu');
cy.get('#actionMenu')
cy.get('[id^="actionMenu"]')
.scrollIntoView().should('be.visible')
.click({ force: true });
cy.task('log', '[Folder b - Settings] Setting up intercept for settings-get');
Expand Down Expand Up @@ -401,7 +401,7 @@ describe('Enable Backend Config plugin', () => {
cy.task('log', '[Folder b - Settings] Reloading page to verify GPS persistence');
cy.visit('http://localhost:4200');
pluginPage.Navbar.goToPluginsPage();
cy.get('#actionMenu')
cy.get('[id^="actionMenu"]')
.scrollIntoView().should('be.visible')
.click({ force: true });
cy.intercept('GET', '**/api/time-planning-pn/settings').as('settings-get-2');
Expand Down Expand Up @@ -437,7 +437,7 @@ describe('Enable Backend Config plugin', () => {
// Reload page and verify GPS is still OFF
cy.visit('http://localhost:4200');
pluginPage.Navbar.goToPluginsPage();
cy.get('#actionMenu')
cy.get('[id^="actionMenu"]')
.scrollIntoView().should('be.visible')
.click({ force: true });
cy.intercept('GET', '**/api/time-planning-pn/settings').as('settings-get-3');
Expand Down Expand Up @@ -472,7 +472,7 @@ describe('Enable Backend Config plugin', () => {
cy.task('log', '[Folder b - Settings] Reloading page to verify Snapshot persistence');
cy.visit('http://localhost:4200');
pluginPage.Navbar.goToPluginsPage();
cy.get('#actionMenu')
cy.get('[id^="actionMenu"]')
.scrollIntoView().should('be.visible')
.click({ force: true });
cy.intercept('GET', '**/api/time-planning-pn/settings').as('settings-get-4');
Expand Down Expand Up @@ -508,7 +508,7 @@ describe('Enable Backend Config plugin', () => {
cy.task('log', '[Folder b - Settings] Reloading page to verify Snapshot is still OFF');
cy.visit('http://localhost:4200');
pluginPage.Navbar.goToPluginsPage();
cy.get('#actionMenu')
cy.get('[id^="actionMenu"]')
.scrollIntoView().should('be.visible')
.click({ force: true });
cy.intercept('GET', '**/api/time-planning-pn/settings').as('settings-get-5');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Enable Backend Config plugin', () => {
const pluginName = 'Microting Time Planning Plugin';

// Open action menu for the plugin
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

// Click the status button inside the menu to enable the plugin
Expand All @@ -33,7 +33,7 @@ describe('Enable Backend Config plugin', () => {

// Verify the plugin is enabled by checking the status
// Re-open the action menu to check the status
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

cy.get('#plugin-status-button0')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ describe('Dashboard edit values', () => {

it('should enable auto break calculations with empty values', () => {
pluginPage.Navbar.goToPluginsPage();
cy.get('#actionMenu')
cy.get('[id^="actionMenu"]')
.scrollIntoView().should('be.visible')
.click({ force: true });
cy.intercept('GET', '**/api/time-planning-pn/settings').as('settings-get');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Enable Backend Config plugin', () => {
const pluginName = 'Microting Time Planning Plugin';

// Open action menu for the plugin
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

// Click the status button inside the menu to enable the plugin
Expand All @@ -33,7 +33,7 @@ describe('Enable Backend Config plugin', () => {

// Verify the plugin is enabled by checking the status
// Re-open the action menu to check the status
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

cy.get('#plugin-status-button0')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Enable Backend Config plugin', () => {
const pluginName = 'Microting Time Planning Plugin';

// Open action menu for the plugin
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

// Click the status button inside the menu to enable the plugin
Expand All @@ -33,7 +33,7 @@ describe('Enable Backend Config plugin', () => {

// Verify the plugin is enabled by checking the status
// Re-open the action menu to check the status
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

cy.get('#plugin-status-button0')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Enable Backend Config plugin', () => {
const pluginName = 'Microting Time Planning Plugin';

// Open action menu for the plugin
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

// Click the status button inside the menu to enable the plugin
Expand All @@ -33,7 +33,7 @@ describe('Enable Backend Config plugin', () => {

// Verify the plugin is enabled by checking the status
// Re-open the action menu to check the status
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

cy.get('#plugin-status-button0')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Enable Backend Config plugin', () => {
const pluginName = 'Microting Time Planning Plugin';

// Open action menu for the plugin
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

// Click the status button inside the menu to enable the plugin
Expand All @@ -33,7 +33,7 @@ describe('Enable Backend Config plugin', () => {

// Verify the plugin is enabled by checking the status
// Re-open the action menu to check the status
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

cy.get('#plugin-status-button0')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Enable Backend Config plugin', () => {
const pluginName = 'Microting Time Planning Plugin';

// Open action menu for the plugin
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

// Click the status button inside the menu to enable the plugin
Expand All @@ -33,7 +33,7 @@ describe('Enable Backend Config plugin', () => {

// Verify the plugin is enabled by checking the status
// Re-open the action menu to check the status
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

cy.get('#plugin-status-button0')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Enable Backend Config plugin', () => {
const pluginName = 'Microting Time Planning Plugin';

// Open action menu for the plugin
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

// Click the status button inside the menu to enable the plugin
Expand All @@ -33,7 +33,7 @@ describe('Enable Backend Config plugin', () => {

// Verify the plugin is enabled by checking the status
// Re-open the action menu to check the status
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

cy.get('#plugin-status-button0')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Enable Backend Config plugin', () => {
const pluginName = 'Microting Time Planning Plugin';

// Open action menu for the plugin
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

// Click the status button inside the menu to enable the plugin
Expand All @@ -33,7 +33,7 @@ describe('Enable Backend Config plugin', () => {

// Verify the plugin is enabled by checking the status
// Re-open the action menu to check the status
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
cy.contains('.mat-mdc-row', pluginName).first().find('[id^="actionMenu"]').click();
cy.wait(500);

cy.get('#plugin-status-button0')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Dashboard edit values', () => {
cy.task('log', '[Folder j - Auto Break Settings] Navigating to plugins page');
pluginPage.Navbar.goToPluginsPage();
cy.task('log', '[Folder j - Auto Break Settings] Clicking action menu');
cy.get('#actionMenu')
cy.get('[id^="actionMenu"]')
.scrollIntoView().should('be.visible')
.click({ force: true });
cy.intercept('GET', '**/api/time-planning-pn/settings').as('settings-get');
Expand Down Expand Up @@ -231,7 +231,7 @@ describe('Dashboard edit values', () => {
// cy.wait(500);
//
// pluginPage.Navbar.goToPluginsPage();
// cy.get('#actionMenu')
// cy.get('[id^="actionMenu"]')
// .should('be.visible')
// .click({ force: true });
// cy.intercept('GET', '**/api/time-planning-pn/settings').as('settings-get');
Expand Down
Loading
Loading