Skip to content

Commit dcfa8e5

Browse files
authored
OBPIH-6760 Add obdev5 environment option (#29)
plus skip broken impersonate user tests
1 parent 3e8a73b commit dcfa8e5

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

.github/workflows/playwright.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ on:
1212
description: 'Select environment'
1313
required: true
1414
type: choice
15-
default: 'obdev3'
15+
default: 'obdev5'
1616
options:
1717
- obdev3
18+
- obdev5
1819
- stg
1920
pull_request:
2021
branches:
@@ -62,7 +63,9 @@ jobs:
6263
LOCATION_WARD: ${{ secrets.LOCATION_WARD }}
6364
PRODUCT_ONE: ${{ secrets.PRODUCT_ONE }}
6465
PRODUCT_TWO: ${{ secrets.PRODUCT_TWO }}
65-
run: npx playwright test
66+
run: |
67+
echo "Running playwright tests on the ${{ inputs.environment || 'obdev5' }} server"
68+
npx playwright test
6669
6770
- name: Upload Playwright Report to Artifacts
6871
if: ${{ always() }}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"lint-fix": "eslint . --fix",
99
"format": "npx prettier --write .",
1010
"test": "npx playwright test",
11+
"ui": "npx playwright test --ui",
1112
"report": "npx playwright show-report"
1213
},
1314
"repository": {

src/tests/inbound/createInbound/exportItems.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ test.describe('Export all incoming items', () => {
210210
});
211211
});
212212

213-
test('Export all incoming items should not include received items', async ({
213+
// TODO: Adjust to rely on the empty database (on empty db it fails, because there is 404 No shipment items found)
214+
test.skip('Export all incoming items should not include received items', async ({
214215
inboundListPage,
215216
stockMovementShowPage,
216217
stockMovementService,

src/tests/locationChooser/locationInLocationChooserBasedOnUserPermissions.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,8 @@ test.describe('Check if ward location is present in location chooser based on us
856856
}
857857
);
858858

859-
test('Assert created Ward on location chooser in impersonate mode', async ({
859+
// TODO: OBPIH-6909 Fix menu clicking when impersonating users
860+
test.skip('Assert created Ward on location chooser in impersonate mode', async ({
860861
userListPage,
861862
editUserPage,
862863
}) => {

src/tests/receiving/lotExpirySystemUpdateOnReceiving.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import { StockMovementResponse } from '@/types';
44
import { formatDate, getDateByOffset, getToday } from '@/utils/DateUtils';
55
import UniqueIdentifier from '@/utils/UniqueIdentifier';
66

7-
test.describe('Lot number system expiry date modification on receving workflow', () => {
7+
test.describe('Lot number system expiry date modification on receiving workflow', () => {
88
const STOCK_MOVEMENTS: StockMovementResponse[] = [];
99

1010
test.afterEach(async ({ stockMovementShowPage, stockMovementService }) => {
11+
// TODO: Improve this one, it is prone to getting stuck if there are not deleted SMs in the tested location
1112
while (STOCK_MOVEMENTS.length > 0) {
1213
const STOCK_MOVEMENT = STOCK_MOVEMENTS.pop() as StockMovementResponse;
1314

src/tests/users/userPermission.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ test('Add default location for user and auto-login to location', async ({
9696
await expect(newUserPage.getByText('My Dashboard')).toBeVisible();
9797
});
9898

99-
test('Impersonate created user', async ({ editUserPage }) => {
99+
// TODO: OBPIH-6909 Fix menu clicking when impersonating users
100+
test.skip('Impersonate created user', async ({ editUserPage }) => {
100101
await test.step('Select role "Manager"', async () => {
101102
await editUserPage.authorizationTabSection.defaultRoleSelect.click();
102103
await editUserPage.authorizationTabSection.getUserRole('Manager').click();

0 commit comments

Comments
 (0)