Skip to content

Commit b6a2d70

Browse files
committed
Fixing plugin activation.
1 parent 818ccc7 commit b6a2d70

File tree

8 files changed

+201
-16
lines changed

8 files changed

+201
-16
lines changed

eform-client/cypress/e2e/plugins/time-planning-pn/a/time-planning-enabled.spec.cy.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,31 @@ describe('Enable Backend Config plugin', () => {
1010
// .should('not.eq', 0) // we have plugins list
1111
// .should('eq', 1); // we have only 1 plugin: time planning
1212
});
13-
it('should enabled Time registration plugin', () => {
13+
14+
it('should enabled Time registration plugin', () => {
1415
const pluginName = 'Microting Time Planning Plugin';
1516

1617
// Open action menu for the plugin
1718
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
1819
cy.wait(500);
1920

20-
// Verify the plugin is enabled by checking the status button in the action menu
21+
// Click the status button inside the menu to enable the plugin
22+
cy.get('#plugin-status-button0').should('be.visible').click();
23+
cy.wait(500);
24+
25+
// Confirm activation in the modal if present
26+
cy.get('body').then(($body) => {
27+
if ($body.find('#pluginOKBtn').length > 0) {
28+
cy.get('#pluginOKBtn').click();
29+
cy.wait(10000); // Wait for plugin activation
30+
}
31+
});
32+
33+
// Verify the plugin is enabled by checking the status
34+
// Re-open the action menu to check the status
35+
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
36+
cy.wait(500);
37+
2138
cy.get('#plugin-status-button0')
2239
.find('mat-icon')
2340
.should('contain.text', 'toggle_on'); // plugin is enabled

eform-client/cypress/e2e/plugins/time-planning-pn/b/activate-plugin.spec.cy.ts

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,32 @@ describe('Enable Backend Config plugin', () => {
88
pluginPage.Navbar.goToPluginsPage();
99
});
1010

11-
it('should activate the plugin', () => {
11+
it('should enabled Time registration plugin', () => {
1212
const pluginName = 'Microting Time Planning Plugin';
13-
pluginPage.enablePluginByName(pluginName);
13+
14+
// Open action menu for the plugin
15+
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
16+
cy.wait(500);
17+
18+
// Click the status button inside the menu to enable the plugin
19+
cy.get('#plugin-status-button0').should('be.visible').click();
20+
cy.wait(500);
21+
22+
// Confirm activation in the modal if present
23+
cy.get('body').then(($body) => {
24+
if ($body.find('#pluginOKBtn').length > 0) {
25+
cy.get('#pluginOKBtn').click();
26+
cy.wait(10000); // Wait for plugin activation
27+
}
28+
});
29+
30+
// Verify the plugin is enabled by checking the status
31+
// Re-open the action menu to check the status
32+
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
33+
cy.wait(500);
34+
35+
cy.get('#plugin-status-button0')
36+
.find('mat-icon')
37+
.should('contain.text', 'toggle_on'); // plugin is enabled
1438
});
1539
});

eform-client/cypress/e2e/plugins/time-planning-pn/c/activate-plugin.spec.cy.ts

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,32 @@ describe('Enable Backend Config plugin', () => {
88
pluginPage.Navbar.goToPluginsPage();
99
});
1010

11-
it('should activate the plugin', () => {
11+
it('should enabled Time registration plugin', () => {
1212
const pluginName = 'Microting Time Planning Plugin';
13-
pluginPage.enablePluginByName(pluginName);
13+
14+
// Open action menu for the plugin
15+
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
16+
cy.wait(500);
17+
18+
// Click the status button inside the menu to enable the plugin
19+
cy.get('#plugin-status-button0').should('be.visible').click();
20+
cy.wait(500);
21+
22+
// Confirm activation in the modal if present
23+
cy.get('body').then(($body) => {
24+
if ($body.find('#pluginOKBtn').length > 0) {
25+
cy.get('#pluginOKBtn').click();
26+
cy.wait(10000); // Wait for plugin activation
27+
}
28+
});
29+
30+
// Verify the plugin is enabled by checking the status
31+
// Re-open the action menu to check the status
32+
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
33+
cy.wait(500);
34+
35+
cy.get('#plugin-status-button0')
36+
.find('mat-icon')
37+
.should('contain.text', 'toggle_on'); // plugin is enabled
1438
});
1539
});

eform-client/cypress/e2e/plugins/time-planning-pn/d/activate-plugin.spec.cy.ts

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,32 @@ describe('Enable Backend Config plugin', () => {
88
pluginPage.Navbar.goToPluginsPage();
99
});
1010

11-
it('should activate the plugin', () => {
11+
it('should enabled Time registration plugin', () => {
1212
const pluginName = 'Microting Time Planning Plugin';
13-
pluginPage.enablePluginByName(pluginName);
13+
14+
// Open action menu for the plugin
15+
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
16+
cy.wait(500);
17+
18+
// Click the status button inside the menu to enable the plugin
19+
cy.get('#plugin-status-button0').should('be.visible').click();
20+
cy.wait(500);
21+
22+
// Confirm activation in the modal if present
23+
cy.get('body').then(($body) => {
24+
if ($body.find('#pluginOKBtn').length > 0) {
25+
cy.get('#pluginOKBtn').click();
26+
cy.wait(10000); // Wait for plugin activation
27+
}
28+
});
29+
30+
// Verify the plugin is enabled by checking the status
31+
// Re-open the action menu to check the status
32+
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
33+
cy.wait(500);
34+
35+
cy.get('#plugin-status-button0')
36+
.find('mat-icon')
37+
.should('contain.text', 'toggle_on'); // plugin is enabled
1438
});
1539
});

eform-client/cypress/e2e/plugins/time-planning-pn/e/activate-plugin.spec.cy.ts

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,32 @@ describe('Enable Backend Config plugin', () => {
88
pluginPage.Navbar.goToPluginsPage();
99
});
1010

11-
it('should activate the plugin', () => {
11+
it('should enabled Time registration plugin', () => {
1212
const pluginName = 'Microting Time Planning Plugin';
13-
pluginPage.enablePluginByName(pluginName);
13+
14+
// Open action menu for the plugin
15+
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
16+
cy.wait(500);
17+
18+
// Click the status button inside the menu to enable the plugin
19+
cy.get('#plugin-status-button0').should('be.visible').click();
20+
cy.wait(500);
21+
22+
// Confirm activation in the modal if present
23+
cy.get('body').then(($body) => {
24+
if ($body.find('#pluginOKBtn').length > 0) {
25+
cy.get('#pluginOKBtn').click();
26+
cy.wait(10000); // Wait for plugin activation
27+
}
28+
});
29+
30+
// Verify the plugin is enabled by checking the status
31+
// Re-open the action menu to check the status
32+
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
33+
cy.wait(500);
34+
35+
cy.get('#plugin-status-button0')
36+
.find('mat-icon')
37+
.should('contain.text', 'toggle_on'); // plugin is enabled
1438
});
1539
});

eform-client/cypress/e2e/plugins/time-planning-pn/f/activate-plugin.spec.cy.ts

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,32 @@ describe('Enable Backend Config plugin', () => {
88
pluginPage.Navbar.goToPluginsPage();
99
});
1010

11-
it('should activate the plugin', () => {
11+
it('should enabled Time registration plugin', () => {
1212
const pluginName = 'Microting Time Planning Plugin';
13-
pluginPage.enablePluginByName(pluginName);
13+
14+
// Open action menu for the plugin
15+
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
16+
cy.wait(500);
17+
18+
// Click the status button inside the menu to enable the plugin
19+
cy.get('#plugin-status-button0').should('be.visible').click();
20+
cy.wait(500);
21+
22+
// Confirm activation in the modal if present
23+
cy.get('body').then(($body) => {
24+
if ($body.find('#pluginOKBtn').length > 0) {
25+
cy.get('#pluginOKBtn').click();
26+
cy.wait(10000); // Wait for plugin activation
27+
}
28+
});
29+
30+
// Verify the plugin is enabled by checking the status
31+
// Re-open the action menu to check the status
32+
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
33+
cy.wait(500);
34+
35+
cy.get('#plugin-status-button0')
36+
.find('mat-icon')
37+
.should('contain.text', 'toggle_on'); // plugin is enabled
1438
});
1539
});

eform-client/cypress/e2e/plugins/time-planning-pn/g/activate-plugin.spec.cy.ts

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,32 @@ describe('Enable Backend Config plugin', () => {
88
pluginPage.Navbar.goToPluginsPage();
99
});
1010

11-
it('should activate the plugin', () => {
11+
it('should enabled Time registration plugin', () => {
1212
const pluginName = 'Microting Time Planning Plugin';
13-
pluginPage.enablePluginByName(pluginName);
13+
14+
// Open action menu for the plugin
15+
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
16+
cy.wait(500);
17+
18+
// Click the status button inside the menu to enable the plugin
19+
cy.get('#plugin-status-button0').should('be.visible').click();
20+
cy.wait(500);
21+
22+
// Confirm activation in the modal if present
23+
cy.get('body').then(($body) => {
24+
if ($body.find('#pluginOKBtn').length > 0) {
25+
cy.get('#pluginOKBtn').click();
26+
cy.wait(10000); // Wait for plugin activation
27+
}
28+
});
29+
30+
// Verify the plugin is enabled by checking the status
31+
// Re-open the action menu to check the status
32+
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
33+
cy.wait(500);
34+
35+
cy.get('#plugin-status-button0')
36+
.find('mat-icon')
37+
.should('contain.text', 'toggle_on'); // plugin is enabled
1438
});
1539
});

eform-client/cypress/e2e/plugins/time-planning-pn/h/activate-plugin.spec.cy.ts

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,32 @@ describe('Enable Backend Config plugin', () => {
88
pluginPage.Navbar.goToPluginsPage();
99
});
1010

11-
it('should activate the plugin', () => {
11+
it('should enabled Time registration plugin', () => {
1212
const pluginName = 'Microting Time Planning Plugin';
13-
pluginPage.enablePluginByName(pluginName);
13+
14+
// Open action menu for the plugin
15+
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
16+
cy.wait(500);
17+
18+
// Click the status button inside the menu to enable the plugin
19+
cy.get('#plugin-status-button0').should('be.visible').click();
20+
cy.wait(500);
21+
22+
// Confirm activation in the modal if present
23+
cy.get('body').then(($body) => {
24+
if ($body.find('#pluginOKBtn').length > 0) {
25+
cy.get('#pluginOKBtn').click();
26+
cy.wait(10000); // Wait for plugin activation
27+
}
28+
});
29+
30+
// Verify the plugin is enabled by checking the status
31+
// Re-open the action menu to check the status
32+
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
33+
cy.wait(500);
34+
35+
cy.get('#plugin-status-button0')
36+
.find('mat-icon')
37+
.should('contain.text', 'toggle_on'); // plugin is enabled
1438
});
1539
});

0 commit comments

Comments
 (0)