Commit 75b64844 authored by Carsten  Rose's avatar Carsten Rose
Browse files

test snapshot

parents be74fcdf 260ba45c
......@@ -2,6 +2,8 @@ PHPDOC ?= support/pear/phpdoc
JSDOC ?= jsdoc
PKG_VERSION = $(shell awk '/version/ { print $$3 }' extension/ext_emconf.php | sed "s/'//g")
NIGHTLY_DATE = $(shell date '+%Y%m%d')
GIT_REVISION_SHORT = $(shell git rev-parse --short HEAD || true)
GIT_REVISION_LONG = $(shell git rev-parse HEAD || true)
EXTENSION_CONTENT = Classes Configuration Documentation qfq Resources ext_emconf.php ext_localconf.php ext_tables.php ext_icon.png config.example.ini
all: archive t3sphinx
......@@ -20,10 +22,15 @@ qfq.zip:
clean:
rm -f qfq_$(PKG_VERSION).zip
nightly:
nightly: bootstrap
rm -f qfq-????????.zip
cd extension; zip -r ../qfq-$(NIGHTLY_DATE) $(EXTENSION_CONTENT) -x config.ini
snapshot: bootstrap
echo $(GIT_REVISION_LONG) > extension/revision.git
cd extension ; zip -r ../qfq-$(GIT_REVISION_SHORT) $(EXTENSION_CONTENT) -x config.ini
t3sphinx:
cd extension/Documentation/_make; make html
......@@ -50,7 +57,7 @@ phpdoc: .phpdocinstall
touch $@
.plantuml_install: .doc_plantuml .support_plantuml
wget -O support/plantuml/plantuml.jar 'https://downloads.sourceforge.net/project/plantuml/plantuml.jar'
wget --no-check-certificate -O support/plantuml/plantuml.jar 'https://downloads.sourceforge.net/project/plantuml/plantuml.jar'
touch $@
.npmpackages: package.json
......
......@@ -46,17 +46,27 @@
</div>
<div class="col-md-6">
<div class="input-group">
<<<<<<< HEAD
<input id="input1" name="name" class="form-control" type="text" placeholder="Name" readonly>
<div class="input-group-btn">
<button class="btn btn-success"
=======
<input id="input1" name="name" class="form-control" type="text" placeholder="Grade">
<div class="input-group-btn">
<button class="btn btn-default"
>>>>>>> origin/raos_work
onclick="$('#input1').prop('readonly',!$('#input1').prop('readonly'))">
<span class="glyphicon glyphicon-lock" aria-hidden="true"></span>
</button>
</div>
</div>
</div>
<<<<<<< HEAD
<div class="col-md-3 qfq-note">
=======
<div class="col-md-3">
>>>>>>> origin/raos_work
<p>Note</p>
</div>
</div>
......@@ -68,16 +78,23 @@
<div class="col-md-6">
<div class="input-group">
<input id="passwordinput" type="password" name="password" class="form-control" type="text"
<<<<<<< HEAD
placeholder="Password">
<div class="input-group-btn">
<button class="btn btn-info"
=======
placeholder="Grade">
<div class="input-group-btn">
<button class="btn btn-default"
>>>>>>> origin/raos_work
onclick="$('#passwordinput').attr('type',$('#passwordinput').attr('type')==='password' ? 'text': 'password')">
<span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
</button>
</div>
</div>
</div>
<<<<<<< HEAD
<div class="col-md-3 qfq-note">
<p>Note</p>
</div>
......@@ -125,11 +142,17 @@
</div>
</div>
<div class="col-md-3 qfq-note">
=======
<div class="col-md-3">
>>>>>>> origin/raos_work
<p>Note</p>
</div>
</div>
<<<<<<< HEAD
=======
>>>>>>> origin/raos_work
</form>
</div>
......@@ -140,6 +163,14 @@
<script src="../js/EventEmitter.min.js"></script>
<script src="../js/qfq.debug.js"></script>
<script type="text/javascript">
<<<<<<< HEAD
=======
// Do not remove, or selenium tests will fail.
QfqNS.QfqPage.prototype.beforeUnloadHandler = function (evt) {
};
>>>>>>> origin/raos_work
$(function () {
var qfqPage = new QfqNS.QfqPage({
tabsId: 'myTabs',
......
/**
* @author Rafael Ostertag <rafael.ostertag@math.uzh.ch>
*/
'use strict';
const {Builder, By, until} = require('selenium-webdriver'),
test = require('selenium-webdriver/testing'),
assert = require('assert'),
should = require('should');
const MOCK_PATH = "/mockup/inputmodeswitcher.html";
const BASE_URL = process.env.SELENIUM_BASE_URL || "http://qfq.math.uzh.ch/selenium";
const URL = BASE_URL + MOCK_PATH;
console.log("Use URL: " + URL);
test.describe('Typeahead', function () {
var driver;
test.before(function () {
driver = new Builder().forBrowser('chrome').build();
});
test.after(function () {
driver.quit();
});
test.it("should switch to readonly", function (done) {
driver.get(URL)
.then(
() => driver.findElement(By.id('input1'))
.then(
(textinput) => textinput.sendKeys('typing some text')
.then(
driver.findElement(By.css('#input1 + div > button'))
.then(
(button) => button.click()
)
)
).then(
driver.findElement(By.id('input1'))
.then(
(textinput) => textinput.sendKeys('typing in readonly field')
)
).then(
driver.findElement(By.id('input1'))
.then(
(textinput) => (textinput.getAttribute('value'))
.then(
text => {
should(text).be.exactly('typing some text');
done();
}
)
)
)
)
});
test.it("should switch back from readonly", function (done) {
driver.get(URL)
.then(
() => driver.findElement(By.css('#input1 + div > button'))
.then(
(button) => button.click()
.then(
() => button.click()
)
)
).then(
driver.findElement(By.id('input1'))
.then(
(textinput) => textinput.clear()
.then(
() => textinput.sendKeys('This should now be typed')
).then(
() => textinput.getAttribute('value')
.then(
text => {
should(text).be.exactly('This should now be typed');
done();
}
)
)
)
)
});
test.it("should switch to readonly when clicking the button-enclosed element", function (done) {
driver.get(URL)
.then(
() => driver.findElement(By.id('input1'))
.then(
(textinput) => textinput.sendKeys('typing some text')
.then(
driver.findElement(By.css('#input1 + div > button span'))
.then(
(button) => button.click()
)
)
).then(
driver.findElement(By.id('input1'))
.then(
(textinput) => textinput.sendKeys('typing in readonly field')
)
).then(
driver.findElement(By.id('input1'))
.then(
(textinput) => (textinput.getAttribute('value'))
.then(
text => {
should(text).be.exactly('typing some text');
done();
}
)
)
)
)
});
});
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment