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

change password ingeschakeld #382

Merged
merged 6 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,50 @@ Background:
Given i check my atlas

@myAtlasChecks
Scenario: 01 Check in Atlas the concept Course
Scenario: Check in Atlas the concept Course
When i check the 'Concept' 'course'
Then the result should be 200

Scenario: 02 Check in Atlas the concept Student
Scenario: Check in Atlas the concept Student
When i check the 'Concept' 'student'
Then the result should be 200

Scenario: 03 Check in Atlas the concept Module
Scenario: Check in Atlas the concept Module
When i check the 'Concept' 'module'
Then the result should be 200

Scenario: 04 Check in Atlas the concept SESSION
Scenario: Check in Atlas the concept SESSION
When i check the 'Concept' 'session'
Then the result should be 200

Scenario: 05 Check in Atlas the concept ONE
Scenario: Check in Atlas the concept ONE
When i check the 'Concept' 'one'
Then the result should be 200

Scenario: 06 Check in Atlas the Rule ModuleEnrollment .TOT takes[Student*Course]
Scenario: Check in Atlas the Rule ModuleEnrollment .TOT takes[Student*Course]
When i check the 'Rule' 'moduleenrollment'
Then the result should be 200

Scenario: 07 Check in Atlas the rule TOT
Scenario: Check in Atlas the rule TOT
When i check the 'Rule' 'tot'
Then the result should be 200

Scenario: 08 Check in Atlas the properties TOT
Scenario: Check in Atlas the properties TOT
When i check the properties tot
Then the result should be 200

Scenario: 09 Check in Atlas the relation Takes
Scenario: Check in Atlas the relation Takes
When i check the 'Relation' 'takes'
Then the result should be 200

Scenario: 10 Check in Atlas the relation IsPartOf
Scenario: Check in Atlas the relation IsPartOf
When i check the 'Relation' 'ispartof'
Then the result should be 200

Scenario: 11 Check in Atlas the relation IsEnrolledFor
Scenario: Check in Atlas the relation IsEnrolledFor
When i check the 'Relation' 'IsEnrolledFor'
Then the result should be 200

Scenario: 12 Check in Atlas the context Enrollment
Scenario: Check in Atlas the context Enrollment
When i check the 'Context' 'Enrollment'
Then the result should be 200
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: Featurelogin
Feature: Logout_login

A short summary of the feature

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#Feature: FeatureMyAccount
#
#A short summary of the feature
#
#@tag1
#Scenario: Wijzig het wachtwoord voor een user
# When i change my wachtwoord
# Then the result is 200
Feature: MyAccount

Change password in my account

@tag1
Scenario: Change the password for a user
Given i go to MyAccount
#When i change my password
Then the RAP result has to be 200
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,4 @@
<PackageReference Include="FluentAssertions" Version="6.2.0" />
</ItemGroup>

<ItemGroup>
<Folder Include="Drivers\" />
<Folder Include="Support\" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

using Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection;
using SpecFlowRAP.Specs.Data;
using System.Text.Json;

namespace SpecFlowRAP.StepDefinitions
{
[Binding]
Expand All @@ -15,10 +19,22 @@ public RAPMyAccountStepDefinitions(FeatureContext featureContext)

// For additional details on SpecFlow hooks see http://go.specflow.org/doc-hooks

[When("i change my wachtwoord")]
public async Task WhenIChangeMyWachtwoord()
[Given("i go to MyAccount")]
public async Task GivenIGoToMyAccount()
{
uriBuilder.Path = string.Join("/", basePath, "SESSION/1/MyAccount");
HttpResponseMessage resp = await Request.requestMessage(client, uriBuilder.Uri.AbsoluteUri);
string body = await resp.Content.ReadAsStringAsync();
Myaccountdata? respons = JsonSerializer.Deserialize<Myaccountdata>(body);
_result = (int)resp.StatusCode;
}


[When("i change my password")]
public async Task WhenIChangeMyPassword()
{
// Het wijzigen van het wachtwoord in RAP werkt niet. De test is ook niet af
// Hiervoor is een ticket aangemaakt. "As a RAP-user, I want to be able to change my password"
string sessionId = _featureContext.Get<string>("PHPsessid");
string pathlocation_pasw = "/Login/" + sessionId + "/Login/" + sessionId + "/Password";
string pathlocation_name = "/Login/" + sessionId + "/Login/" + sessionId + "/Login/property";
Expand All @@ -40,7 +56,13 @@ public async Task WhenIChangeMyWachtwoord()
// Get content of respons just for illustration.
string body = await resp.Content.ReadAsStringAsync();
_result = (int)resp.StatusCode;
}


[Then("the RAP result has to be (.*)")]
public void ThenTheRAPResultHasToBe(int result)
{
_result.Should().Be(result);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@ public async Task WhenICreateMyAccount()
}


[Then("the RAP result has to be (.*)")]
public void ThenTheRAPResultHasToBe(int result)
{
_result.Should().Be(result);
}


[Given("i want to add a new script")]
public async Task ThenIWantToAddANewScript()
{
Expand All @@ -186,7 +179,7 @@ public async Task WhenIAddMyLatestScript()
{
string scriptje = "CONTEXT Enrollment IN ENGLISH\r\nPURPOSE CONTEXT Enrollment\r\n{+ A complete course consists of several modules.\r\nStudents of a course can enroll for any module that is part of the course,\r\n+}\r\n\r\nPATTERN Courses\r\n-- The concepts\r\nCONCEPT Student \"Someone who wants to study at this institute\"\r\nPURPOSE CONCEPT Student\r\n{+We have to know what person studies at this institute, so the system needs to keep track of them.+}\r\nCONCEPT Course \"A complete course that prepares for a diploma\"\r\nPURPOSE CONCEPT Course\r\n{+We have to know what courses there are, so the system needs to keep track of them.+}\r\nCONCEPT Module \"An educational entity with a single exam\"\r\nPURPOSE CONCEPT Module\r\n{+We have to know what modules exist, so the system needs to keep track of them.+}\r\n\r\n-- The relations and the initial population\r\nRELATION takes [Student*Course][TOT]\r\nMEANING \"A student takes a complete course\"\r\n\r\nPOPULATION takes CONTAINS\r\n[ (\"Peter\", \"Management\")\r\n; (\"Susan\", \"Business IT\")\r\n; (\"John\", \"Business IT\")\r\n]\r\n\r\nRELATION isPartOf[Module*Course]\r\nMEANING \"A module part of a complete course\"\r\n\r\nPOPULATION isPartOf[Module*Course] CONTAINS\r\n[ (\"Finance\", \"Management\")\r\n; (\"Business Rules\", \"Business IT\")\r\n; (\"Business Analytics\", \"Business IT\")\r\n; (\"IT-Governance\", \"Business IT\")\r\n; (\"IT-Governance\", \"Management\")\r\n]\r\n\r\nRELATION isEnrolledFor [Student*Module]\r\nMEANING \"Students enroll for each module in the course separately\"\r\n\r\n-- The one rule in this model\r\nRULE ModuleEnrollment: isEnrolledFor |- takes;isPartOf~\r\nMEANING \"A student can enroll for any module that is part of the course the student takes\"\r\nMESSAGE \"Attempt to enroll student(s) for a module that is not part of the student's course.\"\r\nVIOLATION (TXT \"Student \", SRC I, TXT \" enrolled for the module \", TGT I, TXT \" which is not part of the course \", SRC I[Student];takes)\r\nENDPATTERN\r\n\r\nINTERFACE Overview : \"_SESSION\" cRud\r\nBOX <TABS>\r\n [ Students : V[SESSION*Student] cRuD\r\n BOX <TABLE>\r\n [ \"Student\" : I[Student] cRud\r\n , \"Enrolled for\" : isEnrolledFor cRUD\r\n , \"Course\" : takes CRUD\r\n ]\r\n , Course : V[SESSION*Course] cRuD\r\n BOX <TABLE>\r\n [ \"Course\" : I cRud\r\n , \"Modules\" : isPartOf~ CRUD\r\n ]\r\n , Modules : V[SESSION*Module] cRud\r\n BOX <TABLE>\r\n [ \"Modules\" : I cRuD\r\n , \"Course\" : isPartOf cRUd\r\n , \"Students\" : isEnrolledFor~ CRUD\r\n ]\r\n ]\r\n\r\nENDCONTEXT";
//http://localhost/api/v1/resource/Script/Script_8c65c75e-dd99-4e28-a9d3-a6bf33d6c18e/Nieuw_32_script
string scriptId = _featureContext.Get<string>("scriptId");
string? scriptId = _featureContext?.Get<string>("scriptId");

uriBuilder.Path = string.Join("/", basePath, "Script/" + scriptId + "/Nieuw_32_script");
string path = "/Content";
Expand All @@ -198,7 +191,7 @@ public async Task WhenIAddMyLatestScript()
[When("compile my latest script")]
public async Task WhenCompileMyLatestScript()
{
string scriptId = _featureContext.Get<string>("scriptId");
string? scriptId = _featureContext?.Get<string>("scriptId");
uriBuilder.Path = string.Join("/", basePath, "Script/" + scriptId + "/Nieuw_32_script");
string path = "/Actual_32_info/compile/property";
bool value = true;
Expand Down
Loading