diff --git a/packages/core/scripts/e2e/index.js b/packages/core/scripts/e2e/index.js index 57f881f96a..1b6203a773 100644 --- a/packages/core/scripts/e2e/index.js +++ b/packages/core/scripts/e2e/index.js @@ -59,7 +59,7 @@ function registerE2ETest(desc, tst) { await tst(driver); if (takeScreenshots) { await snapshot.takeScreenshot(driver, { - name: this.test.fullTitle(), + name: this.test.fullTitle().replace(/(^[\w-]+\/[\w-]+)/, '$1:'), specIndex: specIndex++ }); } diff --git a/packages/core/scripts/e2e/snapshot.js b/packages/core/scripts/e2e/snapshot.js index 7345e7d7e4..7352519040 100644 --- a/packages/core/scripts/e2e/snapshot.js +++ b/packages/core/scripts/e2e/snapshot.js @@ -93,13 +93,24 @@ class Snapshot { async _takeScreenshot(driver, options) { const capabilities = await driver.getCapabilities(); + const png = await driver.takeScreenshot(); - const url = await driver.getCurrentUrl(); + let url = await driver.getCurrentUrl(); + + // TODO remove the modified url/description once we're happy with the comparison to v3 + let platform = 'android'; + + let replacedUrl = url.replace('3333', '8876').replace('src/components', '/e2e').replace('test/', ''); + url = replacedUrl + `/index.html?ionicplatform=${platform}&ionicOverlayCreatedDiff=0&snapshot=true`; + console.log('url', url); + + let description = options.name.replace(': ', `: ${platform} `) + '.'; + console.log('description', description); return Promise.resolve({ app_id: this.appId, group_id: this.groupId, - description: options.name, + description: description, spec_index: options.specIndex, total_specs: this.totalSpecs, test_id: this.testId, diff --git a/packages/core/src/components/action-sheet/test/basic/e2e.js b/packages/core/src/components/action-sheet/test/basic/e2e.js index bbb8b65e66..cedce9f4d5 100644 --- a/packages/core/src/components/action-sheet/test/basic/e2e.js +++ b/packages/core/src/components/action-sheet/test/basic/e2e.js @@ -5,7 +5,7 @@ const { register, Page } = require('../../../../../scripts/e2e'); class ActionSheetE2ETestPage extends Page { constructor(driver) { - super(driver, 'http://localhost:3333/src/components/action-sheet/test/basic/index.html'); + super(driver, 'http://localhost:3333/src/components/action-sheet/test/basic'); } present(buttonId) {