Skip to content

Commit

Permalink
sets up old tests
Browse files Browse the repository at this point in the history
  • Loading branch information
apburnie committed Jun 22, 2022
1 parent 2718055 commit c585174
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions explorer/client/src/__tests__/e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,45 +155,45 @@ describe('End-to-end Tests', () => {
});
});

// TODO: Use mock data generated by sui/src/generate_json_rpc_spec.rs
// to make sure it's in sync with the backend
// describe('Transaction Results', () => {
// const successID = 'Da4vHc9IwbvOYblE8LnrVsqXwryt2Kmms+xnJ7Zx5E4=';
// it('can be searched', async () => {
// await page.goto(BASE_URL);
// await searchText(page, successID);
// const el = await page.$('#transactionID');
// const value = await page.evaluate((el: any) => el.textContent, el);
// expect(value.trim()).toBe(successID);
// });

// it('can be reached through URL', async () => {
// await page.goto(`${BASE_URL}/transactions/${successID}`);
// const el = await page.$('#transactionID');
// const value = await page.evaluate((el: any) => el.textContent, el);
// expect(value.trim()).toBe(successID);
// });
// it('can go to object and back', async () => {
// const objectID = '7bc832ec31709638cd8d9323e90edf332gff4389';
// await page.goto(`${BASE_URL}/transactions/${successID}`);

// //Go to Object
// const objectLink = await page.$(
// 'div#txview > div:nth-child(4) > div:nth-child(2)'
// );
// await objectLink.click();
// const el = await page.$('#objectID');
// const value = await page.evaluate((x: any) => x.textContent, el);
// expect(value.trim()).toBe(objectID);

// //Go back to Transaction
// const lastTransactionLink = await page.$('#lasttxID > a');
// await lastTransactionLink.click();
// const el2 = await page.$('#transactionID');
// const value2 = await page.evaluate((x: any) => x.textContent, el2);
// expect(value2.trim()).toBe(successID);
// });
// });
describe('Transaction Results', () => {
const successID = 'Da4vHc9IwbvOYblE8LnrVsqXwryt2Kmms+xnJ7Zx5E4=';
it('can be searched', async () => {
await page.goto(BASE_URL);
await searchText(page, successID);
const value = await cssInteract(page)
.with('#transactionID')
.get.textContent();
expect(value.trim()).toBe(successID);
});

it('can be reached through URL', async () => {
await page.goto(`${BASE_URL}/transactions/${successID}`);
const value = await cssInteract(page)
.with('#transactionID')
.get.textContent();
expect(value.trim()).toBe(successID);
});
// it('can go to object and back', async () => {
// const objectID = '7bc832ec31709638cd8d9323e90edf332gff4389';
// await page.goto(`${BASE_URL}/transactions/${successID}`);

// //Go to Object
// const objectLink = await page.$(
// 'div#txview > div:nth-child(4) > div:nth-child(2)'
// );
// await objectLink.click();
// const el = await page.$('#objectID');
// const value = await page.evaluate((x: any) => x.textContent, el);
// expect(value.trim()).toBe(objectID);

// //Go back to Transaction
// const lastTransactionLink = await page.$('#lasttxID > a');
// await lastTransactionLink.click();
// const el2 = await page.$('#transactionID');
// const value2 = await page.evaluate((x: any) => x.textContent, el2);
// expect(value2.trim()).toBe(successID);
// });
});

describe('Owned Objects have links that enable', () => {
const navigationTemplate = async (
Expand Down

0 comments on commit c585174

Please sign in to comment.