Skip to content

Set up CI with Azure Pipelines #2

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

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
- docker-tests

pool:
vmImage: 'ubuntu-latest'

steps:
- script: |
npm install
docker-compose -f docker-compose.yml --project-directory . up -d
docker ps
displayName: 'Setup Tests'
continueOnError: false
- script: |
npm run test
docker-compose -f docker-compose.yml --project-directory . down
displayName: 'Run Tests'
continueOnError: false
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ services:
- HUB_PORT=4444
ports:
- 5901:5900

32 changes: 32 additions & 0 deletions tests/Untitled.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
14 changes: 7 additions & 7 deletions tests/enable_extension_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,29 @@ let driver = global.driver;

describe('EnableExtensionTest', () => {
it('verify accessibility toolbar extension exists', async () => {
await driver.get('http://host.docker.internal:10000/');

await driver.get('http://127.0.0.1:10000/');
await driver.sleep(10000);
let psw = await driver.findElement(By.name('password'));

await psw.sendKeys('12345678');

await psw.sendKeys(webdriver.Key.ENTER);

await driver.sleep(2000);
await driver.sleep(5000);

await driver.findElement(By.linkText("Nbextensions")).click();

await driver.sleep(1000);
await driver.sleep(5000);

let text = await driver.findElement(webdriver.By.linkText('Accessibility Toolbar')).getText();
expect(text).to.equal("Accessibility Toolbar");

await driver.findElement(By.xpath("//*[@id=\"tabs\"]/li[4]/a")).click();
await driver.sleep(1000);
await driver.sleep(5000);
await driver.findElement(By.xpath("//*[@id=\"nbextensions-configurator-container\"]/div[3]/div[1]/div[5]/button[1]")).click();
await driver.sleep(1000);
await driver.sleep(5000);
await driver.findElement(By.linkText("Files")).click();
await driver.sleep(1000);
await driver.sleep(5000);

});
after(async () => driver.quit());
Expand Down