Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
module.exports = {
'@tags': ['core'],
before(browser) {
browser.drupalInstall().drupalLoginAsAdmin(() => {
browser
.drupalRelativeURL('/admin/modules')
.setValue('input[type="search"]', 'FormAPI Test')
.waitForElementVisible('input[name="modules[form_test][enable]"]', 1000)
.click('input[name="modules[form_test][enable]"]')
.submitForm('input[type="submit"]') // Submit module form.
.waitForElementVisible(
'.system-modules-confirm-form input[value="Continue"]',
2000,
)
.submitForm('input[value="Continue"]') // Confirm installation of dependencies.
.waitForElementVisible('.system-modules', 10000);
browser
.drupalRelativeURL('/admin/appearance')
.click('[title="Install Claro as default theme"]')
.waitForElementVisible(
'.system-themes-experimental-confirm-form input[value="Continue"]',
2000,
)
.submitForm('input[value="Continue"]')
.waitForElementVisible('.system-themes-list', 10000); // Confirm installation.
});
},
after(browser) {
browser.drupalUninstall();
},
'Test Claro autocomplete': browser => {
browser
.drupalCreateUser({
name: 'user',
password: '123',
permissions: ['access autocomplete test'],
})
.drupalLogin({ name: 'user', password: '123' })
.drupalRelativeURL('/form-test/autocomplete')
.waitForElementVisible('body', 1000);
// eslint-disable-next-line no-unused-expressions
browser.expect.element(
'.js-form-item-autocomplete-3 [data-drupal-selector="autocomplete-message"]',
).to.not.visible;
browser
.setValue('[name="autocomplete_3"]', '123')
.waitForElementVisible(
'.js-form-item-autocomplete-3 [data-drupal-selector="autocomplete-message"]',
)
.drupalLogAndEnd({ onlyOnError: false });
},
};