-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix InputLiteral so that retains language after edit.
closes #1136
- Loading branch information
1 parent
3225c66
commit 92eacd1
Showing
4 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Copyright 2019 Stanford University see LICENSE for license | ||
|
||
import pupExpect from 'expect-puppeteer' | ||
import { testUserLogin } from './loginHelper' | ||
|
||
describe('RDF from literal property templates', () => { | ||
beforeAll(async () => { | ||
await testUserLogin() | ||
await page.goto('http://127.0.0.1:8888/templates') | ||
await page.waitForSelector('.react-bootstrap-table') | ||
await page.setViewport({ | ||
width: 1822, | ||
height: 961, | ||
}) | ||
}) | ||
|
||
it('enter a note value', async () => { | ||
expect.assertions(4) | ||
await pupExpect(page).toClick('a[href="/editor"]', { text: 'Note' }) | ||
await pupExpect(page).toClick('button.btn-add') | ||
await pupExpect(page).toFill('input[placeholder=\'Note\']', 'splendid') | ||
await page.keyboard.press('Enter') | ||
await pupExpect(page).toMatchElement('div.rbt-token', { text: 'splendid' }) | ||
}) | ||
|
||
it('change language', async () => { | ||
expect.assertions(7) | ||
await pupExpect(page).toClick('button#language') | ||
await pupExpect(page).toMatch('Languages') | ||
|
||
await pupExpect(page).toFill('input.rbt-input-main', 'Navajo') | ||
|
||
// Wait until autosuggest has returned something to click on | ||
await page.waitForSelector('#rbt-menu-item-0') | ||
await pupExpect(page).toClick('#rbt-menu-item-0') | ||
|
||
await pupExpect(page).toClick('button', { text: 'Submit' }) | ||
await pupExpect(page).toMatchElement('button#language') | ||
await pupExpect(page).toMatch('Language: Navajo') | ||
}) | ||
|
||
it('retains changed language after edit', async () => { | ||
expect.assertions(4) | ||
await pupExpect(page).toClick('button#editItem') | ||
await pupExpect(page).toFill('input[placeholder=\'Note\']', 'kinda splendid') | ||
await page.keyboard.press('Enter') | ||
await pupExpect(page).toMatchElement('button#language') | ||
await pupExpect(page).toMatch('Language: Navajo') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters