From 8d11923bccce6fec77114760c52e59a01d3dc607 Mon Sep 17 00:00:00 2001 From: Call Delegation <106365423+calldelegation@users.noreply.github.com> Date: Sun, 6 Oct 2024 23:14:52 -0400 Subject: [PATCH] reintroducing tests --- .github/workflows/guides.yml | 6 +- .gitmodules | 1 - tests/test.spec.ts | 136 +++++++++++++++++------------------ 3 files changed, 71 insertions(+), 72 deletions(-) diff --git a/.github/workflows/guides.yml b/.github/workflows/guides.yml index 66189bc87..ade479fd4 100644 --- a/.github/workflows/guides.yml +++ b/.github/workflows/guides.yml @@ -43,9 +43,9 @@ jobs: # note: must match the names in test.spec.ts guide: - "intro to sway" - # - "counter-dapp" - # - "intro to predicates" - # - "quickstart" + - "counter-dapp" + - "intro to predicates" + - "quickstart" steps: # SETUP diff --git a/.gitmodules b/.gitmodules index 7da410402..924736867 100644 --- a/.gitmodules +++ b/.gitmodules @@ -28,7 +28,6 @@ [submodule "docs/guides/examples/intro-to-sway"] path = docs/guides/examples/intro-to-sway url = https://github.com/FuelLabs/intro-to-sway.git - branch = restructure-and-bump [submodule "docs/guides/examples/intro-to-predicates"] path = docs/guides/examples/intro-to-predicates url = https://github.com/FuelLabs/intro-to-predicates.git diff --git a/tests/test.spec.ts b/tests/test.spec.ts index ffbb8eea2..d5f0349c2 100644 --- a/tests/test.spec.ts +++ b/tests/test.spec.ts @@ -4,43 +4,43 @@ import { setupFolders, startServers, stopServers } from './utils/setup'; import { useFuelWallet } from './utils/wallet'; test.describe('Guides', () => { - // test('quickstart', async ({ context, extensionId, page }) => { - // const CONTRACT_QUICKSTART_PAGE_URL = 'guides/contract-quickstart'; + test('quickstart', async ({ context, extensionId, page }) => { + const CONTRACT_QUICKSTART_PAGE_URL = 'guides/contract-quickstart'; - // // SETUP - // stopServers(); - // await useFuelWallet(context, extensionId, page); - // await setupFolders('fuel-project'); - // await startServers(page); + // SETUP + stopServers(); + await useFuelWallet(context, extensionId, page); + await setupFolders('fuel-project'); + await startServers(page); - // // TEST CONTRACT QUICKSTART - // await runTest(page, context, CONTRACT_QUICKSTART_PAGE_URL); + // TEST CONTRACT QUICKSTART + await runTest(page, context, CONTRACT_QUICKSTART_PAGE_URL); - // // SHUT DOWN - // stopServers(); - // // context.close(); - // }); + // SHUT DOWN + stopServers(); + // context.close(); + }); - // test('counter-dapp', async ({ context, extensionId, page }) => { - // const CONTRACT_PAGE_URL = 'guides/counter-dapp/building-a-smart-contract'; - // const FRONTEND_PAGE_URL = 'guides/counter-dapp/building-a-frontend'; + test('counter-dapp', async ({ context, extensionId, page }) => { + const CONTRACT_PAGE_URL = 'guides/counter-dapp/building-a-smart-contract'; + const FRONTEND_PAGE_URL = 'guides/counter-dapp/building-a-frontend'; - // // SETUP - // stopServers(); - // await useFuelWallet(context, extensionId, page); - // await setupFolders('fuel-project'); - // await startServers(page); + // SETUP + stopServers(); + await useFuelWallet(context, extensionId, page); + await setupFolders('fuel-project'); + await startServers(page); - // // TEST CONTRACT - // await runTest(page, context, CONTRACT_PAGE_URL); + // TEST CONTRACT + await runTest(page, context, CONTRACT_PAGE_URL); - // // TEST FRONTEND - // await runTest(page, context, FRONTEND_PAGE_URL); + // TEST FRONTEND + await runTest(page, context, FRONTEND_PAGE_URL); - // // SHUT DOWN - // stopServers(); - // // context.close(); - // }); + // SHUT DOWN + stopServers(); + // context.close(); + }); test('intro to sway', async ({ context, extensionId, page }) => { const PREREQUISITES_PAGE_URL = 'guides/intro-to-sway/prerequisites'; @@ -77,43 +77,43 @@ test.describe('Guides', () => { // context.close(); }); - // test('intro to predicates', async ({ context, extensionId, page }) => { - // const PREREQUISITES_PAGE_URL = 'guides/intro-to-predicates/prerequisites'; - // const PREDICATE_ROOT_PAGE_URL = 'guides/intro-to-predicates/predicate-root'; - // const IMPORTS_PAGE_URL = 'guides/intro-to-predicates/imports'; - // const CONFIGURABLES_PAGE_URL = 'guides/intro-to-predicates/configurables'; - // const SIGNATURE_VERIFICATION_PAGE_URL = - // 'guides/intro-to-predicates/signature-verification'; - // const MAIN_PAGE_URL = 'guides/intro-to-predicates/main'; - // const CHECKPOINT_PAGE_URL = 'guides/intro-to-predicates/checkpoint'; - // const SCRIPT_DEBUG_PAGE_URL = - // 'guides/intro-to-predicates/debugging-with-scripts'; - // const SCRIPT_LOGS_PAGE_URL = - // 'guides/intro-to-predicates/debugging-with-scripts-rust'; - // const FUELS_RS_PAGE_URL = 'guides/intro-to-predicates/rust-sdk'; - - // // SETUP - // stopServers(); - // await useFuelWallet(context, extensionId, page); - // await setupFolders('fuel-project'); - // await startServers(page); - - // // TEST CONTRACT - // await runTest(page, context, PREREQUISITES_PAGE_URL); - // await runTest(page, context, PREDICATE_ROOT_PAGE_URL); - // await runTest(page, context, IMPORTS_PAGE_URL); - // await runTest(page, context, CONFIGURABLES_PAGE_URL); - // await runTest(page, context, SIGNATURE_VERIFICATION_PAGE_URL); - // await runTest(page, context, MAIN_PAGE_URL); - // await runTest(page, context, CHECKPOINT_PAGE_URL); - - // // TEST RUST - // await runTest(page, context, SCRIPT_DEBUG_PAGE_URL); - // await runTest(page, context, SCRIPT_LOGS_PAGE_URL); - // await runTest(page, context, FUELS_RS_PAGE_URL); - - // // SHUT DOWN - // stopServers(); - // // context.close(); - // }); + test('intro to predicates', async ({ context, extensionId, page }) => { + const PREREQUISITES_PAGE_URL = 'guides/intro-to-predicates/prerequisites'; + const PREDICATE_ROOT_PAGE_URL = 'guides/intro-to-predicates/predicate-root'; + const IMPORTS_PAGE_URL = 'guides/intro-to-predicates/imports'; + const CONFIGURABLES_PAGE_URL = 'guides/intro-to-predicates/configurables'; + const SIGNATURE_VERIFICATION_PAGE_URL = + 'guides/intro-to-predicates/signature-verification'; + const MAIN_PAGE_URL = 'guides/intro-to-predicates/main'; + const CHECKPOINT_PAGE_URL = 'guides/intro-to-predicates/checkpoint'; + const SCRIPT_DEBUG_PAGE_URL = + 'guides/intro-to-predicates/debugging-with-scripts'; + const SCRIPT_LOGS_PAGE_URL = + 'guides/intro-to-predicates/debugging-with-scripts-rust'; + const FUELS_RS_PAGE_URL = 'guides/intro-to-predicates/rust-sdk'; + + // SETUP + stopServers(); + await useFuelWallet(context, extensionId, page); + await setupFolders('fuel-project'); + await startServers(page); + + // TEST CONTRACT + await runTest(page, context, PREREQUISITES_PAGE_URL); + await runTest(page, context, PREDICATE_ROOT_PAGE_URL); + await runTest(page, context, IMPORTS_PAGE_URL); + await runTest(page, context, CONFIGURABLES_PAGE_URL); + await runTest(page, context, SIGNATURE_VERIFICATION_PAGE_URL); + await runTest(page, context, MAIN_PAGE_URL); + await runTest(page, context, CHECKPOINT_PAGE_URL); + + // TEST RUST + await runTest(page, context, SCRIPT_DEBUG_PAGE_URL); + await runTest(page, context, SCRIPT_LOGS_PAGE_URL); + await runTest(page, context, FUELS_RS_PAGE_URL); + + // SHUT DOWN + stopServers(); + // context.close(); + }); });