Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isolate dashboard tests #117

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add wait when page is reloaded
wiaderwek committed Apr 2, 2023
commit 0e5a213f3aace462edd08a890bddbb8a7564a9c5
11 changes: 1 addition & 10 deletions cypress/e2e/dashboard/dashboard.feature
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@ Feature: Dashboard - To check contents on the dashboard

As a student and a teacher I want to see important information on the dashboard so that I can be updated start working

@isolated
Scenario: as a pre-condition teacher creates school news
Given I am logged in as a 'teacher' at 'brb'
When I go to news overview
@@ -16,7 +15,6 @@ Feature: Dashboard - To check contents on the dashboard
And I click on save button
Then I see news is created successfully with title 'Dashboard - this is a school news' and with description 'test school news description'

@isolated
Scenario: as a pre-condition teacher creates a team news
Given I am logged in as a 'teacher' at 'brb'
When I go to teams overview
@@ -31,7 +29,6 @@ Feature: Dashboard - To check contents on the dashboard
And I click on save button
Then I see news is created successfully with title 'Dashboard - this is a team news' and with description 'test team news description'

@isolated
Scenario: as a pre-condition teacher adds student as team member
Given I am logged in as a 'teacher' at 'brb'
When I go to teams overview
@@ -43,7 +40,6 @@ Feature: Dashboard - To check contents on the dashboard
And I click on add user button
Then I see the student named 'Herbert Kraft' on the team members table

@isolated
Scenario: student arrives on dashboard
Given I am logged in as a 'student' at 'brb'
When I arrive on the dashboard
@@ -52,7 +48,6 @@ Feature: Dashboard - To check contents on the dashboard
Then I see teams news with title 'Dashboard - this is a team news' and description 'test team news description'
Then I can see the assigned task 'Task11'

@isolated
Scenario: teacher arrives on dashboard
Given I am logged in as a 'teacher' at 'brb'
When I arrive on the dashboard
@@ -62,7 +57,6 @@ Feature: Dashboard - To check contents on the dashboard
Then I can see the assigned task 'Task11'
Then I can see the draft task 'Task1'

@isolated
Scenario: as a post-condition teacher deletes the school news
Given I am logged in as a 'teacher' at 'brb'
When I arrive on the dashboard
@@ -71,7 +65,6 @@ Feature: Dashboard - To check contents on the dashboard
And I confirm the deletion on confirmation dialog box
Then I do not see the news 'Dashboard - this is a school news'

@isolated
Scenario: as a post-condition teacher deletes the team news
Given I am logged in as a 'teacher' at 'brb'
When I arrive on the dashboard
@@ -80,14 +73,12 @@ Feature: Dashboard - To check contents on the dashboard
And I confirm the deletion on confirmation dialog box
Then I do not see the news 'Dashboard - this is a team news'

@isolated
Scenario: student does not see news anymore on dashboard
Given I am logged in as a 'student' at 'brb'
When I arrive on the dashboard
Then I do not see school news with title 'Dashboard - this is a school news'
Then I do not see teams news with title 'Dashboard - this is a team news'

@isolated

Scenario: as a post-condition teacher deletes the student as a team member
Given I am logged in as a 'teacher' at 'brb'
When I go to teams overview
10 changes: 5 additions & 5 deletions cypress/support/pages/news/pageNews.js
Original file line number Diff line number Diff line change
@@ -33,17 +33,17 @@ class News {
confirmDeletionOnDialogBox () {
cy.get(News.#deleteNewsConfirmation)
.contains('Löschen')
.click()
.click().wait(3000)
}

clickOnDeleteNewsButton () {
cy.get(News.#deleteNews).click()
cy.get(News.#deleteNews).click().wait(3000)
}

openNewsDetailPage (newsName) {
cy.get(News.#newsName)
.contains(newsName)
.click()
.click().wait(3000)
}

seeCreatedNews (newsTitle, newsDesc) {
@@ -55,7 +55,7 @@ class News {

clickOnCreateNewsSaveButton () {
cy.get(News.#newsCreateButton)
.click()
.click().wait(3000)
}

seeTimeInput () {
@@ -99,4 +99,4 @@ class News {
cy.get(News.#newsText).contains(descriptionOfNews).should('exist')
}
}
export default News
export default News