From 61bbbccda4224c14f08054ad87ce068e5658f64b Mon Sep 17 00:00:00 2001 From: Alex | Kronox Date: Thu, 29 Feb 2024 16:57:40 +0100 Subject: [PATCH 01/12] first layout of workflow file --- .github/workflows/complete-e2e.yml | 164 ++++++++++++++++++++++++ .github/workflows/report-viewer-e2e.yml | 58 --------- 2 files changed, 164 insertions(+), 58 deletions(-) create mode 100644 .github/workflows/complete-e2e.yml delete mode 100644 .github/workflows/report-viewer-e2e.yml diff --git a/.github/workflows/complete-e2e.yml b/.github/workflows/complete-e2e.yml new file mode 100644 index 000000000..adf3455c5 --- /dev/null +++ b/.github/workflows/complete-e2e.yml @@ -0,0 +1,164 @@ +# Builds JPlag and then runs Datasets and Report Viewer e2e tests on multiple OS +name: Complete e2e Test + +on: + workflow_dispatch: + # temprary + push: + pull_request: + types: [opened, synchronize, reopened] + paths: + - ".github/workflows/complete-e2e.yml" + - "report-viewer/**" + - "**/pom.xml" + - "**.java" + - "**.g4" + +jobs: + pre_job: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + concurrent_skipping: 'same_content_newer' + skip_after_successful_duplicate: 'true' + + build_jar: + needs: pre_job + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: 'temurin' + + - uses: actions/setup-node@v4 + with: + node-version: "18" + + - name: Run Tests + run: mvn verify -B -U + + - name: Build Assembly + run: mvn -Pwith-report-viewer -DskipTests clean package assembly:single + + - name: Raname Jar + run: mv cli/target/jplag-*-jar-with-dependencies.jar cli/target/jplag.jar + + - name: Upload Assembly + uses: actions/upload-artifact@v4 + with: + name: "JPlag" + path: "cli/target/jplag.jar" + + run_jplag: + needs: build_jar + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + dataset: [ + {zip: "progpedia.zip", name: "progpedia", folder: "ACCEPTED", base: "base", language: "java", cliArgs: ""}, + ] + + steps: + - name: Checkout ๐Ÿ›Ž๏ธ + uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: 'temurin' + + - name: Get JAR + uses: actions/download-artifact@v4 + with: + name: JPlag + + - name: Copy and unzip dataset + run: | + if [${{matrix.os}} == "windows-latest"]; then + Expand-Archive -LiteralPath .github/workflows/files/${{ matrix.dataset.zip }} -DestinationPath ./ + elif [${{matrix.os}} == "macos-latest"]; then + unzip .github/workflows/files/${{ matrix.dataset.zip }} -d ./ + else + unzip ./ .github/workflows/files/${{ matrix.dataset.zip }} + fi + + - name: Run JPlag + run: | + if [${{matrix.dataset.base}} == "undefined"]; then + java -jar jplag.jar ${{ matrix.dataset.folder }} -l ${{ matrix.dataset.language }} -r ${{ matrix.dataset.name }}-report ${{ matrix.dataset.cliArgs }} + else + java -jar jplag.jar ${{ matrix.dataset.folder }} -l ${{ matrix.dataset.language }} -r ${{ matrix.dataset.name }}-report -bc ${{ matrix.os.base }} ${{ matrix.dataset.cliArgs }} + fi + + - name: Upload Result + uses: actions/upload-artifact@v4 + with: + name: "${{ matrix.dataset.name }}-${{ matrix.os }}" + path: "${{ matrix.dataset.name }}-report.zip" + + e2e_test: + needs: run_jplag + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - name: Checkout ๐Ÿ›Ž๏ธ + uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: "18" + + - name: Install and Build ๐Ÿ”ง + working-directory: report-viewer + run: | + npm install + npm run build + + - name: Install playwright ๐Ÿ”ง + working-directory: report-viewer + run: npx playwright install --with-deps + + - name: Download JPlag Reports + uses: actions/download-artifact@v4 + with: + name: "progpedia-${{ matrix.os }}" + path: "report-viewer/tests/e2e/assets/progpedia.zip" + + - name: Rename Files + working-directory: report-viewer/tests/e2e/assets + run: | + if [${{matrix.os}} == "windows-latest"]; then + ren progpedia-${{matrix.os}}.zip progpedia.zip + else + mv progpedia-${{matrix.os}}.zip progpedia.zip + fi + + - name: Run tests ๐Ÿงช + working-directory: report-viewer + run: | + npm run test:e2e + + - name: Upload test results ๐Ÿ“ค + uses: actions/upload-artifact@v4 + if: always() + with: + name: "test-results-${{ matrix.os }}" + path: | + report-viewer/test-results + report-viewer/playwright-report + retention-days: 30 \ No newline at end of file diff --git a/.github/workflows/report-viewer-e2e.yml b/.github/workflows/report-viewer-e2e.yml deleted file mode 100644 index 98744e554..000000000 --- a/.github/workflows/report-viewer-e2e.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Report Viewer e2e Test - -on: - workflow_dispatch: - pull_request: - types: [opened, synchronize, reopened] - paths: - - ".github/workflows/report-viewer-e2e.yml" - - "report-viewer/**" - -jobs: - pre_job: - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@master - with: - concurrent_skipping: 'same_content_newer' - skip_after_successful_duplicate: 'true' - - test: - needs: pre_job - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} - runs-on: ubuntu-latest - steps: - - name: Checkout ๐Ÿ›Ž๏ธ - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - node-version: "18" - - - name: Install and Build ๐Ÿ”ง - working-directory: report-viewer - run: | - npm install - npm run build - - - name: Install playwright ๐Ÿ”ง - working-directory: report-viewer - run: npx playwright install --with-deps - - - name: Run tests ๐Ÿงช - working-directory: report-viewer - run: | - npm run test:e2e - - - name: Upload test results ๐Ÿ“ค - uses: actions/upload-artifact@v4 - if: always() - with: - name: test-results - path: | - report-viewer/test-results - report-viewer/playwright-report - retention-days: 30 \ No newline at end of file From 985a68d3b11f814b3be9d543dccad10437113501 Mon Sep 17 00:00:00 2001 From: Alex | Kronox Date: Thu, 29 Feb 2024 18:23:21 +0100 Subject: [PATCH 02/12] adapt e2e tests to progpedia dataset --- report-viewer/.gitignore | 1 + report-viewer/tests/e2e/Comparison.spec.ts | 52 +++++++++++--------- report-viewer/tests/e2e/Distribution.spec.ts | 2 +- report-viewer/tests/e2e/Information.spec.ts | 34 ++++++------- 4 files changed, 48 insertions(+), 41 deletions(-) diff --git a/report-viewer/.gitignore b/report-viewer/.gitignore index 719bf30c1..9d1252439 100644 --- a/report-viewer/.gitignore +++ b/report-viewer/.gitignore @@ -29,3 +29,4 @@ coverage test-results/ playwright-report/ +tests/e2e/assets \ No newline at end of file diff --git a/report-viewer/tests/e2e/Comparison.spec.ts b/report-viewer/tests/e2e/Comparison.spec.ts index 3873473e4..a5c62e5bd 100644 --- a/report-viewer/tests/e2e/Comparison.spec.ts +++ b/report-viewer/tests/e2e/Comparison.spec.ts @@ -4,23 +4,24 @@ import { uploadFile } from './TestUtils' test('Test comparison table and comparsion view', async ({ page }) => { await page.goto('/') - await uploadFile('result_small_cluster.zip', page) + await uploadFile('progpedia.zip', page) const comparisonContainer = page.getByText( 'Top Comparisons: Type in the name of a submission to only show comparisons that contain this submission. Fully written out names get unhidden.Hide AllSort By' ) // check for elements in average similarity table - const comparisonTableAverageSorted = await page.getByText('Cluster1').textContent() - expect(comparisonTableAverageSorted).toContain('1CA') - expect(comparisonTableAverageSorted).toContain('2DC') + await page.getByPlaceholder('Filter/Unhide Comparisons').fill('Purple') + const comparisonTableAverageSorted = await page.getByText(/Cluster[0-9]/).textContent() + expect(comparisonTableAverageSorted).toContain('100Purple FishBeige Dog') await comparisonContainer.getByText('Maximum Similarity', { exact: true }).click() // check for elements in maximum similarity table - const comparisonTableMaxSorted = await page.getByText('Cluster1').textContent() - expect(comparisonTableMaxSorted).toContain('1CA') - expect(comparisonTableMaxSorted).toContain('2BC') + await page.getByPlaceholder('Filter/Unhide Comparisons').fill('Blue') + const comparisonTableMaxSorted = await page.getByText(/Cluster[0-9]/).textContent() + expect(comparisonTableMaxSorted).toContain('100Blue AntelopeLime Lynx') + await page.getByPlaceholder('Filter/Unhide Comparisons').fill('') await page.getByText('Hide All').click() // check for elements being hidden const comparisonTableOverviewHidden = await page.getByText('Cluster1').textContent() @@ -28,7 +29,8 @@ test('Test comparison table and comparsion view', async ({ page }) => { expect(comparisonTableOverviewHidden).toMatch(/3anon[0-9]+anon[0-9]+/) expect(comparisonTableOverviewHidden).toMatch(/4anon[0-9]+anon[0-9]+/) - await page.getByPlaceholder('Filter/Unhide Comparisons').fill('A') + // Temporarily disabled due to https://github.com/jplag/JPlag/issues/1629 + /*await page.getByPlaceholder('Filter/Unhide Comparisons').fill('A') // check for elements being unhidden and filtered const comparisonTableOverviewFilteredA = await page.getByText('Cluster1').textContent() expect(comparisonTableOverviewFilteredA).toMatch(/1anon[0-9]+A/) //toContain('1HiddenA') @@ -40,32 +42,36 @@ test('Test comparison table and comparsion view', async ({ page }) => { const comparisonTableOverviewFilteredAC = await page.getByText('Cluster1').textContent() expect(comparisonTableOverviewFilteredAC).toContain('1CA') expect(comparisonTableOverviewFilteredAC).toMatch(/3anon[0-9]+A/) - expect(comparisonTableOverviewFilteredAC).toMatch(/4anon[0-9]+C/) + expect(comparisonTableOverviewFilteredAC).toMatch(/4anon[0-9]+C/)+/*/ + await page.getByText('Show All').click() + await page.getByPlaceholder('Filter/Unhide Comparisons').fill('Blue') // go to comparison page - await page.getByText('1C').click() + await page.getByText('Blue AntelopeLime Lynx').click() await page.waitForURL(/\/comparison\/.*/) // check for elements in comparison page const bodyComparison = await page.locator('body').textContent() - expect(bodyComparison).toContain('Average Similarity: 99.59%') - expect(bodyComparison).toContain('GSTiling.java - GSTiling.java: 308') - expect(bodyComparison).toContain('Matches.java - Matches.java: 58') - expect(bodyComparison).toContain('A/Match.java') - expect(bodyComparison).toContain('C/Match.java') + expect(bodyComparison).toMatch(/Average Similarity: [0-9]{2}.[0-9]{2}%/) + expect(bodyComparison).toMatch(/Similarity Blue Antelope: [0-9]{2}.[0-9]{2}%/) + expect(bodyComparison).toMatch(/Similarity Lime Lynx: [0-9]{2}.[0-9]{2}%/) + + expect(bodyComparison).toMatch(/sociologia.java - Sociologia.java: [0-9]+/) + expect(bodyComparison).toContain('Blue Antelope/sociologia.java') + expect(bodyComparison).toContain('Lime Lynx/Sociologia.java') // check for being able to hide and unhide elements - expect(await isCodeVisible(page, 'public class Match {')).toBe(false) - await page.getByText('A/Match.java').click() - expect(await isCodeVisible(page, 'public class Match {')).toBe(true) - await page.getByText('A/Match.java').click() - expect(await isCodeVisible(page, 'public class Match {')).toBe(false) + expect(await isCodeVisible(page, 'class No')).toBe(false) + await page.getByText('Blue Antelope/sociologia.java').click() + expect(await isCodeVisible(page, 'class No')).toBe(true) + await page.getByText('Blue Antelope/sociologia.java').click() + expect(await isCodeVisible(page, 'class No')).toBe(false) // unhide elements by clicking match list - expect(await isCodeVisible(page, 'public class GSTiling')).toBe(false) - await page.getByText('GSTiling.java - GSTiling.java: 308').click() + expect(await isCodeVisible(page, 'class Node')).toBe(false) + await page.getByText('sociologia.java - Sociologia.java:').first().click() await page.waitForTimeout(1000) - expect(await isCodeVisible(page, 'public class GSTiling')).toBe(true) + expect(await isCodeVisible(page, 'class Node')).toBe(true) }) async function isCodeVisible(page: Page, codePart: string) { diff --git a/report-viewer/tests/e2e/Distribution.spec.ts b/report-viewer/tests/e2e/Distribution.spec.ts index 5ac24191d..e0b2376be 100644 --- a/report-viewer/tests/e2e/Distribution.spec.ts +++ b/report-viewer/tests/e2e/Distribution.spec.ts @@ -4,7 +4,7 @@ import { uploadFile } from './TestUtils' test('Test distribution diagram', async ({ page }) => { await page.goto('/') - await uploadFile('result_small_cluster.zip', page) + await uploadFile('progpedia.zip', page) const options = getTestCombinations() selectOptions(page, options[0]) diff --git a/report-viewer/tests/e2e/Information.spec.ts b/report-viewer/tests/e2e/Information.spec.ts index f9ca4043d..d41c1c278 100644 --- a/report-viewer/tests/e2e/Information.spec.ts +++ b/report-viewer/tests/e2e/Information.spec.ts @@ -3,32 +3,32 @@ import { uploadFile } from './TestUtils' test('Test information page', async ({ page }) => { await page.goto('/') - await uploadFile('result_small_cluster.zip', page) + await uploadFile('progpedia.zip', page) // check displayed information on overview page const bodyOverview = await page.locator('body').textContent() - expect(bodyOverview).toContain('Directory: files') - expect(bodyOverview).toContain('Total Submissions: 4') - expect(bodyOverview).toContain('Total Comparisons: 6') - expect(bodyOverview).toContain('Min Token Match: 9') + expect(bodyOverview).toContain('Directory: ') + expect(bodyOverview).toMatch(/Total Submissions: [0-9]+/) + expect(bodyOverview).toMatch(/Total Comparisons: [0-9]+/) + expect(bodyOverview).toMatch(/Min Token Match: [0-9]+/) // go to information page await page.getByText('More', { exact: true }).click() await page.waitForURL('/info') // check displayed run options on information page - const runOptions = await page.getByText('Run Options:Submission Directory:').textContent() - expect(runOptions).toContain('Submission Directory: files') - expect(runOptions).toContain('Basecode Directory:') - expect(runOptions).toContain('Language: Javac based AST plugin') - expect(runOptions).toContain('File Extensions: .java, .JAVA') - expect(runOptions).toContain('Min Token Match: 9') + const runOptions = await page.getByText('Run Options:Language:').textContent() + expect(runOptions).toContain('Submission Directories: ') + expect(runOptions).toContain('Base Directory: ') + expect(runOptions).toContain('Language: ') + expect(runOptions).toContain('File Suffixes: ') + expect(runOptions).toMatch(/Min Token Match: [0-9]+/) const runData = await page.getByText('Run Data:Date of Execution:').textContent() - expect(runData).toContain('Date of Execution: 02/09/23') - expect(runData).toContain('Execution Duration: 12 ms') - expect(runData).toContain('Total Submissions: 4') - expect(runData).toContain('Total Comparisons: 6') - expect(runData).toContain('Shown Comparisons: 6') - expect(runData).toContain('Missing Comparisons: 0') + expect(runData).toMatch(/Date of Execution: [0-9]{2}\/[0-9]{2}\/[0-9]{2}/) + expect(runData).toMatch(/Execution Duration: [0-9]+ ms/) + expect(runData).toMatch(/Total Submissions: [0-9]+/) + expect(runData).toMatch(/Total Comparisons: [0-9]+/) + expect(runData).toMatch(/Shown Comparisons: [0-9]+/) + expect(runData).toMatch(/Missing Comparisons: [0-9]+/) }) From 257ab6194f7145beade77b61d1292373533d0e36 Mon Sep 17 00:00:00 2001 From: Alex | Kronox Date: Thu, 29 Feb 2024 23:24:17 +0100 Subject: [PATCH 03/12] fix workflow file --- .github/workflows/complete-e2e.yml | 61 ++++++++++++------------------ 1 file changed, 25 insertions(+), 36 deletions(-) diff --git a/.github/workflows/complete-e2e.yml b/.github/workflows/complete-e2e.yml index adf3455c5..90fd801fb 100644 --- a/.github/workflows/complete-e2e.yml +++ b/.github/workflows/complete-e2e.yml @@ -44,13 +44,10 @@ jobs: with: node-version: "18" - - name: Run Tests - run: mvn verify -B -U - - name: Build Assembly run: mvn -Pwith-report-viewer -DskipTests clean package assembly:single - - name: Raname Jar + - name: Rename Jar run: mv cli/target/jplag-*-jar-with-dependencies.jar cli/target/jplag.jar - name: Upload Assembly @@ -58,19 +55,21 @@ jobs: with: name: "JPlag" path: "cli/target/jplag.jar" + retention-days: 30 run_jplag: needs: build_jar runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] dataset: [ - {zip: "progpedia.zip", name: "progpedia", folder: "ACCEPTED", base: "base", language: "java", cliArgs: ""}, + {zip: "progpedia.zip", name: "progpedia", folder: "ACCEPTED", language: "java", cliArgs: "-bc base"} ] steps: - - name: Checkout ๐Ÿ›Ž๏ธ + - name: Checkout uses: actions/checkout@v4 - name: Set up JDK @@ -84,76 +83,66 @@ jobs: with: name: JPlag - - name: Copy and unzip dataset + - name: Copy and unzip dataset windows + if: ${{ matrix.os == 'windows-latest' }} run: | - if [${{matrix.os}} == "windows-latest"]; then - Expand-Archive -LiteralPath .github/workflows/files/${{ matrix.dataset.zip }} -DestinationPath ./ - elif [${{matrix.os}} == "macos-latest"]; then - unzip .github/workflows/files/${{ matrix.dataset.zip }} -d ./ - else - unzip ./ .github/workflows/files/${{ matrix.dataset.zip }} - fi + Expand-Archive -LiteralPath .github/workflows/files/${{ matrix.dataset.zip }} -DestinationPath ./ + - name: Copy and unzip dataset macos and ubuntu + if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'}} + run: | + unzip .github/workflows/files/${{ matrix.dataset.zip }} + - name: Run JPlag run: | - if [${{matrix.dataset.base}} == "undefined"]; then - java -jar jplag.jar ${{ matrix.dataset.folder }} -l ${{ matrix.dataset.language }} -r ${{ matrix.dataset.name }}-report ${{ matrix.dataset.cliArgs }} - else - java -jar jplag.jar ${{ matrix.dataset.folder }} -l ${{ matrix.dataset.language }} -r ${{ matrix.dataset.name }}-report -bc ${{ matrix.os.base }} ${{ matrix.dataset.cliArgs }} - fi + java -jar jplag.jar ${{ matrix.dataset.folder }} -l ${{ matrix.dataset.language }} -r ${{ matrix.dataset.name }}-report ${{ matrix.dataset.cliArgs }} - - name: Upload Result + - name: Upload result uses: actions/upload-artifact@v4 with: name: "${{ matrix.dataset.name }}-${{ matrix.os }}" path: "${{ matrix.dataset.name }}-report.zip" + retention-days: 30 e2e_test: needs: run_jplag runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] steps: - - name: Checkout ๐Ÿ›Ž๏ธ + - name: Checkout uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "18" - - name: Install and Build ๐Ÿ”ง + - name: Install and Build working-directory: report-viewer run: | npm install npm run build - - name: Install playwright ๐Ÿ”ง + - name: Install playwright working-directory: report-viewer run: npx playwright install --with-deps - name: Download JPlag Reports uses: actions/download-artifact@v4 with: - name: "progpedia-${{ matrix.os }}" - path: "report-viewer/tests/e2e/assets/progpedia.zip" - - - name: Rename Files - working-directory: report-viewer/tests/e2e/assets - run: | - if [${{matrix.os}} == "windows-latest"]; then - ren progpedia-${{matrix.os}}.zip progpedia.zip - else - mv progpedia-${{matrix.os}}.zip progpedia.zip - fi + pattern: "*-${{ matrix.os }}" + path: "report-viewer/tests/e2e/assets" + merge-multiple: true - - name: Run tests ๐Ÿงช + - name: Run tests working-directory: report-viewer run: | npm run test:e2e - - name: Upload test results ๐Ÿ“ค + - name: Upload test results uses: actions/upload-artifact@v4 if: always() with: From e2e03463de4dae0b83e775d077cff37b2c235be5 Mon Sep 17 00:00:00 2001 From: Alex | Kronox Date: Fri, 1 Mar 2024 11:03:19 +0100 Subject: [PATCH 04/12] fix comparison test --- report-viewer/tests/e2e/Comparison.spec.ts | 39 +++++++++++++--------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/report-viewer/tests/e2e/Comparison.spec.ts b/report-viewer/tests/e2e/Comparison.spec.ts index a5c62e5bd..98a723715 100644 --- a/report-viewer/tests/e2e/Comparison.spec.ts +++ b/report-viewer/tests/e2e/Comparison.spec.ts @@ -4,7 +4,7 @@ import { uploadFile } from './TestUtils' test('Test comparison table and comparsion view', async ({ page }) => { await page.goto('/') - await uploadFile('progpedia.zip', page) + await uploadFile('progpedia-report.zip', page) const comparisonContainer = page.getByText( 'Top Comparisons: Type in the name of a submission to only show comparisons that contain this submission. Fully written out names get unhidden.Hide AllSort By' @@ -45,33 +45,40 @@ test('Test comparison table and comparsion view', async ({ page }) => { expect(comparisonTableOverviewFilteredAC).toMatch(/4anon[0-9]+C/)+/*/ await page.getByText('Show All').click() - await page.getByPlaceholder('Filter/Unhide Comparisons').fill('Blue') + await page.getByPlaceholder('Filter/Unhide Comparisons').fill('Lazy') // go to comparison page - await page.getByText('Blue AntelopeLime Lynx').click() + await page.getByText('102Gray WolfLazy Bobcat').click() await page.waitForURL(/\/comparison\/.*/) // check for elements in comparison page + const submissionName1 = 'Gray Wolf' + const submissionName2 = 'Lazy Bobcat' + const fileName1 = 'Sociologia.java' + const fileName2 = 'Daa_sociologia.java' + const content1 = 'class Aluno' + const content2 = 'class Node' + const bodyComparison = await page.locator('body').textContent() expect(bodyComparison).toMatch(/Average Similarity: [0-9]{2}.[0-9]{2}%/) - expect(bodyComparison).toMatch(/Similarity Blue Antelope: [0-9]{2}.[0-9]{2}%/) - expect(bodyComparison).toMatch(/Similarity Lime Lynx: [0-9]{2}.[0-9]{2}%/) + expect(bodyComparison).toMatch(new RegExp(`Similarity ${submissionName1}: [0-9]{2}.[0-9]{2}%`)) + expect(bodyComparison).toMatch(new RegExp(`Similarity ${submissionName2}: [0-9]{2}.[0-9]{2}%`)) - expect(bodyComparison).toMatch(/sociologia.java - Sociologia.java: [0-9]+/) - expect(bodyComparison).toContain('Blue Antelope/sociologia.java') - expect(bodyComparison).toContain('Lime Lynx/Sociologia.java') + expect(bodyComparison).toMatch(new RegExp(`${fileName1} - ${fileName2}: [0-9]+`)) + expect(bodyComparison).toContain(`${submissionName1}/${fileName1}`) + expect(bodyComparison).toContain(`${submissionName2}/${fileName2}`) // check for being able to hide and unhide elements - expect(await isCodeVisible(page, 'class No')).toBe(false) - await page.getByText('Blue Antelope/sociologia.java').click() - expect(await isCodeVisible(page, 'class No')).toBe(true) - await page.getByText('Blue Antelope/sociologia.java').click() - expect(await isCodeVisible(page, 'class No')).toBe(false) + expect(await isCodeVisible(page, content1)).toBe(false) + await page.getByText(`${submissionName1}/${fileName1}`).click() + expect(await isCodeVisible(page, content1)).toBe(true) + await page.getByText(`${submissionName1}/${fileName1}`).click() + expect(await isCodeVisible(page, content1)).toBe(false) // unhide elements by clicking match list - expect(await isCodeVisible(page, 'class Node')).toBe(false) - await page.getByText('sociologia.java - Sociologia.java:').first().click() + expect(await isCodeVisible(page, content2)).toBe(false) + await page.getByText(`${fileName1} - ${fileName2}:`).first().click() await page.waitForTimeout(1000) - expect(await isCodeVisible(page, 'class Node')).toBe(true) + expect(await isCodeVisible(page, content2)).toBe(true) }) async function isCodeVisible(page: Page, codePart: string) { From ac21a8740dc49f9b10ad4c01656d6b8a8b180bf9 Mon Sep 17 00:00:00 2001 From: Alex | Kronox Date: Fri, 1 Mar 2024 11:18:45 +0100 Subject: [PATCH 05/12] fix other tests --- report-viewer/tests/e2e/Distribution.spec.ts | 2 +- report-viewer/tests/e2e/Information.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/report-viewer/tests/e2e/Distribution.spec.ts b/report-viewer/tests/e2e/Distribution.spec.ts index e0b2376be..17a7b5b4e 100644 --- a/report-viewer/tests/e2e/Distribution.spec.ts +++ b/report-viewer/tests/e2e/Distribution.spec.ts @@ -4,7 +4,7 @@ import { uploadFile } from './TestUtils' test('Test distribution diagram', async ({ page }) => { await page.goto('/') - await uploadFile('progpedia.zip', page) + await uploadFile('progpedia-report.zip', page) const options = getTestCombinations() selectOptions(page, options[0]) diff --git a/report-viewer/tests/e2e/Information.spec.ts b/report-viewer/tests/e2e/Information.spec.ts index d41c1c278..2ecb21fbb 100644 --- a/report-viewer/tests/e2e/Information.spec.ts +++ b/report-viewer/tests/e2e/Information.spec.ts @@ -3,7 +3,7 @@ import { uploadFile } from './TestUtils' test('Test information page', async ({ page }) => { await page.goto('/') - await uploadFile('progpedia.zip', page) + await uploadFile('progpedia-report.zip', page) // check displayed information on overview page const bodyOverview = await page.locator('body').textContent() From abeccf4830d3160caf8ac70b85f585c8177daaa7 Mon Sep 17 00:00:00 2001 From: Alex | Kronox Date: Fri, 1 Mar 2024 12:22:00 +0100 Subject: [PATCH 06/12] test different input formats --- .github/workflows/complete-e2e.yml | 6 ++- .github/workflows/files/fileMultiRoot.zip | Bin 0 -> 5812 bytes .github/workflows/files/fileSingleRoot.zip | Bin 0 -> 5860 bytes .github/workflows/files/folderMultiRoot.zip | Bin 0 -> 6014 bytes .github/workflows/files/folderSingleRoot.zip | Bin 0 -> 6126 bytes .../tests/e2e/OpenComparisonTest.spec.ts | 49 ++++++++++++++++++ 6 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/files/fileMultiRoot.zip create mode 100644 .github/workflows/files/fileSingleRoot.zip create mode 100644 .github/workflows/files/folderMultiRoot.zip create mode 100644 .github/workflows/files/folderSingleRoot.zip create mode 100644 report-viewer/tests/e2e/OpenComparisonTest.spec.ts diff --git a/.github/workflows/complete-e2e.yml b/.github/workflows/complete-e2e.yml index 90fd801fb..4e4a73692 100644 --- a/.github/workflows/complete-e2e.yml +++ b/.github/workflows/complete-e2e.yml @@ -65,7 +65,11 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] dataset: [ - {zip: "progpedia.zip", name: "progpedia", folder: "ACCEPTED", language: "java", cliArgs: "-bc base"} + {zip: "progpedia.zip", name: "progpedia", folder: "ACCEPTED", language: "java", cliArgs: "-bc base"}, + {zip: "fileSingleRoot.zip", name: "fileSingleRoot", folder: "fileSingleRoot", language: "java", cliArgs: ""}, + {zip: "folderSingleRoot.zip", name: "folderSingleRoot", folder: "folderSingleRoot", language: "java", cliArgs: ""}, + {zip: "fileMultiRoot.zip", name: "fileMultiRoot", folder: "f0", language: "java", cliArgs: "--new f1"}, + {zip: "folderMultiRoot.zip", name: "fileMultiRoot", folder: "f0", language: "java", cliArgs: "--new f1"} ] steps: diff --git a/.github/workflows/files/fileMultiRoot.zip b/.github/workflows/files/fileMultiRoot.zip new file mode 100644 index 0000000000000000000000000000000000000000..24baa4dbfc8163464c49157c2919e96d8ce10f0d GIT binary patch literal 5812 zcmZ{oRag{Ww}bh8PCV!0 zoV733v-aM<`**!M>c}X>2nYxm2*I`~#;r<|gXb6s2$b{)2$+9w9r*e9d7W**HVvlc zpcOIFP`;^GS@Is)nS^36-CafASN|DvhfF}c&>6QwVr1_7q7+4ECC)sK$BlalW|rxW zU^Ryr0GR!{_+oX^M!nSPs=&H{Je0>w?Cr60#oJ2OTp=&T?;ws6iYQOMUCcgjDdrWZ(pN z#{7gjAfj3>b+N^F@Zchq?qCkRFj#t9(=zn7!1)mDUzHSDf2#N~-ez)qtFExG-pA5? zeNWD9-TNn(6~^H=FtK0XerLTOZOQj59n@jv;xB!=g zQ-vw3WrSJ+P4UehtXeqEDEc`Z@j5#P<-s1}gBYa{O_4XYgW`=-q3Wprt7!qancF5S;vJDs)@mM^L4}B_; z;Rr=~9bMD&Bnn@MC~OInBqwe68XjMl^xk+8r^$k{tQW=&RdY;2Sh9~Ywpxvb>X#&1 z04AbKTn)XforS9cr6Ec&OpRLPQ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kK44U2Tj+;lE!~@j)GbWQ_syoE#ly8XWsGV^V(jwxYO%*!l7X3ZgC4htG&)|-2DJ7S5G}j=UaLu; z8BvP({z07m5AuvVg!cSkoV*JR9ThxoloXT+J>jg; z9^mXVYdWDRnwHFHt#etpycp0?M?@k<`2S7vKQb8s5#b-L{O|gYUip7V{HI;(UqAml ef&ugYsOkUSymZu2(f;)e>7Nt(Pgf=V*YsaRwKS#x literal 0 HcmV?d00001 diff --git a/.github/workflows/files/folderMultiRoot.zip b/.github/workflows/files/folderMultiRoot.zip new file mode 100644 index 0000000000000000000000000000000000000000..db8f2f80fa946385124852514890fbcc84057fa6 GIT binary patch literal 6014 zcma)AWl$VSm&F+*xVyVE$lw|vxI2MhK?fZ?xVyUroe-QLK|=_`KnQNZ-CY9&Ht+3w zwfp1Ss_m}6x4ZhBx_{3(TB^t>LmLXJA<#O}ut{;O z?*xE=KtYFq@E7rKh`h6drkj@o*wvHA(F$T!YitT$6eW4bJN_&~)+sX?TL7WGDb4=k zJ85c{28F|IXD7tgWfYXT^QrNDnxn9UV{g($ zZe4jHX(!E{mI*X-p{r0tFB*oax_)IuBCu=Jdk8vadO+o4`}F5-j~=*8@H%M&%DO-MfAaI^L(T@K&RLv`EiQ{gerV>v9(Ujs!Qx4^pi`( zi;PT^J6ot1Vz_(+dG_$Ucg~j!tDMU<=NbdJ3R*S_;7o8R#nGFaLzJF`f>qLSHi}08 zhic6Xub6S5>^q(s%gQQ`FnShHkOVZ~cH`KPN>hTuxa9b;q#I9hY(cuG``snvY7uUG z;qG;@n1A{p4t9dEr5nECWuroE_0u&NK>Q&e%^~Z!+kwnHO&a8i~wv)^@S9YeL_85SZXqJgVm3_Wg_AiUr<3fJ}q*6kDIO58tX%z=f${TUoQcCybMgo z+_i}G)ML=GFwOeu*i!yOjiK~R+)~N-y)HJ-$Utq2Y6y#oJm&U|Gg66v;N(FyL`A{uNMfw<7* zAlxVyfu0jPMA1r4;b3J{PL}lHdtD{`4nwY!q^Qur?DGf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@?4NT&RBk!98D&XO^kr z`72uW(r>=$VDHuf6nnDfDcFZqDyZv3K&I$!r%Pxu9j|*WTFWAsmfdx`$*9|eC{cW8 zH`?|adFl;9OHQES(GQB%mvf9$^-yY?D_r=>6kx6QruUM=lzA7M*Yu1kFEwE!d5W8G z-u;2hOy-cT2t%gdO%5FwFuIr8CqbK*3ONorVGHX-4^Ts1Oklx=H`}{ReCn BYk2?w literal 0 HcmV?d00001 diff --git a/report-viewer/tests/e2e/OpenComparisonTest.spec.ts b/report-viewer/tests/e2e/OpenComparisonTest.spec.ts new file mode 100644 index 000000000..729d76c37 --- /dev/null +++ b/report-viewer/tests/e2e/OpenComparisonTest.spec.ts @@ -0,0 +1,49 @@ +// Ensures that different styles of passing submissions are supported +import { expect, test } from '@playwright/test' +import { uploadFile } from './TestUtils' + +interface DataSet { + datasetName: string + firstSubmissionName: string + secondSubmissionName: string +} + +const testSets: DataSet[] = [ + { + datasetName: 'fileSingleRoot-report.zip', + firstSubmissionName: '0.java', + secondSubmissionName: '1.java' + }, + { + datasetName: 'folderSingleRoot-report.zip', + firstSubmissionName: '0', + secondSubmissionName: '1' + }, + // Disabled due to https://github.com/jplag/JPlag/issues/1610 + /*{ datasetName: 'fileMultiRoot-report.zip', firstSubmissionName: 'f0\\0.java', secondSubmissionName: 'f1\\1.java' },*/ + { + datasetName: 'folderMultiRoot-report.zip', + firstSubmissionName: 'f0\\0', + secondSubmissionName: 'f1\\1' + } +] + +for (const testSet of testSets) { + test(`Can open ${testSet.datasetName}`, async ({ page }) => { + await page.goto('/') + + await uploadFile(testSet.datasetName, page) + + const comparisonTable = await page.getByText('Cluster1').textContent() + expect(comparisonTable).toContain( + `1${testSet.firstSubmissionName}${testSet.secondSubmissionName}` + ) + await page.getByText(`1${testSet.firstSubmissionName}${testSet.secondSubmissionName}`).click() + await page.waitForURL(/\/comparison\/.*/) + + const bodyComparison = await page.locator('body').textContent() + expect(bodyComparison).toContain( + `Comparison: ${testSet.firstSubmissionName} - ${testSet.secondSubmissionName}` + ) + }) +} From 9c0511943cab70c8b1debdcae6b6aef86e316cb0 Mon Sep 17 00:00:00 2001 From: Alex | Kronox Date: Fri, 1 Mar 2024 12:29:07 +0100 Subject: [PATCH 07/12] fix typo in workflow --- .github/workflows/complete-e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/complete-e2e.yml b/.github/workflows/complete-e2e.yml index 4e4a73692..c0dc732d7 100644 --- a/.github/workflows/complete-e2e.yml +++ b/.github/workflows/complete-e2e.yml @@ -69,7 +69,7 @@ jobs: {zip: "fileSingleRoot.zip", name: "fileSingleRoot", folder: "fileSingleRoot", language: "java", cliArgs: ""}, {zip: "folderSingleRoot.zip", name: "folderSingleRoot", folder: "folderSingleRoot", language: "java", cliArgs: ""}, {zip: "fileMultiRoot.zip", name: "fileMultiRoot", folder: "f0", language: "java", cliArgs: "--new f1"}, - {zip: "folderMultiRoot.zip", name: "fileMultiRoot", folder: "f0", language: "java", cliArgs: "--new f1"} + {zip: "folderMultiRoot.zip", name: "folderMultiRoot", folder: "f0", language: "java", cliArgs: "--new f1"} ] steps: From 70ba8994b2ec576728227d6771d2f7c652ce820e Mon Sep 17 00:00:00 2001 From: Alex | Kronox Date: Fri, 1 Mar 2024 13:00:16 +0100 Subject: [PATCH 08/12] fix sys dependent regex --- .../tests/e2e/OpenComparisonTest.spec.ts | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/report-viewer/tests/e2e/OpenComparisonTest.spec.ts b/report-viewer/tests/e2e/OpenComparisonTest.spec.ts index 729d76c37..cb9ce7564 100644 --- a/report-viewer/tests/e2e/OpenComparisonTest.spec.ts +++ b/report-viewer/tests/e2e/OpenComparisonTest.spec.ts @@ -20,11 +20,15 @@ const testSets: DataSet[] = [ secondSubmissionName: '1' }, // Disabled due to https://github.com/jplag/JPlag/issues/1610 - /*{ datasetName: 'fileMultiRoot-report.zip', firstSubmissionName: 'f0\\0.java', secondSubmissionName: 'f1\\1.java' },*/ + { + datasetName: 'fileMultiRoot-report.zip', + firstSubmissionName: 'f0\\\\|/0.java', + secondSubmissionName: 'f1\\\\|/1.java' + }, { datasetName: 'folderMultiRoot-report.zip', - firstSubmissionName: 'f0\\0', - secondSubmissionName: 'f1\\1' + firstSubmissionName: 'f0\\\\|/0', + secondSubmissionName: 'f1\\\\|/1' } ] @@ -35,15 +39,15 @@ for (const testSet of testSets) { await uploadFile(testSet.datasetName, page) const comparisonTable = await page.getByText('Cluster1').textContent() - expect(comparisonTable).toContain( - `1${testSet.firstSubmissionName}${testSet.secondSubmissionName}` - ) - await page.getByText(`1${testSet.firstSubmissionName}${testSet.secondSubmissionName}`).click() + + const lineRegEx = RegExp('1' + testSet.firstSubmissionName + testSet.secondSubmissionName) + expect(comparisonTable).toMatch(lineRegEx) + await page.getByText(lineRegEx).click() await page.waitForURL(/\/comparison\/.*/) const bodyComparison = await page.locator('body').textContent() - expect(bodyComparison).toContain( - `Comparison: ${testSet.firstSubmissionName} - ${testSet.secondSubmissionName}` + expect(bodyComparison).toMatch( + RegExp(`Comparison: ${testSet.firstSubmissionName} - ${testSet.secondSubmissionName}`) ) }) } From 385b1517786f63ab8b3bdb94b7ddb83f8d9c4dd4 Mon Sep 17 00:00:00 2001 From: Alex | Kronox Date: Fri, 1 Mar 2024 13:29:21 +0100 Subject: [PATCH 09/12] disable multi root with file submissions --- report-viewer/tests/e2e/OpenComparisonTest.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/report-viewer/tests/e2e/OpenComparisonTest.spec.ts b/report-viewer/tests/e2e/OpenComparisonTest.spec.ts index cb9ce7564..a0fe30be3 100644 --- a/report-viewer/tests/e2e/OpenComparisonTest.spec.ts +++ b/report-viewer/tests/e2e/OpenComparisonTest.spec.ts @@ -20,11 +20,11 @@ const testSets: DataSet[] = [ secondSubmissionName: '1' }, // Disabled due to https://github.com/jplag/JPlag/issues/1610 - { + /*{ datasetName: 'fileMultiRoot-report.zip', firstSubmissionName: 'f0\\\\|/0.java', secondSubmissionName: 'f1\\\\|/1.java' - }, + },*/ { datasetName: 'folderMultiRoot-report.zip', firstSubmissionName: 'f0\\\\|/0', From 6df05cba035af1c568cd8c47e258a2733da5d573 Mon Sep 17 00:00:00 2001 From: Alex | Kronox Date: Fri, 1 Mar 2024 14:10:43 +0100 Subject: [PATCH 10/12] remove temporary push --- .github/workflows/complete-e2e.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/complete-e2e.yml b/.github/workflows/complete-e2e.yml index c0dc732d7..4e06ce371 100644 --- a/.github/workflows/complete-e2e.yml +++ b/.github/workflows/complete-e2e.yml @@ -3,8 +3,6 @@ name: Complete e2e Test on: workflow_dispatch: - # temprary - push: pull_request: types: [opened, synchronize, reopened] paths: From 3831e73ba1e11911db84bfd346b404ac3111b7c4 Mon Sep 17 00:00:00 2001 From: Alex | Kronox Date: Tue, 5 Mar 2024 17:05:23 +0100 Subject: [PATCH 11/12] mixed multi root --- .github/workflows/complete-e2e.yml | 4 +++- report-viewer/tests/e2e/OpenComparisonTest.spec.ts | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/complete-e2e.yml b/.github/workflows/complete-e2e.yml index 4e06ce371..d27eb0018 100644 --- a/.github/workflows/complete-e2e.yml +++ b/.github/workflows/complete-e2e.yml @@ -67,7 +67,9 @@ jobs: {zip: "fileSingleRoot.zip", name: "fileSingleRoot", folder: "fileSingleRoot", language: "java", cliArgs: ""}, {zip: "folderSingleRoot.zip", name: "folderSingleRoot", folder: "folderSingleRoot", language: "java", cliArgs: ""}, {zip: "fileMultiRoot.zip", name: "fileMultiRoot", folder: "f0", language: "java", cliArgs: "--new f1"}, - {zip: "folderMultiRoot.zip", name: "folderMultiRoot", folder: "f0", language: "java", cliArgs: "--new f1"} + {zip: "folderMultiRoot.zip", name: "folderMultiRoot", folder: "f0", language: "java", cliArgs: "--new f1"}, + {zip: "mixedMultiRoot.zip", name: "mixedBaseFile", folder: "f0", language: "java", cliArgs: "--new f1"}, + {zip: "mixedMultiRoot.zip", name: "mixedBaseFolder", folder: "f1", language: "java", cliArgs: "--new f0"} ] steps: diff --git a/report-viewer/tests/e2e/OpenComparisonTest.spec.ts b/report-viewer/tests/e2e/OpenComparisonTest.spec.ts index a0fe30be3..5a3976e7c 100644 --- a/report-viewer/tests/e2e/OpenComparisonTest.spec.ts +++ b/report-viewer/tests/e2e/OpenComparisonTest.spec.ts @@ -24,6 +24,16 @@ const testSets: DataSet[] = [ datasetName: 'fileMultiRoot-report.zip', firstSubmissionName: 'f0\\\\|/0.java', secondSubmissionName: 'f1\\\\|/1.java' + }, + { + datasetName: 'mixedBaseFile-report.zip', + firstSubmissionName: 'f0\\\\|/0.java', + secondSubmissionName: 'f1\\\\|/1' + }, + { + datasetName: 'mixedBaseFolder-report.zip', + firstSubmissionName: 'f0\\\\|/0.java', + secondSubmissionName: 'f1\\\\|/1' },*/ { datasetName: 'folderMultiRoot-report.zip', From 0064cbe8bfcd9a3f9e25494416d0ed9149a97d97 Mon Sep 17 00:00:00 2001 From: Alex | Kronox Date: Tue, 5 Mar 2024 17:12:23 +0100 Subject: [PATCH 12/12] add zip file --- .github/workflows/files/mixedMultiRoot.zip | Bin 0 -> 5902 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/workflows/files/mixedMultiRoot.zip diff --git a/.github/workflows/files/mixedMultiRoot.zip b/.github/workflows/files/mixedMultiRoot.zip new file mode 100644 index 0000000000000000000000000000000000000000..628c301e75ad8bffebddd84e9ad20279f5be56ba GIT binary patch literal 5902 zcmZ`-WmFqno5a1iySo!4xE3hx&I>J4f&>j-+}+)ZrWB`0(NanXl;T$0U4s=UY~RoJ z?4I4{{+N58Gjs0WnbFliMI%K*Lc&5a0NI*0tBm)bVj&?>Ga?~j|JgbS3JCIpY$3LF zW)|Qj3G#OW6VLLLUGh_Lg%F0DvYan|Qx*>CfLM_eUWfSb?6(C;${-c)9IpGd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