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

fix: tests e2e #220

Merged
merged 27 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9ab19b0
fix(correios): Add debug test
wisley7l Aug 24, 2023
d3bf591
fix(btw): Adjust startup wait time
wisley7l Aug 24, 2023
f88629c
chore(btw): Add try/cath debug
wisley7l Aug 24, 2023
25eab9e
test: return files to previous version
wisley7l Aug 24, 2023
1df92b6
fix(test base): Update payload
wisley7l Aug 25, 2023
9ac49cf
fix(test base): Update payload of create transaction
wisley7l Aug 25, 2023
cbac41e
chore(workflow test): add stdout
wisley7l Aug 25, 2023
1af5777
chore(workflow test): continue on error
wisley7l Aug 25, 2023
171a5e4
chore(workflow test): more sleep read file
wisley7l Aug 25, 2023
729492d
chore(workflow): back workflow test
wisley7l Aug 25, 2023
6a79c0c
chore(test mercado pago): add debug list_payments
wisley7l Aug 25, 2023
6d67b32
chore(module): add debug
wisley7l Aug 25, 2023
3e2e902
chore(workflow): add file .env
wisley7l Aug 25, 2023
deda084
chore(cli): Prepare .env for testing
wisley7l Aug 28, 2023
be19b2a
Merge branch 'main' into fix/tests-e2e
wisley7l Aug 28, 2023
96ef526
chore(test): debug workflow
wisley7l Aug 28, 2023
8a6b30f
chore(tests): Remove debugs
wisley7l Aug 28, 2023
5bed7c5
chore(workflows apps): update app test
wisley7l Aug 29, 2023
540ef4a
Merge branch 'main' into fix/tests-e2e
wisley7l Sep 12, 2023
e89f8ad
feat(frenet): Add test for shipping calculation in frenet app
wisley7l Sep 13, 2023
1df0eae
fix(pnpm-lock): Update pnpm-lock file
wisley7l Sep 13, 2023
10dc28c
Merge branch 'main' into fix/tests-e2e
wisley7l Sep 13, 2023
d6276fe
fix(pnpm-lock): Update pnpm-lock file
wisley7l Sep 13, 2023
c9158f1
fix(pnpm-lock): Update pnpm-lock file
wisley7l Sep 13, 2023
0265024
fix(pnpm-lock): Update pnpm-lock file
wisley7l Sep 13, 2023
0ff3de4
fix(test-mercadopago): Remove debug
wisley7l Sep 13, 2023
07e5c48
Update packages/apps/frenet/package.json
leomp12 Sep 13, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,5 @@ jobs:
- name: Run tests
shell: bash
run: |
sleep 10
sleep 20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isso aqui não é bom não...
Precisa mesmo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Não precisa não, coloquei so pra verificar umas coisas. Mas já vou voltar.

pnpm test:e2e
23 changes: 14 additions & 9 deletions packages/apps/correios/tests/calculate-shipping.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,20 @@ describe('Test Shipping Calculation in the Correios App', async () => {
const appId = 1248;

before(async () => {
req = await fetch(`${modulesUrl}/calculate_shipping?app_id=${appId}`, {
method: 'POST',
body: JSON.stringify(bodyCalculateShipping),
headers: {
'Content-Type': 'application/json',
},
});

data = (await req.json()).result;
try {
req = await fetch(`${modulesUrl}/calculate_shipping?app_id=${appId}`, {
method: 'POST',
body: JSON.stringify(bodyCalculateShipping),
headers: {
'Content-Type': 'application/json',
},
});

data = (await req.json()).result;
} catch (err) {
console.error(err);
}
console.log('>> ', req, ' ', data);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try catch em teste ? 🤔

});

test('Check Status 200', async () => {
Expand Down