Skip to content

Commit

Permalink
BC-6251 rename default to dbc in all files
Browse files Browse the repository at this point in the history
  • Loading branch information
UzaeirKhan committed Jan 22, 2024
1 parent 678bd96 commit b31864f
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/automatic-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
service-account-token: ${{ secrets.CYPRESS_ONEPWD_SERVICE_ACCOUNT_TOKEN }}
with:
cypress_brb: https://main.brb.dbildungscloud.dev
cypress_default: https://main.dbc.dbildungscloud.dev
cypress_dbc: https://main.dbc.dbildungscloud.dev
cypress_nbc: https://main.nbc.dbildungscloud.dev
tag: tag:stable:ci
environment: dev
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
cypress_nbc:
description: "nbc url from the workflow"
type: string
cypress_default:
description: "default url from the workflow"
cypress_dbc:
description: "dbc url from the workflow"
type: string
tag:
description: "tag for running cypress tests"
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
${workspace_path}/e2e-system-tests/scripts/aggregate-json-files.sh \
"${workflow}" \
"${{ inputs.cypress_brb }}" \
"${{ inputs.cypress_default }}" \
"${{ inputs.cypress_dbc }}" \
"${{ inputs.cypress_nbc }}" \
"${workspace_path}" \
"${{ inputs.environment }}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
default: "https://main.nbc.dbildungscloud.dev"
required: true
instance3:
description: "Please enter a valid DEFAULT instance URL to run the tests on"
description: "Please enter a valid DBC instance URL to run the tests on"
default: "https://main.dbc.dbildungscloud.dev"
required: true

Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
service-account-token: ${{ secrets.CYPRESS_ONEPWD_SERVICE_ACCOUNT_TOKEN }}
with:
cypress_brb: ${{ inputs.instance1 }}
cypress_default: ${{ inputs.instance3 }}
cypress_dbc: ${{ inputs.instance3 }}
cypress_nbc: ${{ inputs.instance2 }}
tag: tag:stable:ci
environment: ${{ needs.e2e-system-tests.outputs.environment }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/remote-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
outputs:
cypress_brb: ${{ steps.set_target.outputs.CYPRESS_BRB }}
cypress_nbc: ${{ steps.set_target.outputs.CYPRESS_NBC }}
cypress_default: ${{ steps.set_target.outputs.CYPRESS_DEFAULT }}
cypress_dbc: ${{ steps.set_target.outputs.CYPRESS_DBC }}
environment: ${{ steps.set_target.outputs.environment }}

steps:
Expand Down Expand Up @@ -67,10 +67,10 @@ jobs:
echo "CYPRESS_NBC=https://${cleaned_branch_name}.nbc.dbildungscloud.dev" >> $GITHUB_OUTPUT
echo "Set CYPRESS_NBC=https://${cleaned_branch_name}.nbc.dbildungscloud.dev"
echo "CYPRESS_DEFAULT=https://${cleaned_branch_name}.dbc.dbildungscloud.dev" >> $GITHUB_OUTPUT
echo "Set CYPRESS_DEFAULT=https://${cleaned_branch_name}.dbc.dbildungscloud.dev"
echo "CYPRESS_DBC=https://${cleaned_branch_name}.dbc.dbildungscloud.dev" >> $GITHUB_OUTPUT
echo "Set CYPRESS_DBC=https://${cleaned_branch_name}.dbc.dbildungscloud.dev"
if [[ ! $CYPRESS_BRB =~ (staging|schulportal) && ! $CYPRESS_DEFAULT =~ (staging|schulportal) && ! $CYPRESS_NBC =~ (staging|schulportal) ]]; then
if [[ ! $CYPRESS_BRB =~ (staging|schulportal) && ! $CYPRESS_DBC =~ (staging|schulportal) && ! $CYPRESS_NBC =~ (staging|schulportal) ]]; then
echo "environment=dev" >> $GITHUB_OUTPUT
else
echo "environment=ref" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
check_availability ${{ steps.set_target.outputs.cypress_brb }}/version
check_availability ${{ steps.set_target.outputs.cypress_nbc }}/version
check_availability ${{ steps.set_target.outputs.cypress_default }}/version
check_availability ${{ steps.set_target.outputs.cypress_dbc }}/version
configuring-loading-secrets-running-tests:
needs: e2e-system-tests
Expand All @@ -111,6 +111,6 @@ jobs:
with:
cypress_brb: ${{ needs.e2e-system-tests.outputs.cypress_brb }}
cypress_nbc: ${{ needs.e2e-system-tests.outputs.cypress_nbc }}
cypress_default: ${{ needs.e2e-system-tests.outputs.cypress_default }}
cypress_dbc: ${{ needs.e2e-system-tests.outputs.cypress_dbc }}
tag: tag:stable:pr:ci
environment: ${{ needs.e2e-system-tests.outputs.environment }}
2 changes: 1 addition & 1 deletion .github/workflows/scheduled-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
service-account-token: ${{ secrets.CYPRESS_ONEPWD_SERVICE_ACCOUNT_TOKEN }}
with:
cypress_brb: https://main.brb.dbildungscloud.dev
cypress_default: https://main.dbc.dbildungscloud.dev
cypress_dbc: https://main.dbc.dbildungscloud.dev
cypress_nbc: https://main.nbc.dbildungscloud.dev
tag: tag:stable:ci
environment: dev
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/account/goToSettings.feature
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
@release
Feature: Account - To go to account settings page on default
Feature: Account - To go to account settings page on dbc

As a user I want to navigation to my account's settings page so that I can see my account details (e. g. email).

@stable_test
Scenario: I see my e-mail is editable as an internal student user
Given I am logged in as a 'student1_dbc' at 'default'
Given I am logged in as a 'student1_dbc' at 'dbc'
When I go to my account settings
Then I see my email is editable

@unstable_test
Scenario: I see my e-mail is not editable as an external student user
Given I am logged in as a 'student_extern_dbc' at 'default'
Given I am logged in as a 'student_extern_dbc' at 'dbc'
When I go to my account settings
Then I see my email is not editable
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Feature: Group - To show groups and classes in one table with respective functio
Then I see the new class administration page

Scenario: As a teacher i can not see the new class page, when the feature flag is off
Given I am logged in as a 'teacher1_dbc' at 'default'
Given I am logged in as a 'teacher1_dbc' at 'dbc'
When I go to administration page
Then I cannot see the new class administration page
When I navigate to class administration page
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/course/createEditAndDeleteCourse.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: Course - To add and delete a course by the teacher


Scenario: as a pre-condition teacher deletes undeleted tests
Given I am logged in as a 'teacher1_dbc' at 'default'
Given I am logged in as a 'teacher1_dbc' at 'dbc'
When I go to rooms overview
When I delete all courses named 'Cypress Test Creation and Deletion'
Then I do not see the course 'Cypress Test Creation and Deletion' on the room overview page
Expand All @@ -14,7 +14,7 @@ Feature: Course - To add and delete a course by the teacher


Scenario: Create, edit and delete a course
Given I am logged in as a 'teacher1_dbc' at 'default'
Given I am logged in as a 'teacher1_dbc' at 'dbc'
When I go to rooms overview
Then I see room search box on the room overview page
When I click on FAB to create a new room
Expand Down Expand Up @@ -86,7 +86,7 @@ Feature: Course - To add and delete a course by the teacher
When I edit the title of the room to 'Cypress Testkurs Edit'
When I edit the room description to 'cy edit this is test description'

# Add groups to course
# Add groups to course
When I click on the selection box to add a new group with ' Cypress-Test-Group1 | moin.schule '
When I click on the selection box to add a new group with ' Cypress-Test-Group2 | moin.schule '
When I click on save changes after editing the course details
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Feature: Team - Teacher adds edits and deletes team event with video conference

@stable_test
Scenario: as a pre condition Admin enables the video conference option for a team event
Given I am logged in as a 'admin1_dbc' at 'default'
Given I am logged in as a 'admin1_dbc' at 'dbc'
When I go to administration page
When I click on manage school card
Then I enable the video conference on the old school setting page
Then I click on admin setting save button

@stable_test
Scenario: as a pre condition Teacher enables the video conference option in team edit
Given I am logged in as a 'teacher1_dbc' at 'default'
Given I am logged in as a 'teacher1_dbc' at 'dbc'
When I go to teams overview
When I go to a team 'Musik'
When I click on team settings
Expand All @@ -24,7 +24,7 @@ Feature: Team - Teacher adds edits and deletes team event with video conference

@stable_test
Scenario: as a pre-condition teacher adds student as an internal team member
Given I am logged in as a 'teacher1_dbc' at 'default'
Given I am logged in as a 'teacher1_dbc' at 'dbc'
When I go to teams overview
When I go to a team 'Musik'
When I click on three dot menu on the team title
Expand All @@ -36,7 +36,7 @@ Feature: Team - Teacher adds edits and deletes team event with video conference

@stable_test
Scenario: Teacher adds event with video conference
Given I am logged in as a 'teacher1_dbc' at 'default'
Given I am logged in as a 'teacher1_dbc' at 'dbc'
When I go to teams overview
When I go to a team 'Musik'
When I go to calendar tab
Expand All @@ -59,7 +59,7 @@ Feature: Team - Teacher adds edits and deletes team event with video conference

@stable_test
Scenario: Student can see and participate in video conference
Given I am logged in as a 'student1_dbc' at 'default'
Given I am logged in as a 'student1_dbc' at 'dbc'
When I go to teams overview
When I go to a team 'Musik'
When I go to calendar tab
Expand All @@ -68,7 +68,7 @@ Feature: Team - Teacher adds edits and deletes team event with video conference

@stable_test
Scenario: as a post-condition teacher deletes the student as a team member
Given I am logged in as a 'teacher1_dbc' at 'default'
Given I am logged in as a 'teacher1_dbc' at 'dbc'
When I go to teams overview
When I go to a team 'Musik'
When I click on three dot menu on the team title
Expand All @@ -78,7 +78,7 @@ Feature: Team - Teacher adds edits and deletes team event with video conference

@stable_test
Scenario: as a post condition Teacher edits and deletes the event
Given I am logged in as a 'teacher1_dbc' at 'default'
Given I am logged in as a 'teacher1_dbc' at 'dbc'
When I go to teams overview
When I go to a team 'Musik'
When I go to calendar tab
Expand All @@ -97,18 +97,18 @@ Feature: Team - Teacher adds edits and deletes team event with video conference

@stable_test
Scenario: as a post condition Admin disable the video conference for the team
Given I am logged in as a 'admin1_dbc' at 'default'
Given I am logged in as a 'admin1_dbc' at 'dbc'
When I go to administration page
When I click on manage school card
Then I disable the video conference on the old school setting page
Then I click on admin setting save button

@stable_test
Scenario: as a post condition Teacher sees deactivated video conference check box
Given I am logged in as a 'teacher1_dbc' at 'default'
When I go to teams overview
When I go to a team 'Musik'
When I click on team settings
When I click on edit option
Then I see team edit page
Then I see video conference option is disabled
Given I am logged in as a 'teacher1_dbc' at 'dbc'
When I go to teams overview
When I go to a team 'Musik'
When I click on team settings
When I click on edit option
Then I see team edit page
Then I see video conference option is disabled
18 changes: 9 additions & 9 deletions cypress/e2e/topics/accessH5PEditor.feature
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
@unstable_test
Feature: To access the H5P editor as a teacher.

As a teacher, I want to be able to access the H5P Editor for a topic in my course to create learning content
As a teacher, I want to be able to access the H5P Editor for a topic in my course to create learning content


Scenario: Access H5P Editor
Given I am logged in as a 'teacher1_dbc' at 'default'
When I go to rooms overview
When I go to room 'Course with subject and tasks'
When I click on topic 'Statistic' on course page
When I click on the button Edit on topic page
When I click on the Add Content H5P button
Then I can click on the Create H5P button
Scenario: Access H5P Editor
Given I am logged in as a 'teacher1_dbc' at 'dbc'
When I go to rooms overview
When I go to room 'Course with subject and tasks'
When I click on topic 'Statistic' on course page
When I click on the button Edit on topic page
When I click on the Add Content H5P button
Then I can click on the Create H5P button
6 changes: 3 additions & 3 deletions cypress/support/custom_commands/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ const emailInputFieldElement = '[data-testid="username-email"]'
const passwordInputFieldElement = '[data-testid="password-email"]'
const submitButton = '[data-testid="submit-login-email"]'
const nbcLoginWithEmailOptionButton = '[data-testid="submit-cloud-site"]'
const defaultLoginViaExternalBroker =
const dbcLoginViaExternalBroker =
'[data-testid="submit-oauth-login"], [data-provider="oauth"]'
const initials = '[data-testid="initials"]'
const languageSelection = '[id="selected-language"]'
const languageDe = '[data-language="de"]'
const externalUsernameInputFieldElement = '[id="Username"]'
const externalPasswordInputFieldElement = '[id="Password"]'
const oauth_url =
'https://idm-default-main.cd.dbildungscloud.dev/realms/default/protocol/openid-connect/auth?client_id=dbildungscloud-server&redirect_uri=https://default-main.cd.dbildungscloud.dev/api/v3/sso/oauth/62c7f233f35a554ba3ed42f1&response_type=code&scope=openid%20profile%20email&kc_idp_hint=oidcmock'
'https://idm-dbc-main.cd.dbildungscloud.dev/realms/dbc/protocol/openid-connect/auth?client_id=dbildungscloud-server&redirect_uri=https://dbc-main.cd.dbildungscloud.dev/api/v3/sso/oauth/62c7f233f35a554ba3ed42f1&response_type=code&scope=openid%20profile%20email&kc_idp_hint=oidcmock'
const titleOnDashboardPage = '[id="page-title"]'

Cypress.Commands.add('login', (username, environment) => {
Expand All @@ -22,7 +22,7 @@ Cypress.Commands.add('login', (username, environment) => {
if (environmentUpperCased === 'NBC') {
cy.visit('/login')
cy.get(nbcLoginWithEmailOptionButton).click()
} else if (environmentUpperCased === 'DEFAULT') {
} else if (environmentUpperCased === 'DBC') {
cy.visit('/login')
} else {
cy.visit('/login')
Expand Down
22 changes: 11 additions & 11 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import './commands'
import './custom_commands/login'
import './custom_commands/logout'
import "cypress-real-events";
import 'cypress-real-events'

// prevents blocking test by uncaught exception. This should be commented out when BC-2711 is resolved
Cypress.on('uncaught:exception', (err, runnable) => {
Expand All @@ -28,7 +28,7 @@ let data = {
env: {
BRB: '',
NBC: '',
DEFAULT: ''
DBC: ''
},
browser: {
name: '',
Expand All @@ -39,23 +39,23 @@ let data = {
}

before(() => {
cy.exec(`ls cypress/fixtures/test-run-details.json`, { failOnNonZeroExit: false }).then(
result => {
if (result.code === 0) {
return
} else {
cy.writeFile('cypress/fixtures/test-run-details.json', data)
}
cy.exec(`ls cypress/fixtures/test-run-details.json`, {
failOnNonZeroExit: false
}).then(result => {
if (result.code === 0) {
return
} else {
cy.writeFile('cypress/fixtures/test-run-details.json', data)
}
)
})
})

after(() => {
cy.readFile('cypress/fixtures/test-run-details.json').then(data => {
const env = Cypress.env()
data.env.BRB = env['BRB']
data.env.NBC = env['NBC']
data.env.DEFAULT = env['DEFAULT']
data.env.DBC = env['DBC']
data.browser.name = Cypress.browser.name
data.browser.version = Cypress.browser.majorVersion
data.platform = Cypress.platform
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class Login_Management {
}

visitLoginPage () {
const instance = 'DEFAULT'
const instance = 'DBC'
cy.session(
instance,
() => {
Expand Down
2 changes: 1 addition & 1 deletion env_variables/template.env.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"env": {
"BRB": "",
"NBC": "",
"DEFAULT": "",
"DBC": "",
"TEACHER_1_BRB_EMAIL": "",
"TEACHER_1_BRB_PASSWORD": "",
"TEACHER_1_BRB_FIRST_NAME": "",
Expand Down
2 changes: 1 addition & 1 deletion reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function generateReport () {
},
{
label: 'Instance 3',
value: browserData.env.DEFAULT
value: browserData.env.DBC
},
{
label: 'Execution Time',
Expand Down
2 changes: 1 addition & 1 deletion scripts/aggregate-json-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ if [[ !($workflow_name == *"automatic"* || $workflow_name == *"scheduled"*) ]];
updated_json=$(jq --arg brb "$brb_instance" \
--arg dbc "$dbc_instance" \
--arg nbc "$nbc_instance" \
'.BRB = $brb | .DEFAULT = $dbc | .NBC = $nbc' "$aggregated_json_file")
'.BRB = $brb | .DBC = $dbc | .NBC = $nbc' "$aggregated_json_file")
echo "$updated_json" >"$aggregated_json_file"
fi

0 comments on commit b31864f

Please sign in to comment.