Skip to content

Commit 7a273d5

Browse files
committed
Fixing settings test.
1 parent d017f3e commit 7a273d5

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

eform-client/e2e/Tests/customer-settings/application-settings.plugins-page.spec.ts

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,31 @@ import pluginPage from '../../Page objects/Plugin.page';
55
import { expect } from 'chai';
66

77
describe('Application settings page - site header section', function () {
8-
before(function () {
9-
loginPage.open('/auth');
10-
loginPage.login();
8+
before(async () => {
9+
await loginPage.open('/auth');
1110
});
12-
it('should go to plugin settings page', function () {
13-
myEformsPage.Navbar.goToPluginsPage();
14-
$('#plugin-name').waitForDisplayed({ timeout: 50000 });
11+
it('should go to plugin settings page', async () => {
12+
await loginPage.login();
13+
await myEformsPage.Navbar.goToPluginsPage();
1514

16-
const plugin = pluginPage.getFirstPluginRowObj();
17-
expect(plugin.id, 'id is not equal').equal(1);
18-
expect(plugin.name, 'name is not equal').equal(
19-
'Microting Customers Plugin'
20-
);
21-
expect(plugin.version, 'version is not equal').equal('1.0.0.0');
22-
expect(plugin.status, 'status is not equal').eq(false);
15+
const backendPlugin = await pluginPage.getFirstPluginRowObj();
16+
expect(backendPlugin.id).equal(1);
17+
expect(backendPlugin.name).equal('Microting Customers Plugin');
18+
expect(backendPlugin.version).equal('1.0.0.0');
19+
expect(backendPlugin.status, 'status is not equal').eq('toggle_off');
2320
});
24-
it('should activate the plugin', function () {
25-
let plugin = pluginPage.getFirstPluginRowObj();
26-
plugin.enableOrDisablePlugin();
2721

28-
plugin = pluginPage.getFirstPluginRowObj();
29-
expect(plugin.id, 'id is not equal').equal(1);
30-
expect(plugin.name, 'name is not equal').equal(
31-
'Microting Customers Plugin'
32-
);
33-
expect(plugin.version, 'version is not equal').equal('1.0.0.0');
34-
expect(plugin.status, 'status is not equal').eq(true);
22+
it('should activate the plugin', async () => {
23+
let backendPlugin = await pluginPage.getFirstPluginRowObj();
24+
await backendPlugin.enableOrDisablePlugin();
25+
26+
backendPlugin = await pluginPage.getFirstPluginRowObj();
27+
expect(backendPlugin.id).equal(1);
28+
expect(backendPlugin.name).equal('Microting Customers Plugin');
29+
expect(backendPlugin.version).equal('1.0.0.0');
30+
expect(
31+
backendPlugin.status,
32+
'customers plugin is not enabled'
33+
).eq('toggle_on');
3534
});
3635
});

0 commit comments

Comments
 (0)