Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feature/static-waves
Browse files Browse the repository at this point in the history
  • Loading branch information
mariush2 committed Jan 16, 2025
2 parents 830d7d3 + 7c0d8e1 commit 3ab2094
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 339 deletions.
2 changes: 1 addition & 1 deletion config/config_files/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
trailingComma: 'es5',
tabWidth: 2,
useTabs: false,
Expand Down
2 changes: 1 addition & 1 deletion config/config_files/check_config_workflow/list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ setupLocalhost.mjs client/src https://raw.githubusercontent.com/equinor/amplify-
setupTests.ts client/src/test-utils https://raw.githubusercontent.com/equinor/amplify-component-lib/refs/heads/main/config/config_files/test-utils/setupTests.ts
vitest.d.ts client/src/test-utils https://raw.githubusercontent.com/equinor/amplify-component-lib/refs/heads/main/config/config_files/test-utils/vitest.d.ts
browserMocks.ts client/src/test-utils https://raw.githubusercontent.com/equinor/amplify-component-lib/refs/heads/main/config/config_files/test-utils/browserMocks.ts
portalMock.ts client/src/test-utils https://raw.githubusercontent.com/equinor/amplify-component-lib/refs/heads/main/config/config_files/test-utils/portalMock.ts
samMock.ts client/src/test-utils https://raw.githubusercontent.com/equinor/amplify-component-lib/refs/heads/main/config/config_files/test-utils/samMock.ts
playwright.ts client/src/test-utils https://raw.githubusercontent.com/equinor/amplify-component-lib/refs/heads/main/config/config_files/test-utils/playwright.ts
build.yaml .github/workflows https://raw.githubusercontent.com/equinor/amplify-component-lib/refs/heads/main/config/config_files/workflows/build.yaml
e2e.yaml .github/workflows https://raw.githubusercontent.com/equinor/amplify-component-lib/refs/heads/main/config/config_files/workflows/e2e.yaml
Expand Down
301 changes: 0 additions & 301 deletions config/config_files/test-utils/portalMock.ts

This file was deleted.

80 changes: 80 additions & 0 deletions config/config_files/test-utils/samMock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import { FeatureToggleDto, Tutorial } from '@equinor/subsurface-app-management';
import { faker } from '@faker-js/faker';

import { delay, http, HttpResponse } from 'msw';

export const handlers = [
http.get('*/api/v1/Tutorial/SASToken', async () => {
await delay('real');
return HttpResponse.text(faker.internet.mac());
}),
http.get('*/api/v1/Tutorial/{applicationName}', async () => {
await delay('real');
const body: Tutorial[] = [];
return HttpResponse.json(body);
}),
http.get('*/api/v1/FeatureToggle', async () => {
await delay('real');
const body: FeatureToggleDto = {
applicationName: 'orca',
features: [],
};
return HttpResponse.json(body);
}),
http.get('*/api/v1/AmplifyApplication/application/*/appRoles', async () => {
await delay('real');
return HttpResponse.json([]);
}),
http.get('*/api/v1/ImpersonateUser/CanImpersonate', async () => {
return HttpResponse.text('true');
}),
http.get('*/api/v1/ImpersonateUser/ActiveUser', async () => {
await delay('real');
return HttpResponse.json(undefined, { status: 204 });
}),
http.get('*/api/v1/ImpersonateUser/GetImpersonateUserForApp/*', async () => {
await delay('real');
return HttpResponse.json([]);
}),
http.get('*/api/v1/Token/AmplifyPortal', async () => {
await delay('real');
return HttpResponse.text(faker.string.nanoid());
}),
http.get('*/api/v1/Token/AmplifyPortal/*', async () => {
await delay('real');
return HttpResponse.text(faker.string.nanoid());
}),
http.get('*/api/v1/Token/SamPortal', async () => {
await delay('real');
return HttpResponse.text(faker.string.nanoid());
}),
http.get('*/api/v1/Token/SamPortal/*', async () => {
await delay('real');
return HttpResponse.text(faker.string.nanoid());
}),
http.get('*/api/v1/ReleaseNotes', async () => {
await delay('real');
return HttpResponse.json([]);
}),
http.get('*/api/v1/ReleaseNotes/:applicationName', async () => {
await delay('real');
return HttpResponse.json([]);
}),
http.get('*/api/v1/ReleaseNotes/GetContainerSasUri', async () => {
await delay('real');
return HttpResponse.text(
`${faker.internet.url()}?${faker.string.nanoid()}`
);
}),
http.get('*/api/v1/AmplifyApplication/userapplications', async () => {
await delay('real');
return HttpResponse.json([]);
}),
http.get(
'*/api/v1/FeatureToggle/:appName/:currentEnvironment/myfeatures',
async () => {
await delay('real');
return HttpResponse.json([]);
}
),
];
Loading

0 comments on commit 3ab2094

Please sign in to comment.