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

N21-1095 stop migration #144

Merged
merged 6 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
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
16 changes: 14 additions & 2 deletions cypress/e2e/admin/administrateMigration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,21 @@ Feature: Admin Users - To administrate the Migration process.
When I click on agree migration button
Then I see the migration is active field
Then I see the end migration button
Then I see the migration mandatory switch is not checked

Scenario: Admin toggles ldap sync for school in migration
Then I see the sync during migration switch is visible and not checked
When I toggle the sync during migration switch
Then I see the sync during migration switch is checked

Scenario: Admin ends the migration
Scenario: Admin stops the migration
When I click on end migration button
Then I see the end of migration information title
Then I see the end of migration information text
Then I see the end migration information link href is blog.niedersachsen.cloud/umzug
MBergCap marked this conversation as resolved.
Show resolved Hide resolved
Then I see the end migration confirmation checkbox is unchecked
Then I see the abort button for end of migration conformation
Then I can see the end migration confirmation button is disabled
When I click on the end migration confirmation checkbox
When I click on the end migration confirmation button
Then I see the end migration confirmation button is enabled
When I click on the end migration confirmation button
MBergCap marked this conversation as resolved.
Show resolved Hide resolved
68 changes: 67 additions & 1 deletion cypress/support/pages/admin/pageAdministration.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ class Management {
static #schoolNumberForm = '[data-testid="school-number"]'
static #migrationTextSupportLink = '[data-testid="support-link"]'
static #migrationTextBlogLink = '[data-testid="migration-blog-link"]'
static #endMigrationAbortButton = '[data-testid="disagree-btn"]'
static #endMigrationInformationTitle = '[data-testid="migration-warning-card-title"]'
static #endMigrationInformationText = '[data-testid="migration-warning-card-info-text"]'
static #endMigrationTextBlogLink = '[data-testid="end-warningcard-migration-blog-link"]'
static #migrationMandatorySwitch = '[data-testid="migration-mandatory-switch"]'
static #enableSyncDuringMigrationSwitch = '[data-testid="enable-sync-during-migration-switch"]'


disableTeamsVideoConferenceByAdmin () {
Expand Down Expand Up @@ -332,7 +338,6 @@ class Management {
.click()
}


clickEndMigrationConfirmationCheckbox() {
cy.get(Management.#endMigrationConfirmationCheckbox)
.check( {force: true} )
Expand All @@ -342,5 +347,66 @@ class Management {
cy.get(Management.#endMigrationConfirmationButton)
.click()
}

seeEndMigrationInformationTitle() {
cy.get(Management.#endMigrationInformationTitle)
.should('be.visible');
}

seeEndMigrationInformationText() {
cy.get(Management.#endMigrationInformationText)
.should('be.visible');
}

checkEndMigrationInfoLink() {
cy.get(Management.#endMigrationTextBlogLink)
.should("have.attr", "href", "https://blog.niedersachsen.cloud/umzug")
}

seeEndMigrationConfirmationCheckboxIsUnchecked() {
cy.get(Management.#endMigrationConfirmationCheckbox)
.should('not.be.checked');
}

seeEndMigrationAbortButton(){
cy.get(Management.#endMigrationAbortButton)
.should('be.visible');
}

seeEndMigrationConfirmationButtonIsDisabled(){
cy.get(Management.#endMigrationConfirmationButton)
.should('be.disabled')
}

seeEndMigrationConfirmationButtonIsEnabled(){
cy.get(Management.#endMigrationConfirmationButton)
.should('be.enabled')
}

seeMigrationMandatorySwitch(){
cy.get(Management.#migrationMandatorySwitch)
.should('not.be.checked');
}

seeSyncDuringMigrationSwitchIsNotChecked(){
cy.get(Management.#enableSyncDuringMigrationSwitch)
.should('not.be.checked')
}

seeSyncDuringMigrationSwitchIsChecked(){
cy.get(Management.#enableSyncDuringMigrationSwitch)
.and('be.checked')
}

toggleMigrationMandatorySwitch(){
cy.get(Management.#migrationMandatorySwitch)
.click();
}

toggleSyncDuringMigrationSwitch(){
cy.get(Management.#enableSyncDuringMigrationSwitch)
.click();
}

}
export default Management
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,53 @@ When('I click on the end migration confirmation button', () => {
management.clickEndMigrationConfirmationButton()

});



Then('I see the end of migration information title', () => {
management.seeEndMigrationInformationTitle()
});

Then('I see the end of migration information text', () => {
management.seeEndMigrationInformationText()
});

Then(/^I see the end migration information link href is blog\.niedersachsen\.cloud\/umzug$/, () =>{
management.checkEndMigrationInfoLink()
});

Then('I see the end migration confirmation checkbox is unchecked', () => {
management.seeEndMigrationConfirmationCheckboxIsUnchecked()
});

Then('I see the abort button for end of migration conformation', () => {
management.seeEndMigrationAbortButton()
});

Then('I can see the end migration confirmation button is disabled', () => {
management.seeEndMigrationConfirmationButtonIsDisabled()
});

Then('I see the end migration confirmation button is enabled', () => {
management.seeEndMigrationConfirmationButtonIsEnabled()
});

Then('I see the migration mandatory switch is not checked', () => {
management.seeMigrationMandatorySwitch()
});

Then('I see the sync during migration switch is visible and not checked', () => {
management.seeSyncDuringMigrationSwitchIsNotChecked()
});

Then('I see the sync during migration switch is checked', () => {
management.seeSyncDuringMigrationSwitchIsChecked()
});

When('I toggle the migration mandatory switch', () => {
management.toggleMigrationMandatorySwitch()
});

When('I toggle the sync during migration switch', () => {
management.toggleSyncDuringMigrationSwitch()
});