diff options
author | Peter Zhang <peter@innocraft.com> | 2022-01-20 03:46:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 03:46:07 +0300 |
commit | a02ae2f31a4b0d3eccf9dea5d84fbae444e3b2cd (patch) | |
tree | 295ecd3d6baf262a9207779c96366715dccbcedf /plugins/SegmentEditor/tests/UI | |
parent | b09172f3049f02db49a4cf090d457230af2939fa (diff) |
enable case insensitive on segment search (#18643)
* Update FieldExpandableSelect.vue
enable case insentive
* shorter the function
shorter the function
* built vue files
* Update FieldExpandableSelect.vue
use toLowerCase
* built vue files
* add test for auto complete
add test for auto complete
* Update SegmentSelectorEditor_spec.js
use type
* Update SegmentSelectorEditor_spec.js
update tests
* Update SegmentSelectorEditor_spec.js
update selector
* Update SegmentSelectorEditor_spec.js
update selector
* Update SegmentSelectorEditor_spec.js
update click
* Update SegmentSelectorEditor_spec.js
update tests
* update screenshot
update screenshot
* update tests
update tests
* add click before typo
add click before typo
* Revert "add click before typo"
This reverts commit d57771916e60836b7340b7f2ee0c8be4e3434a57.
* update tests
update tests
* Update SegmentSelectorEditor_spec.js
update tests
* Update SegmentSelectorEditor_spec.js
update tests selector
* Update SegmentSelectorEditor_spec.js
* update tests
update tests
* Update SegmentSelectorEditor_spec.js
update tests
* update screenshot
update screenshot
* Update SegmentSelectorEditorTest_autocomplete_capitalized.png
update screen shot
Co-authored-by: sgiehl <sgiehl@users.noreply.github.com>
Co-authored-by: peterhashair <peterhashair@users.noreply.github.com>
Diffstat (limited to 'plugins/SegmentEditor/tests/UI')
4 files changed, 35 insertions, 0 deletions
diff --git a/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js index 0c3a9e7bd0..cb183b952c 100644 --- a/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js +++ b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js @@ -198,6 +198,32 @@ describe("SegmentSelectorEditorTest", function () { expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('updated_details'); }); + it('should display autocomplete dropdown options correctly with lower case', async function() { + await page.click('.expandableSelector .select-wrapper'); + await page.waitForSelector('.expandableList'); + await page.click('.expandableSelector'); + await page.type('.expandableSelector', 'event'); + await page.waitForTimeout(100); + expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('autocomplete_lowercase'); + }); + + it('should display autocomplete dropdown options correctly with upper case', async function() { + const input = await page.$('.expandableSelector'); + await input.click({ clickCount: 3 }) + await page.type('.expandableSelector', 'EVENT'); + await page.waitForTimeout(100); + expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('autocomplete_uppercase'); + }); + + it('should display autocomplete dropdown options correctly with capitalized', async function() { + const input = await page.$('.expandableSelector'); + await input.click({ clickCount: 3 }) + await page.type('.expandableSelector', 'Event'); + await page.waitForTimeout(100); + expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('autocomplete_capitalized'); + }); + + it("should correctly show delete dialog when the delete link is clicked", async function() { await page.click('.segmentEditorPanel a.delete'); await page.waitForTimeout(500); // animation diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_capitalized.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_capitalized.png new file mode 100644 index 0000000000..8366873451 --- /dev/null +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_capitalized.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cde5c4f13c565e85374f56c3d39106df049db675e9e5598a1980723eecb52802 +size 55438 diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_lowercase.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_lowercase.png new file mode 100644 index 0000000000..ea7dcd1fb3 --- /dev/null +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_lowercase.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9aaceaa9298d53b9bf0dddcddc4366c52cb21c5ae7928c5834b2be5eb1e508e8 +size 55439 diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_uppercase.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_uppercase.png new file mode 100644 index 0000000000..562cb51e9a --- /dev/null +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_uppercase.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7f95a1e4b84fc2a161d8204fcff4c6de922e3f98968617d303f3fe082f18d59 +size 55481 |