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

Autotests: Replace File comparison (for KET files ONLY!) operations with valid helper functions (verifyFileExport) #6041

Open
AlexeyGirin opened this issue Dec 3, 2024 · 0 comments · May be fixed by #6290
Assignees
Labels
Autotests refactor Code refactoring, without changing the functionality
Milestone

Comments

@AlexeyGirin
Copy link
Collaborator

AlexeyGirin commented Dec 3, 2024

  1. Identify all File comparison (for KET files ONLY!) operations made by following code:
    const expectedFile = await getKet(page);
    await saveToFile(
      'KET/layout-with-long-molecule-inch-bond-lengh.ket', // <--- File name could be different
      expectedFile,
    );

    const { fileExpected: ketFileExpected, file: ketFile } =
      await receiveFileComparisonData({
        page,
        expectedFileName:
          'tests/test-data/KET/layout-with-long-molecule-inch-bond-lengh.ket', // <--- File name could be different
      });

    expect(ketFile).toEqual(ketFileExpected);

or similar
and replace them with proper helper function

    await verifyFileExport(
      page,
      'KET/layout-with-long-molecule-inch-bond-lengh.ket',// <--- No `tests/test-data/` here!!!
      FileType.KET,
    );

@AlexeyGirin AlexeyGirin added this to the Autotests milestone Dec 3, 2024
@AlexeyGirin AlexeyGirin added the refactor Code refactoring, without changing the functionality label Dec 3, 2024
@AlexeyGirin AlexeyGirin changed the title Autotests: Replace File comparison operations with valid helper functions (verifyFile2) Autotests: Replace File comparison (for KET files ONLY!) operations with valid helper functions (verifyFile2) Dec 3, 2024
@AlexeyGirin AlexeyGirin changed the title Autotests: Replace File comparison (for KET files ONLY!) operations with valid helper functions (verifyFile2) Autotests: Replace File comparison (for KET files ONLY!) operations with valid helper functions (verifyFileExport) Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Autotests refactor Code refactoring, without changing the functionality
Projects
None yet
2 participants