Skip to content

Commit

Permalink
qa: UT e2e for autocomplete field and input select with click to add …
Browse files Browse the repository at this point in the history
…action
  • Loading branch information
nicolaslabbe committed Feb 2, 2017
1 parent ff1330f commit a00934f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/cms/editor/handlebars/printInput.js
Expand Up @@ -35,7 +35,7 @@ describe('printInput', function() {
it('cmsEditor.getAttributes()', function() {
var result = cmsEditor.getAttributes(data.attributes)
chai.expect(result).to.be.a('string')
chai.expect(result).to.be.equal('id="key" data-id="key" value="value" data-maxlength="max-length" reload="reload" tabIndex="order" data-required="required" data-display="display" data-visible="visible" data-autocomplete="autocomplete" placeholder="placeholder" data-size="thumbs" multiple disabled')
chai.expect(result).to.be.equal('id="key" data-id="key" value="value" data-maxlength="max-length" reload="reload" tabIndex="order" data-required="required" data-display="display" data-visible="visible" data-autocomplete="autocomplete" placeholder="placeholder" data-size="thumbs" data-multiple="multiple" disabled')
})

/**
Expand Down
24 changes: 24 additions & 0 deletions tests/e2e/data/data1.js
Expand Up @@ -33,6 +33,30 @@ describe('Abe', function() {
.assert.urlEquals("http://localhost:3003/abe/editor/autocomplete.html", "Clicked URL Matches with URL of the New Window");
});

it('Check input select fields', function(client) {
client
.useXpath()
.url('http://localhost:3003/abe/editor/autocomplete.html')
.click('//*[@id="colors.multiple"]/option[2]')
.waitForElementVisible('//*[@id="colors"]/div/div/div/div[2]/div/div/div', 1000)
.assert.containsText('//*[@id="colors"]/div/div/div/div[2]/div/div/div', 'rouge')
.click('//*[@id="colors"]/div/div/div/div[2]/div/div/div/span')
.assert.elementNotPresent('//*[@id="colors"]/div/div/div/div[2]/div/div/div')
});

it('Check input autocomplete fields', function(client) {
client
.useXpath()
.url('http://localhost:3003/abe/editor/autocomplete.html')
.setValue('//*[@id="colors.colors_autocomplete"]', 'rouge')
.waitForElementVisible('//*[@id="colors"]/div/div/div/div[3]/div/div[2]/div', 1000)
.click('//*[@id="colors"]/div/div/div/div[3]/div/div[2]/div')
.waitForElementVisible('//*[@id="colors"]/div/div/div/div[3]/div/div/div', 1000)
.assert.containsText('//*[@id="colors"]/div/div/div/div[3]/div/div/div', 'rouge')
.click('//*[@id="colors"]/div/div/div/div[3]/div/div/div/span')
.assert.elementNotPresent('//*[@id="colors"]/div/div/div/div[3]/div/div/div')
});

// it('Abe type data reference json', function(client) {
// client
// .useXpath()
Expand Down

0 comments on commit a00934f

Please sign in to comment.