Skip to content
New issue

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

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

Already on GitHub? # to your account

[Integration] changeUserProject helper function, candidate_profile tests #6912

Merged

Conversation

AlexandraLivadas
Copy link
Contributor

I added 2 helper functions, changeProject and resetProject, to the LorisIntegrationTest.class.inc class. These will allow us to test project permissions on modules.

I also added initial integration tests for the candidate_profilemodule, including a project permission test.

Testing instructions

  1. Check Travis or run npm run tests:integration -- --filter CandidateProfileIntegrationTest

Link to related issue

@AlexandraLivadas AlexandraLivadas added Testing PR contains test plan or automated test code (or config files for Travis) Proposal PR or Issue suggesting an improvement that can be accepted, rejected or altered labels Aug 13, 2020
Copy link
Contributor

@christinerogers christinerogers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did a quick review

modules/candidate_profile/test/candidate_profileTest.php Outdated Show resolved Hide resolved
modules/candidate_profile/test/candidate_profileTest.php Outdated Show resolved Hide resolved
test/integrationtests/LorisIntegrationTest.class.inc Outdated Show resolved Hide resolved
$this->setupPermissions(["data_entry"]);
$this->safeGet($this->url . "/900000/");
$bodyText
= $this->webDriver->findElement(WebDriverBy::cssSelector("body"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
= $this->webDriver->findElement(WebDriverBy::cssSelector("body"))
= $this->safeFindElement(WebDriverBy::cssSelector("body"))

$this->setupPermissions(["data_entry"]);
$this->safeGet($this->url . "/900000/");
$bodyText
= $this->webDriver->findElement(WebDriverBy::cssSelector("body"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
= $this->webDriver->findElement(WebDriverBy::cssSelector("body"))
= $this->safeFindElement(WebDriverBy::cssSelector("body"))

{
$this->safeGet($this->url . "/900000/");
$bodyText
= $this->webDriver->findElement(WebDriverBy::cssSelector("body"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
= $this->webDriver->findElement(WebDriverBy::cssSelector("body"))
= $this->safeFindElement(WebDriverBy::cssSelector("body"))

$bodyText
= $this->webDriver->findElement(WebDriverBy::cssSelector("body"))
->getText();
$this->assertContains("Candidate Profile", $bodyText);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$this->assertContains("Candidate Profile", $bodyText);
$this->assertContains("Candidate Profile 900000", $bodyText);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to make sure the string it not on the dropdown menu.

Copy link
Contributor

@kongtiaowang kongtiaowang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AlexandraLivadas AlexandraLivadas changed the title [Integration] changeProject helper function, candidate_profile tests [Integration] changeUserProject helper function, candidate_profile tests Aug 18, 2020
@spell00
Copy link
Contributor

spell00 commented Aug 19, 2020

I tested it with no problem. LGTM!

@AlexandraLivadas AlexandraLivadas added the Passed Manual Tests PR has undergone proper testing by at least one peer label Aug 19, 2020
@christinerogers
Copy link
Contributor

ready for final review @driusan

( @spell00 please complete your review by marking Approval --given your comments above say you're happy with how it performed when you tested it)

@christinerogers christinerogers removed the Proposal PR or Issue suggesting an improvement that can be accepted, rejected or altered label Aug 24, 2020
Copy link
Contributor

@spell00 spell00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it performed well when I tested it!

@driusan driusan merged commit b135444 into aces:main Aug 25, 2020
zaliqarosli pushed a commit to zaliqarosli/Loris that referenced this pull request Sep 3, 2020
…sts (aces#6912)

Add 2 helper functions, changeProject and resetProject, to the LorisIntegrationTest.class.inc class. These will allow us to test project permissions on modules.

Also added initial integration tests for the candidate_profile module, including a project permission test.

    Resolves aces#6911
@ridz1208 ridz1208 added this to the 24.0.0 milestone Nov 27, 2020
AlexandraLivadas added a commit to AlexandraLivadas/Loris that referenced this pull request Jun 29, 2021
…sts (aces#6912)

Add 2 helper functions, changeProject and resetProject, to the LorisIntegrationTest.class.inc class. These will allow us to test project permissions on modules.

Also added initial integration tests for the candidate_profile module, including a project permission test.

    Resolves aces#6911
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Passed Manual Tests PR has undergone proper testing by at least one peer Testing PR contains test plan or automated test code (or config files for Travis)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Testing] changeProject helper function for LorisIntegrationTest.class.inc
6 participants