diff --git a/acceptance-test.bat b/acceptance-test.bat index 8aa25797..f94fb822 100644 --- a/acceptance-test.bat +++ b/acceptance-test.bat @@ -1,4 +1,6 @@ @echo off set INPUT_FOLDER=%CD%\packages\acceptance-tests\input set OUTPUT_FOLDER=%CD%\packages\acceptance-tests\output + +yarn build:release call dev.bat diff --git a/acceptance-test.sh b/acceptance-test.sh index 4a18e7c8..dd7ac8f5 100755 --- a/acceptance-test.sh +++ b/acceptance-test.sh @@ -1,4 +1,6 @@ -set INPUT_FOLDER=$PWD/packages/acceptance-tests/input -set OUTPUT_FOLDER=$PWD/packages/acceptance-tests/output -. ./dev.sh +export INPUT_FOLDER=$PWD/packages/acceptance-tests/input +export OUTPUT_FOLDER=$PWD/packages/acceptance-tests/output + +yarn build:release +sh dev.sh diff --git a/packages/acceptance-tests/puppeteer/eclipse-theia.js b/packages/acceptance-tests/puppeteer/eclipse-theia.js index b1b74f2c..6b6d6226 100644 --- a/packages/acceptance-tests/puppeteer/eclipse-theia.js +++ b/packages/acceptance-tests/puppeteer/eclipse-theia.js @@ -29,7 +29,7 @@ const runSpmUiUpgradeHelperTool = async () => { const page = utils.getPage(); await page.focus("div#theia-app-shell"); await page.keyboard.press('F1'); - await page.keyboard.type('Run SPM'); + await page.keyboard.type('Run SPM UI Upgrade Helper'); await page.keyboard.press('Enter'); } @@ -38,7 +38,7 @@ const waitForWorkingMessageToAppear = async () => { } const waitForWorkingMessageToDisappear = async () => { - await utils.getPage().waitForSelector('div.theia-notification-message', { hidden: true, timeout: 30000 }); + await utils.getPage().waitForSelector('div.theia-notification-message', { hidden: true, timeout: 40000 }); } /** @@ -50,7 +50,7 @@ const _waitForCorrectNumberOfGitChanges = async (numChanges) => { await utils.getPage().waitForFunction( `document.getElementsByClassName("theia-badge-decorator-sidebar").length > 0` + `&& document.getElementsByClassName("theia-badge-decorator-sidebar")[0].innerText === "${numChanges}"`, - { timeout: 10000 } + { timeout: 50000 } ); } @@ -59,7 +59,7 @@ const _listGitChanges = async () => { let names = []; for(let i = 0; i < sps.length; i++) { const spanName = await (await sps[i].getProperty('textContent')).jsonValue(); - names.push(spanName); + if (spanName !=="Run SPM UI Upgrade Helper"){names.push(spanName);} } return names.sort(); } diff --git a/packages/acceptance-tests/puppeteer/index.test.js b/packages/acceptance-tests/puppeteer/index.test.js index 95d5ae03..8837840d 100644 --- a/packages/acceptance-tests/puppeteer/index.test.js +++ b/packages/acceptance-tests/puppeteer/index.test.js @@ -2,7 +2,7 @@ const utils = require("./utils"); const theia = require("./eclipse-theia"); const generateExpectedFileList = require("../scripts/generate-expected-file-list"); -jest.setTimeout(30000); +jest.setTimeout(70000); test('puppeteer test 1 (kitchen sink data set)', async () => { @@ -19,10 +19,11 @@ test('puppeteer test 1 (kitchen sink data set)', async () => { await theia.runSpmUiUpgradeHelperTool(); await theia.waitForWorkingMessageToAppear(); await theia.waitForWorkingMessageToDisappear(); - // const actual = await theia.getGitChanges(expected.length); + + // const actual = await theia.getGitChanges(expected.length); // Assert - //expect(actual).toEqual(expected); + // expect(actual).toEqual(expected); } finally { await utils.screenshot("error.png"); diff --git a/packages/acceptance-tests/scripts/generate-expected-file-list.js b/packages/acceptance-tests/scripts/generate-expected-file-list.js index fed1852d..0314a62a 100644 --- a/packages/acceptance-tests/scripts/generate-expected-file-list.js +++ b/packages/acceptance-tests/scripts/generate-expected-file-list.js @@ -8,9 +8,6 @@ const generateExpectedFileList = datasetName => { for(let i = 0; i < dataset.cssUpdates; i++) { changes.push(`has-updates-css-${i}.css`); } - for(let i = 0; i < dataset.invalidCssFiles; i++) { - changes.push(`invalid-css-file-${i}.css`); - } for(let i = 0; i < dataset.iconUpdates; i++) { changes.push(`has-updates-icons-${i}.properties`); } @@ -21,6 +18,9 @@ const generateExpectedFileList = datasetName => { changes.push("Chevron_Down_Blue30_10px.png"); changes.push("chevron--down10-on-dark.svg"); } + for(let i = 0; i < dataset.windowSizeUpdates; i++) { + changes.push(`has-updates-${i}.uim`); + } return changes.sort(); }; diff --git a/packages/acceptance-tests/scripts/generate-expected-file-list.test.js b/packages/acceptance-tests/scripts/generate-expected-file-list.test.js index 8e163830..e36d8ff8 100644 --- a/packages/acceptance-tests/scripts/generate-expected-file-list.test.js +++ b/packages/acceptance-tests/scripts/generate-expected-file-list.test.js @@ -6,8 +6,6 @@ const expected = [ "has-updates-css-2.css", "has-updates-css-1.css", "has-updates-css-0.css", - "invalid-css-file-0.css", - "invalid-css-file-1.css", "has-updates-css-and-icons-1.css", "has-updates-css-and-icons-0.css", "Chevron_Down_Blue30_10px.png", @@ -20,6 +18,9 @@ const expected = [ "has-updates-icons-0.properties", "has-updates-css-6.css", "has-updates-css-5.css", + "has-updates-1.uim", + "has-updates-0.uim", + "has-updates-2.uim" ].sort(); test('kitchen-sink file list', () => { diff --git a/packages/docker-tasks/docker-tasks.js b/packages/docker-tasks/docker-tasks.js index 562e1a8d..aa64cd81 100644 --- a/packages/docker-tasks/docker-tasks.js +++ b/packages/docker-tasks/docker-tasks.js @@ -159,8 +159,8 @@ const dockerTasks = (execFunction = shelljs, props, args) => { } if (version !== "latest") { cmds.push(`docker image tag ${additionalArgs} ${props.imageName}:latest ${props.imageName}:${version}`); - cmds.push(`docker image tag ${additionalArgs} ${props.parserImageName}:latest ${props.imageName}:${version}`); - cmds.push(`docker image tag ${additionalArgs} ${props.nodeImageName}:latest ${props.imageName}:${version}`); + cmds.push(`docker image tag ${additionalArgs} ${props.parserImageName}:latest ${props.parserImageName}:${version}`); + cmds.push(`docker image tag ${additionalArgs} ${props.nodeImageName}:latest ${props.nodeImageName}:${version}`); } cmds.push(`docker image tag ${additionalArgs} ${props.imageName}:latest docker.io/${props.username}/${props.imageName}:${version}`); cmds.push(`docker image tag ${additionalArgs} ${props.parserImageName}:latest docker.io/${props.username}/${props.parserImageName}:${version}`); diff --git a/packages/docker-tasks/docker-tasks.test.js b/packages/docker-tasks/docker-tasks.test.js index 401eea07..d980b501 100644 --- a/packages/docker-tasks/docker-tasks.test.js +++ b/packages/docker-tasks/docker-tasks.test.js @@ -219,7 +219,7 @@ test("calling 'release ' runs the correct commands", () => { ]; const props = yaml.load(inputConfig.join("\n")); const inputArgs = "release 0.0.1".split(" "); - const expectedCommands = ["docker image tag foo:latest foo:0.0.1", "docker image tag bar:latest foo:0.0.1", "docker image tag baz:latest foo:0.0.1", "docker image tag foo:latest docker.io/folkforms/foo:0.0.1", "docker image tag bar:latest docker.io/folkforms/bar:0.0.1", "docker image tag baz:latest docker.io/folkforms/baz:0.0.1", "docker image push docker.io/folkforms/foo:0.0.1", "docker image push docker.io/folkforms/bar:0.0.1", "docker image push docker.io/folkforms/baz:0.0.1"]; + const expectedCommands = ["docker image tag foo:latest foo:0.0.1", "docker image tag bar:latest bar:0.0.1", "docker image tag baz:latest baz:0.0.1", "docker image tag foo:latest docker.io/folkforms/foo:0.0.1", "docker image tag bar:latest docker.io/folkforms/bar:0.0.1", "docker image tag baz:latest docker.io/folkforms/baz:0.0.1", "docker image push docker.io/folkforms/foo:0.0.1", "docker image push docker.io/folkforms/bar:0.0.1", "docker image push docker.io/folkforms/baz:0.0.1"]; const expectedEchos = []; const expectedErrorCode = 0; diff --git a/packages/release/release.js b/packages/release/release.js index 01d3bce0..134a748e 100644 --- a/packages/release/release.js +++ b/packages/release/release.js @@ -29,7 +29,7 @@ const release = (shell, option, version) => { shell.echo("Building..."); exec(shell, `yarn install-all`); exec(shell, `yarn test`); - exec(shell, `echo { "version": "${version}" }>version.json`); + exec(shell, `echo { '"'version'"': '"'${version}'"'}>version.json`); exec(shell, `yarn build:release`); shell.echo("Creating release branch..."); exec(shell, `git checkout -b v${version}`); diff --git a/packages/release/release.test.js b/packages/release/release.test.js index d69e7cc8..b8af3845 100644 --- a/packages/release/release.test.js +++ b/packages/release/release.test.js @@ -43,7 +43,7 @@ test('--start option runs the correct commands', () => { "git tag --list v0.10.0", "yarn install-all", "yarn test", - "echo { \"version\": \"0.10.0\" }>version.json", + "echo { '\"'version'\"': '\"'0.10.0'\"'}>version.json", "yarn build:release", "git checkout -b v0.10.0", "git push --set-upstream origin v0.10.0",