Skip to content

Commit 2cd7954

Browse files
committed
Fixing reloading of page before checking current status.
1 parent 9a7daee commit 2cd7954

File tree

8 files changed

+72
-40
lines changed

8 files changed

+72
-40
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,32 @@ describe('Enable Backend Config plugin', () => {
1313

1414
it('should enabled Time registration plugin', () => {
1515
const pluginName = 'Microting Time Planning Plugin';
16-
16+
1717
// Open action menu for the plugin
1818
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
1919
cy.wait(500);
20-
20+
2121
// Click the status button inside the menu to enable the plugin
2222
cy.get('#plugin-status-button0').should('be.visible').click();
2323
cy.wait(500);
24-
24+
2525
// Confirm activation in the modal if present
2626
cy.get('body').then(($body) => {
2727
if ($body.find('#pluginOKBtn').length > 0) {
2828
cy.get('#pluginOKBtn').click();
2929
cy.wait(100000); // Wait for plugin activation
3030
}
3131
});
32-
32+
33+
cy.visit('http://localhost:4200');
34+
loginPage.login();
35+
pluginPage.Navbar.goToPluginsPage();
36+
3337
// Verify the plugin is enabled by checking the status
3438
// Re-open the action menu to check the status
3539
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
3640
cy.wait(500);
37-
41+
3842
cy.get('#plugin-status-button0')
3943
.find('mat-icon')
4044
.should('contain.text', 'toggle_on'); // plugin is enabled

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,32 @@ describe('Enable Backend Config plugin', () => {
1010

1111
it('should enabled Time registration plugin', () => {
1212
const pluginName = 'Microting Time Planning Plugin';
13-
13+
1414
// Open action menu for the plugin
1515
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
1616
cy.wait(500);
17-
17+
1818
// Click the status button inside the menu to enable the plugin
1919
cy.get('#plugin-status-button0').should('be.visible').click();
2020
cy.wait(500);
21-
21+
2222
// Confirm activation in the modal if present
2323
cy.get('body').then(($body) => {
2424
if ($body.find('#pluginOKBtn').length > 0) {
2525
cy.get('#pluginOKBtn').click();
2626
cy.wait(100000); // Wait for plugin activation
2727
}
2828
});
29-
29+
30+
cy.visit('http://localhost:4200');
31+
loginPage.login();
32+
pluginPage.Navbar.goToPluginsPage();
33+
3034
// Verify the plugin is enabled by checking the status
3135
// Re-open the action menu to check the status
3236
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
3337
cy.wait(500);
34-
38+
3539
cy.get('#plugin-status-button0')
3640
.find('mat-icon')
3741
.should('contain.text', 'toggle_on'); // plugin is enabled

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,32 @@ describe('Enable Backend Config plugin', () => {
1010

1111
it('should enabled Time registration plugin', () => {
1212
const pluginName = 'Microting Time Planning Plugin';
13-
13+
1414
// Open action menu for the plugin
1515
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
1616
cy.wait(500);
17-
17+
1818
// Click the status button inside the menu to enable the plugin
1919
cy.get('#plugin-status-button0').should('be.visible').click();
2020
cy.wait(500);
21-
21+
2222
// Confirm activation in the modal if present
2323
cy.get('body').then(($body) => {
2424
if ($body.find('#pluginOKBtn').length > 0) {
2525
cy.get('#pluginOKBtn').click();
2626
cy.wait(100000); // Wait for plugin activation
2727
}
2828
});
29-
29+
30+
cy.visit('http://localhost:4200');
31+
loginPage.login();
32+
pluginPage.Navbar.goToPluginsPage();
33+
3034
// Verify the plugin is enabled by checking the status
3135
// Re-open the action menu to check the status
3236
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
3337
cy.wait(500);
34-
38+
3539
cy.get('#plugin-status-button0')
3640
.find('mat-icon')
3741
.should('contain.text', 'toggle_on'); // plugin is enabled

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,32 @@ describe('Enable Backend Config plugin', () => {
1010

1111
it('should enabled Time registration plugin', () => {
1212
const pluginName = 'Microting Time Planning Plugin';
13-
13+
1414
// Open action menu for the plugin
1515
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
1616
cy.wait(500);
17-
17+
1818
// Click the status button inside the menu to enable the plugin
1919
cy.get('#plugin-status-button0').should('be.visible').click();
2020
cy.wait(500);
21-
21+
2222
// Confirm activation in the modal if present
2323
cy.get('body').then(($body) => {
2424
if ($body.find('#pluginOKBtn').length > 0) {
2525
cy.get('#pluginOKBtn').click();
2626
cy.wait(100000); // Wait for plugin activation
2727
}
2828
});
29-
29+
30+
cy.visit('http://localhost:4200');
31+
loginPage.login();
32+
pluginPage.Navbar.goToPluginsPage();
33+
3034
// Verify the plugin is enabled by checking the status
3135
// Re-open the action menu to check the status
3236
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
3337
cy.wait(500);
34-
38+
3539
cy.get('#plugin-status-button0')
3640
.find('mat-icon')
3741
.should('contain.text', 'toggle_on'); // plugin is enabled

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,32 @@ describe('Enable Backend Config plugin', () => {
1010

1111
it('should enabled Time registration plugin', () => {
1212
const pluginName = 'Microting Time Planning Plugin';
13-
13+
1414
// Open action menu for the plugin
1515
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
1616
cy.wait(500);
17-
17+
1818
// Click the status button inside the menu to enable the plugin
1919
cy.get('#plugin-status-button0').should('be.visible').click();
2020
cy.wait(500);
21-
21+
2222
// Confirm activation in the modal if present
2323
cy.get('body').then(($body) => {
2424
if ($body.find('#pluginOKBtn').length > 0) {
2525
cy.get('#pluginOKBtn').click();
2626
cy.wait(100000); // Wait for plugin activation
2727
}
2828
});
29-
29+
30+
cy.visit('http://localhost:4200');
31+
loginPage.login();
32+
pluginPage.Navbar.goToPluginsPage();
33+
3034
// Verify the plugin is enabled by checking the status
3135
// Re-open the action menu to check the status
3236
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
3337
cy.wait(500);
34-
38+
3539
cy.get('#plugin-status-button0')
3640
.find('mat-icon')
3741
.should('contain.text', 'toggle_on'); // plugin is enabled

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,32 @@ describe('Enable Backend Config plugin', () => {
1010

1111
it('should enabled Time registration plugin', () => {
1212
const pluginName = 'Microting Time Planning Plugin';
13-
13+
1414
// Open action menu for the plugin
1515
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
1616
cy.wait(500);
17-
17+
1818
// Click the status button inside the menu to enable the plugin
1919
cy.get('#plugin-status-button0').should('be.visible').click();
2020
cy.wait(500);
21-
21+
2222
// Confirm activation in the modal if present
2323
cy.get('body').then(($body) => {
2424
if ($body.find('#pluginOKBtn').length > 0) {
2525
cy.get('#pluginOKBtn').click();
2626
cy.wait(100000); // Wait for plugin activation
2727
}
2828
});
29-
29+
30+
cy.visit('http://localhost:4200');
31+
loginPage.login();
32+
pluginPage.Navbar.goToPluginsPage();
33+
3034
// Verify the plugin is enabled by checking the status
3135
// Re-open the action menu to check the status
3236
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
3337
cy.wait(500);
34-
38+
3539
cy.get('#plugin-status-button0')
3640
.find('mat-icon')
3741
.should('contain.text', 'toggle_on'); // plugin is enabled

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,32 @@ describe('Enable Backend Config plugin', () => {
1010

1111
it('should enabled Time registration plugin', () => {
1212
const pluginName = 'Microting Time Planning Plugin';
13-
13+
1414
// Open action menu for the plugin
1515
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
1616
cy.wait(500);
17-
17+
1818
// Click the status button inside the menu to enable the plugin
1919
cy.get('#plugin-status-button0').should('be.visible').click();
2020
cy.wait(500);
21-
21+
2222
// Confirm activation in the modal if present
2323
cy.get('body').then(($body) => {
2424
if ($body.find('#pluginOKBtn').length > 0) {
2525
cy.get('#pluginOKBtn').click();
2626
cy.wait(100000); // Wait for plugin activation
2727
}
2828
});
29-
29+
30+
cy.visit('http://localhost:4200');
31+
loginPage.login();
32+
pluginPage.Navbar.goToPluginsPage();
33+
3034
// Verify the plugin is enabled by checking the status
3135
// Re-open the action menu to check the status
3236
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
3337
cy.wait(500);
34-
38+
3539
cy.get('#plugin-status-button0')
3640
.find('mat-icon')
3741
.should('contain.text', 'toggle_on'); // plugin is enabled

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,32 @@ describe('Enable Backend Config plugin', () => {
1010

1111
it('should enabled Time registration plugin', () => {
1212
const pluginName = 'Microting Time Planning Plugin';
13-
13+
1414
// Open action menu for the plugin
1515
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
1616
cy.wait(500);
17-
17+
1818
// Click the status button inside the menu to enable the plugin
1919
cy.get('#plugin-status-button0').should('be.visible').click();
2020
cy.wait(500);
21-
21+
2222
// Confirm activation in the modal if present
2323
cy.get('body').then(($body) => {
2424
if ($body.find('#pluginOKBtn').length > 0) {
2525
cy.get('#pluginOKBtn').click();
2626
cy.wait(100000); // Wait for plugin activation
2727
}
2828
});
29-
29+
30+
cy.visit('http://localhost:4200');
31+
loginPage.login();
32+
pluginPage.Navbar.goToPluginsPage();
33+
3034
// Verify the plugin is enabled by checking the status
3135
// Re-open the action menu to check the status
3236
cy.contains('.mat-mdc-row', pluginName).first().find('#actionMenu').click();
3337
cy.wait(500);
34-
38+
3539
cy.get('#plugin-status-button0')
3640
.find('mat-icon')
3741
.should('contain.text', 'toggle_on'); // plugin is enabled

0 commit comments

Comments
 (0)