Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PPANTT-99] feat: New filters PSP bundles' list #649

Merged
merged 18 commits into from
Aug 30, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/ci_code_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.coverage.exclusions=**/utils/**,**/__mocks__/**,**/__tests__/**,**/api/**,**/e2e/**
-Dsonar.cpd.exclusions=**/__mocks__/**,**/__tests__/**,**/e2e/**
-Dsonar.coverage.exclusions=**/utils/**,**/__mocks__/**,**/__tests__/**,**/api/**,**/e2e/**,**/openApi/**
-Dsonar.cpd.exclusions=**/__mocks__/**,**/__tests__/**,**/e2e/**,**/openApi/**
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions e2e/tests/globalBundles.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Page, test} from '@playwright/test';
import {bundleNameGlobal, deleteAllExpiredBundles, getToBundleDetailPsp} from './utils/bundleUtils';
import {bundleNameGlobal, deleteAllExpiredBundles, getToBundleDetail} from './utils/bundleUtils';
import {BundleTypes, changeToEcUser, changeToPspUser, checkReturnHomepage} from './utils/e2eUtils';

test.setTimeout(100000);
Expand Down Expand Up @@ -86,7 +86,7 @@ test.describe('Global bundles flow', () => {

test('PSP edits global bundle', async () => {
await page.getByTestId('commission-bundles-test').click();
await getToBundleDetailPsp(page, bundleNameGlobal);
await getToBundleDetail(page, bundleNameGlobal);
await page.getByTestId('modify-button').click();
await page.getByTestId('max-import-test').click();
await page.getByTestId('max-import-test').click();
Expand All @@ -106,7 +106,7 @@ test.describe('Global bundles flow', () => {

test('PSP deletes global bundle', async () => {
await page.getByTestId('commission-bundles-test').click();
await getToBundleDetailPsp(page, bundleNameGlobal);
await getToBundleDetail(page, bundleNameGlobal);
await page.getByTestId('delete-button').click();
await page.getByTestId('confirm-button-test').click();
await checkReturnHomepage(page);
Expand Down
16 changes: 7 additions & 9 deletions e2e/tests/privateBundles.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import {Page, test} from '@playwright/test';
import {
bundleNamePrivate,
ciBundleStates,
deleteAllExpiredBundles,
getToBundleDetailEc,
getToBundleDetailPsp,
getToBundleDetail,
validateBundle
} from './utils/bundleUtils';
import {BundleTypes, changeToEcUser, changeToPspUser, checkReturnHomepage} from './utils/e2eUtils';
Expand Down Expand Up @@ -102,7 +100,7 @@ test.describe('Private bundles flow', () => {
test('PSP delete private bundle offer', async () => {
await page.getByTestId('commission-bundles-test').click();
await page.getByTestId('tab-private').click();
await getToBundleDetailPsp(page, bundleNamePrivate, true);
await getToBundleDetail(page, bundleNamePrivate);
await page.getByTestId('request-detail-button').click();
await page.getByTestId('offer-delete-button').click();
await page.getByTestId('confirm-button-test').click();
Expand All @@ -123,7 +121,7 @@ test.describe('Private bundles flow', () => {
await page.getByLabel('Attivi').click();
await page.getByRole('option', { name: 'Disponibili' }).click();
await page.waitForTimeout(2000);
await getToBundleDetailEc(page, bundleNamePrivate, ciBundleStates.AVAILABLE);
await getToBundleDetail(page, bundleNamePrivate);
await page.getByTestId('reject-button').click();
await page.getByTestId('confirm-button-test').click();
await checkReturnHomepage(page);
Expand All @@ -144,7 +142,7 @@ test.describe('Private bundles flow', () => {
await page.getByLabel('Attivi').click();
await page.getByRole('option', { name: 'Disponibili' }).click();
await page.waitForTimeout(2000);
await getToBundleDetailEc(page, bundleNamePrivate, ciBundleStates.AVAILABLE);
await getToBundleDetail(page, bundleNamePrivate);
await page.getByTestId('activate-button').click();
await page.getByTestId('payment-amount-test').nth(0).click();
await page.getByTestId('payment-amount-test').nth(0).fill('40');
Expand All @@ -162,7 +160,7 @@ test.describe('Private bundles flow', () => {
test('EC de-activates private bundle', async () => {
await page.getByTestId('commission-bundles-test').click();
await page.getByTestId('tab-private').click();
await getToBundleDetailEc(page, bundleNamePrivate, ciBundleStates.AVAILABLE);
await getToBundleDetail(page, bundleNamePrivate);
await page.getByTestId('deactivate-button').click();
await page.getByTestId('confirm-button-test').click();
await checkReturnHomepage(page);
Expand All @@ -172,7 +170,7 @@ test.describe('Private bundles flow', () => {
await changeToPspUser(page);
await page.getByTestId('commission-bundles-test').click();
await page.getByTestId('tab-private').click();
await getToBundleDetailPsp(page, bundleNamePrivate, true);
await getToBundleDetail(page, bundleNamePrivate);
await page.getByTestId('delete-button').click();
await page.getByTestId('confirm-button-test').click();
await checkReturnHomepage(page);
Expand All @@ -182,7 +180,7 @@ test.describe('Private bundles flow', () => {
async function sendPrivateBundleOffer(page: Page) {
await page.getByTestId('commission-bundles-test').click();
await page.getByTestId('tab-private').click();
await getToBundleDetailPsp(page, bundleNamePrivate, true);
await getToBundleDetail(page, bundleNamePrivate);
await page.getByRole('link', { name: 'Invita enti' }).click();
await page.getByLabel('Cerca EC').click();
await page.getByTestId('ec-selection-id-test').getByLabel('Cerca EC').fill('EC DEMO');
Expand Down
16 changes: 7 additions & 9 deletions e2e/tests/publicBundles.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import {Page, test} from '@playwright/test';
import {
bundleNamePublic,
ciBundleStates,
deleteAllExpiredBundles,
getToBundleDetailEc,
getToBundleDetailPsp,
getToBundleDetail,
validateBundle
} from './utils/bundleUtils';
import {BundleTypes, changeToEcUser, changeToPspUser, checkReturnHomepage} from './utils/e2eUtils';
Expand Down Expand Up @@ -103,7 +101,7 @@ test.describe('Public bundles flow', () => {
test('EC delete subscription request', async () => {
await page.getByTestId('commission-bundles-test').click();
await page.getByTestId('tab-public').click();
await getToBundleDetailEc(page, bundleNamePublic, ciBundleStates.REQUESTED);
await getToBundleDetail(page, bundleNamePublic);
await page.getByTestId('delete-request-button').click();
await page.getByTestId('confirm-button-test').click();
await checkReturnHomepage(page);
Expand All @@ -117,7 +115,7 @@ test.describe('Public bundles flow', () => {
await changeToPspUser(page);
await page.getByTestId('commission-bundles-test').click();
await page.getByTestId('tab-public').click();
await getToBundleDetailPsp(page, bundleNamePublic, true);
await getToBundleDetail(page, bundleNamePublic);
await page.getByTestId('request-detail-button').click();
await page.getByTestId('request-reject-button').click();
await page.getByTestId('confirm-button-test').click();
Expand All @@ -133,7 +131,7 @@ test.describe('Public bundles flow', () => {
await changeToPspUser(page);
await page.getByTestId('commission-bundles-test').click();
await page.getByTestId('tab-public').click();
await getToBundleDetailPsp(page, bundleNamePublic, true);
await getToBundleDetail(page, bundleNamePublic);
await page.getByTestId('request-detail-button').click();
await page.getByTestId('request-accept-button').click();
await page.getByTestId('confirm-button-test').click();
Expand All @@ -144,7 +142,7 @@ test.describe('Public bundles flow', () => {
await changeToEcUser(page);
await page.getByTestId('commission-bundles-test').click();
await page.getByTestId('tab-public').click();
await getToBundleDetailEc(page, bundleNamePublic, ciBundleStates.ENABLED);
await getToBundleDetail(page, bundleNamePublic);
await page.getByTestId('deactivate-button').click();
await page.getByTestId('confirm-button-test').click();
await checkReturnHomepage(page);
Expand All @@ -154,7 +152,7 @@ test.describe('Public bundles flow', () => {
await changeToPspUser(page);
await page.getByTestId('commission-bundles-test').click();
await page.getByTestId('tab-public').click();
await getToBundleDetailPsp(page, bundleNamePublic, true);
await getToBundleDetail(page, bundleNamePublic);
await page.getByTestId('delete-button').click();
await page.getByTestId('confirm-button-test').click();
await checkReturnHomepage(page);
Expand All @@ -164,7 +162,7 @@ test.describe('Public bundles flow', () => {
async function activatePublicBundle(page: Page) {
await page.getByTestId('commission-bundles-test').click();
await page.getByTestId('tab-public').click();
await getToBundleDetailEc(page, bundleNamePublic, ciBundleStates.AVAILABLE);
await getToBundleDetail(page, bundleNamePublic);
await page.getByTestId('activate-button').click();
await page.getByLabel('Importo a tuo carico').click();
await page.getByLabel('Importo a tuo carico').fill('40');
Expand Down
Loading
Loading