Skip to content

Commit

Permalink
reintroduce tests
Browse files Browse the repository at this point in the history
  • Loading branch information
calldelegation committed Oct 7, 2024
1 parent ee09ca1 commit 2e2248d
Showing 1 changed file with 72 additions and 72 deletions.
144 changes: 72 additions & 72 deletions tests/test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,78 +4,78 @@ 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';

// // 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);

// // 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';

// // SETUP
// stopServers();
// await useFuelWallet(context, extensionId, page);
// await setupFolders('fuel-project');
// await startServers(page);

// // TEST CONTRACT
// await runTest(page, context, CONTRACT_PAGE_URL);

// // TEST FRONTEND
// await runTest(page, context, FRONTEND_PAGE_URL);

// // SHUT DOWN
// stopServers();
// // context.close();
// });

// test('intro to sway', async ({ context, extensionId, page }) => {
// const PREREQUISITES_PAGE_URL = 'guides/intro-to-sway/prerequisites';
// const IMPORTS_PAGE_URL = 'guides/intro-to-sway/contract-imports';
// const STRUCTS_PAGE_URL = 'guides/intro-to-sway/contract-structs';
// const ABI_PAGE_URL = 'guides/intro-to-sway/contract-abi';
// const STORAGE_PAGE_URL = 'guides/intro-to-sway/contract-storage';
// const ERRORS_PAGE_URL = 'guides/intro-to-sway/contract-errors';
// const FUNCTIONS_PAGE_URL = 'guides/intro-to-sway/contract-functions';
// const CHECKPOINT_PAGE_URL = 'guides/intro-to-sway/checkpoint';
// const FUELS_RS_PAGE_URL = 'guides/intro-to-sway/rust-sdk';
// const FUELS_TS_PAGE_URL = 'guides/intro-to-sway/typescript-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, IMPORTS_PAGE_URL);
// await runTest(page, context, STRUCTS_PAGE_URL);
// await runTest(page, context, ABI_PAGE_URL);
// await runTest(page, context, STORAGE_PAGE_URL);
// await runTest(page, context, ERRORS_PAGE_URL);
// await runTest(page, context, FUNCTIONS_PAGE_URL);
// await runTest(page, context, CHECKPOINT_PAGE_URL);
// await runTest(page, context, FUELS_RS_PAGE_URL);
// await runTest(page, context, FUELS_TS_PAGE_URL);

// // SHUT DOWN
// stopServers();
// // context.close();
// });
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);

// TEST CONTRACT QUICKSTART
await runTest(page, context, CONTRACT_QUICKSTART_PAGE_URL);

// 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';

// SETUP
stopServers();
await useFuelWallet(context, extensionId, page);
await setupFolders('fuel-project');
await startServers(page);

// TEST CONTRACT
await runTest(page, context, CONTRACT_PAGE_URL);

// TEST FRONTEND
await runTest(page, context, FRONTEND_PAGE_URL);

// SHUT DOWN
stopServers();
// context.close();
});

test('intro to sway', async ({ context, extensionId, page }) => {
const PREREQUISITES_PAGE_URL = 'guides/intro-to-sway/prerequisites';
const IMPORTS_PAGE_URL = 'guides/intro-to-sway/contract-imports';
const STRUCTS_PAGE_URL = 'guides/intro-to-sway/contract-structs';
const ABI_PAGE_URL = 'guides/intro-to-sway/contract-abi';
const STORAGE_PAGE_URL = 'guides/intro-to-sway/contract-storage';
const ERRORS_PAGE_URL = 'guides/intro-to-sway/contract-errors';
const FUNCTIONS_PAGE_URL = 'guides/intro-to-sway/contract-functions';
const CHECKPOINT_PAGE_URL = 'guides/intro-to-sway/checkpoint';
const FUELS_RS_PAGE_URL = 'guides/intro-to-sway/rust-sdk';
const FUELS_TS_PAGE_URL = 'guides/intro-to-sway/typescript-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, IMPORTS_PAGE_URL);
await runTest(page, context, STRUCTS_PAGE_URL);
await runTest(page, context, ABI_PAGE_URL);
await runTest(page, context, STORAGE_PAGE_URL);
await runTest(page, context, ERRORS_PAGE_URL);
await runTest(page, context, FUNCTIONS_PAGE_URL);
await runTest(page, context, CHECKPOINT_PAGE_URL);
await runTest(page, context, FUELS_RS_PAGE_URL);
await runTest(page, context, FUELS_TS_PAGE_URL);

// SHUT DOWN
stopServers();
// context.close();
});

test('intro to predicates', async ({ context, extensionId, page }) => {
const PREREQUISITES_PAGE_URL = 'guides/intro-to-predicates/prerequisites';
Expand Down

0 comments on commit 2e2248d

Please sign in to comment.