Skip to content

Commit

Permalink
Merge pull request #130 from massalabs/fix-test
Browse files Browse the repository at this point in the history
Remove the `if` condition from the `ci-tests.yml` workflow file.
  • Loading branch information
Ben-Rey authored Sep 6, 2023
2 parents 01956ec + 47e9d38 commit 91ea4da
Show file tree
Hide file tree
Showing 60 changed files with 3,614 additions and 2,984 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ node_modules
bundle.*
docs
dist
test/simple-browser-extension
test-extension/simple-browser-extension
5 changes: 2 additions & 3 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ name: CI tests
on: [push]
jobs:
unit-tests:
if: false
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.32.0-focal
image: mcr.microsoft.com/playwright:v1.36.2-focal
steps:
- uses: actions/checkout@v3

Expand All @@ -21,4 +20,4 @@ jobs:
run: npm run build

- name: Test using dummy extension
run: HOME=/root npm run test
run: HOME=/root npm run test-extension
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ docs
.env

# Playwright tests results
test/playwright-tests/playwright-report
test-extension/playwright-tests/playwright-report

test/runner.js
test-extension/runner.js
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
src/
test/
test-extension/
tsconfig.json
tslint.json
.npmrc
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ dist
*.md
*.html
*.css
test/simple-browser-extension
test-extension/simple-browser-extension

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"update-version-major": "npm version major",
"update-version-minor": "npm version minor",
"update-version-patch": "npm version patch",
"test:serve-dapp": "cp ./bundle.js ./test/dapp/bundle.js && http-server test/dapp --cors --port 9009",
"test": "cd ./test && npx playwright test",
"test-extension:serve-dapp": "cp ./bundle.js ./test-extension/dapp/bundle.js && http-server test-extension/dapp --cors --port 9009",
"test-extension": "cd ./test-extension && npx playwright test",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"prettier": "prettier --check .",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/dapp/index.html → test-extension/dapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
console.log("[DAPP_HTML] Discovered providers ...", providers);

// get a provider (not MASSASTATION)
const myProvider = providers.find((p) => p.name() !== "MASSASTATION");
const myProvider = providers.find((p) => p.name() === "SPACE_X");
console.log("[DAPP_HTML] Provider Name", myProvider);

// import an account
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,15 @@ export default defineConfig({
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
// {
// name: 'firefox',
// use: { ...devices['Desktop Firefox'] },
// },
],

/* Run your local dev server before starting the tests */
webServer: {
command: 'npm run test:serve-dapp',
command: 'npm run test-extension:serve-dapp',
port: 9009,
},
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
src/
test/
test-extension/
tsconfig.json
tslint.json
.npmrc
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">

<title>Background</title>
<script type='text/javascript' src='lib/browserified.js'></script>
<script type="module" src="background.js"></script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ class MassaSpaceWalletImpl {
return ['http://localhost:1234', 'https://massa-nodes.net'];
} else if (request.action === 'buyRolls') {
return {
operationId: "ABC"
}
operationId: 'ABC',
};
} else if (request.action === 'sellRolls') {
return {
operationId: "XYZ"
}
operationId: 'XYZ',
};
} else if (request.action === 'sendTransaction') {
return {
operationId: "MNP"
}
operationId: 'MNP',
};
} else if (request.action === 'callSC') {
return {
operationId: "RST"
}
operationId: 'RST',
};
} else {
return undefined;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const WALLET_PROVIDER_NAME = 'SPACE_X';
}
async generateNewAccount(payload) {
return {
name: "new-account",
name: 'new-account',
address: '0x1234',
};
}
Expand Down
Loading

0 comments on commit 91ea4da

Please sign in to comment.