diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 51f16b051..6eb759301 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,15 +5,6 @@ on: pull_request: branches: [main] -# Assign permissions for unit tests to be reported. -# See https://github.com/dorny/test-reporter/issues/168 -permissions: - statuses: write - checks: write - contents: write - pull-requests: write - actions: write - jobs: unit-test: name: Unit Tests @@ -21,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' - name: Install dependencies @@ -56,7 +47,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' @@ -75,19 +66,17 @@ jobs: node ../../bruno-cli/bin/bru.js run --env Prod --output junit.xml --format junit - name: Publish Test Report - uses: dorny/test-reporter@v1 - if: success() || failure() + uses: EnricoMi/publish-unit-test-result-action@v2 + if: always() with: - name: Test Report - path: packages/bruno-tests/collection/junit.xml - reporter: java-junit - + files: packages/bruno-tests/collection/junit.xml + comment_mode: always prettier: name: Prettier runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' - name: Install dependencies diff --git a/packages/bruno-app/src/components/Sidebar/ImportCollection/index.js b/packages/bruno-app/src/components/Sidebar/ImportCollection/index.js index f95518e43..e092e608d 100644 --- a/packages/bruno-app/src/components/Sidebar/ImportCollection/index.js +++ b/packages/bruno-app/src/components/Sidebar/ImportCollection/index.js @@ -11,9 +11,10 @@ const ImportCollection = ({ onClose, handleSubmit }) => { enablePostmanTranslations: { enabled: true, label: 'Auto translate postman scripts', - subLabel: "When enabled, Bruno will try as best to translate the scripts from the imported collection to Bruno's format." + subLabel: + "When enabled, Bruno will try as best to translate the scripts from the imported collection to Bruno's format." } - }) + }); const handleImportBrunoCollection = () => { importBrunoCollection() .then((collection) => { @@ -46,10 +47,13 @@ const ImportCollection = ({ onClose, handleSubmit }) => { .catch((err) => toastError(err, 'OpenAPI v3 Import collection failed')); }; const toggleOptions = (event, optionKey) => { - setOptions({ ...options, [optionKey]: { + setOptions({ + ...options, + [optionKey]: { ...options[optionKey], enabled: !options[optionKey].enabled - } }); + } + }); }; const CollectionButton = ({ children, className, onClick }) => { return ( @@ -61,25 +65,17 @@ const ImportCollection = ({ onClose, handleSubmit }) => { > {children} - ) - } + ); + }; return (

Select the type of your existing collection :

- - Bruno Collection - - - Postman Collection - - - Insomnia Collection - - - OpenAPI V3 Spec - + Bruno Collection + Postman Collection + Insomnia Collection + OpenAPI V3 Spec
{Object.entries(options || {}).map(([key, option]) => ( @@ -91,7 +87,7 @@ const ImportCollection = ({ onClose, handleSubmit }) => { name="comments" type="checkbox" checked={option.enabled} - onChange={(e) => toggleOptions(e,key)} + onChange={(e) => toggleOptions(e, key)} className="h-3.5 w-3.5 rounded border-zinc-300 dark:ring-offset-zinc-800 bg-transparent text-indigo-600 dark:text-indigo-500 focus:ring-indigo-600 dark:focus:ring-indigo-500" />
diff --git a/packages/bruno-app/src/components/Sidebar/ImportCollectionLocation/index.js b/packages/bruno-app/src/components/Sidebar/ImportCollectionLocation/index.js index d8cd3dfd2..62a02bdd5 100644 --- a/packages/bruno-app/src/components/Sidebar/ImportCollectionLocation/index.js +++ b/packages/bruno-app/src/components/Sidebar/ImportCollectionLocation/index.js @@ -45,11 +45,7 @@ const ImportCollectionLocation = ({ onClose, handleSubmit, collectionName }) => const onSubmit = () => formik.handleSubmit(); return ( - +