Skip to content

Commit

Permalink
FUSETOOLS2-2201
Browse files Browse the repository at this point in the history
  • Loading branch information
pospisilf committed Dec 19, 2023
1 parent b54504a commit 96c2607
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 6 deletions.
60 changes: 55 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Main CI

on:
push:
branches: [ main ]
branches: [ main, FUSETOOLS2-2201 ]
pull_request:
branches: [ main ]
workflow_dispatch:
Expand All @@ -14,16 +14,63 @@ concurrency:
jobs:
main:
strategy:
matrix:
os: [ ubuntu-latest, macos-13, windows-latest ]
version: [ "1.82.3", max ] # [ "x.x.x" | latest | max ]
type: [ stable ] # [ stable | insider ]
fail-fast: false
matrix:
# os: [ ubuntu-latest, macos-13, windows-latest ]
# version: [ "1.82.3", max ] # [ "x.x.x" | latest | max ]
# type: [ stable ] # [ stable | insider ]
include:
- os: ubuntu-latest
version: "1.82.3"
type: stable
- os: ubuntu-latest
version: max
camelversion: "4.2.0"
type: stable
- os: ubuntu-latest
version: max
camelversion: "4.0.0.redhat-00031"
type: stable
- os: ubuntu-latest
version: max
camelversion: "4.0.0"
type: stable
- os: macos-13
version: "1.82.3"
type: stable
- os: macos-13
version: max
camelversion: "4.2.0"
type: stable
- os: macos-13
version: max
camelversion: "4.0.0.redhat-00031"
type: stable
- os: macos-13
version: max
camelversion: "4.0.0"
type: stable
- os: windows-latest
version: "1.82.3"
type: stable
- os: windows-latest
version: max
camelversion: "4.2.0"
type: stable
- os: windows-latest
version: max
camelversion: "4.0.0.redhat-00031"
type: stable
- os: windows-latest
version: max
camelversion: "4.0.0"
type: stable

env:
CODE_VERSION: ${{ matrix.version }}
CODE_TYPE: ${{ matrix.type }}
TEST_RESOURCES: test-resources
CAMEL_VERSION: ${{ matrix.camelversion }}

runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -70,6 +117,9 @@ jobs:

- name: npm-vscode:prepublish
run: npm run vscode:prepublish

- name: show camel version
run: echo $CAMEL_VERSION

- name: test (ubuntu)
id: test_Ubuntu
Expand Down
65 changes: 65 additions & 0 deletions src/ui-test/tests/00001.develop.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License", destination); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { assert } from 'chai';
import {
CATALOG_VERSION_UI,
RESOURCES,
closeEditor,
waitUntilExtensionIsActivated,
} from '../utils/testUtils';
import {
ActivityBar,
before,
VSBrowser,
WebDriver,
TextSetting,
Workbench
} from 'vscode-uitests-tooling';
import * as pjson from '../../../package.json';

describe('mycosi', function () {
this.timeout(300000);

let driver: WebDriver;
//let contentAssist: ContentAssist;

before(async function () {
this.timeout(40000);
driver = VSBrowser.instance.driver;
await VSBrowser.instance.openResources(RESOURCES);
await VSBrowser.instance.waitForWorkbench();

await waitUntilExtensionIsActivated(driver, `${pjson.displayName}`);
await (await new ActivityBar().getViewControl('Explorer')).openView();
});

it('actual version', async function () {
const settings = await new Workbench().openSettings();
const textSetting = await settings.findSetting(CATALOG_VERSION_UI, 'Camel') as TextSetting;


await textSetting.setValue(process.env.CAMEL_VERSION);

console.log("my version: " + await textSetting.getValue());


await closeEditor('Settings', true);
assert.isTrue(true);
});

});
2 changes: 1 addition & 1 deletion src/ui-test/uitest_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const extensionFolder = path.join(projectPath, '.test-extensions');

async function main(): Promise<void> {
const tester = new ExTester(storageFolder, releaseType, extensionFolder);
await tester.setupAndRunTests('out/src/ui-test/tests/*.test.js',
await tester.setupAndRunTests('out/src/ui-test/tests/00001.develop.test.js',
process.env.CODE_VERSION,
{
'installDependencies': true
Expand Down

0 comments on commit 96c2607

Please sign in to comment.