Skip to content

Commit

Permalink
Merge pull request #165 from MarcusT96/test/adminpage
Browse files Browse the repository at this point in the history
Adjusted the features for admin in order to not have matching with ot…
  • Loading branch information
HellgrenR authored May 16, 2024
2 parents e53539c + bb0cae8 commit 4dda6c1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cypress/specs/1postProduct.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Feature: Product Management
And I fill in my email and password with valid credentials
And I click the submit button
Then I should be back on the homepage
And then I click the "profile" button
And I click on the "adminpanel" on the sidebar
And then I click the profile page button
And I click on the adminpanel on the sidebar to navigate to the admin panel
And lastly I navigates to the "products" overview page

Scenario: Adding a new product
Expand Down
4 changes: 2 additions & 2 deletions Cypress/specs/2editProduct.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Feature: Product Modification
And I fill in my email and password with valid credentials
And I click the submit button
Then I should be back on the homepage
And then I click the "profile" button
And I click on the "adminpanel" on the sidebar
And then I click the profile page button
And I click on the adminpanel on the sidebar to navigate to the admin panel
And lastly I navigates to the "products" overview page

Scenario: Editing a product
Expand Down
4 changes: 2 additions & 2 deletions Cypress/specs/3deleteProduct.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Feature: Product Deletion
And I fill in my email and password with valid credentials
And I click the submit button
Then I should be back on the homepage
And then I click the "profile" button
And I click on the "adminpanel" on the sidebar
And then I click the profile page button
And I click on the adminpanel on the sidebar to navigate to the admin panel
And lastly I navigates to the "products" overview page

Scenario: Deleting a product
Expand Down
4 changes: 2 additions & 2 deletions Cypress/specs/checkAdminDashboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Feature: Login with admin details
And I fill in my email and password with valid credentials
And I click the submit button
Then I should be back on the homepage
And then I click the "profile" button
And I click on the "adminpanel" on the sidebar
And then I click the profile page button
And I click on the adminpanel on the sidebar to navigate to the admin panel
And I navigate to the "order" overview
And I also navigate to the "user" overview page
And lastly I navigates to the "products" overview page
4 changes: 2 additions & 2 deletions Cypress/specs/step_definitions/checkAdminDashboardMain.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Given, When, Then } from "@badeball/cypress-cucumber-preprocessor";

Then('then I click the {string} button', (a) => {
Then('then I click the profile page button', (a) => {
cy.get('.p__opensans-profil').click()
cy.url().should('include', 'https://team4.nodehill.se/profile');
cy.wait(3000);
});

Then('I click on the {string} on the sidebar', (a) => {
Then('I click on the adminpanel on the sidebar to navigate to the admin panel', (a) => {
cy.get('.sidebar > :nth-child(5)').should('be.visible').click()
cy.url().should('include', 'https://team4.nodehill.se/dashboard');
});
Expand Down

0 comments on commit 4dda6c1

Please sign in to comment.