Skip to content
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
20 changes: 0 additions & 20 deletions tests/functional/cypress/e2e/v4/projects.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,19 +374,6 @@ describe('To Validate & get projects Activity Callback via API call', function (
expectedStatus: 404,
// No message check because body is empty
},
{
title: 'GET /project-info/{projectSFID} with malformed projectSFID',
method: 'GET',
url: `${claBaseEndpoint}project-info/${badProjectSFID}`,
expectedStatusLocal: 422,
expectedStatusRemote: 422,
expectedCodeLocal: 604,
expectedCodeRemote: 604,
expectedMessageLocal: 'projectSFID in path should be at least 15 chars long',
expectedMessageRemote: 'projectSFID in path should be at least 15 chars long',
expectedMessageContainsLocal: false,
expectedMessageContainsRemote: false,
},

// (Sanity) valid-looking parameters should succeed (or at least get past validation)
{
Expand All @@ -409,13 +396,6 @@ describe('To Validate & get projects Activity Callback via API call', function (
url: `${claBaseEndpoint}project/enabled/${exampleFoundationSFID}`,
expectedStatus: 200,
},
{
title: 'GET /project-info/{projectSFID} with valid projectSFID',
method: 'GET',
url: `${claBaseEndpoint}project-info/${exampleProjectSFID}`,
expectedStatusLocal: 200,
expectedStatusRemote: 200,
},
];

cy.wrap(cases).each((c: any) => {
Expand Down
3 changes: 2 additions & 1 deletion tests/functional/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export function getAPIBaseURL(version) {
export function getXACLHeader() {
const xacl = Cypress.env('XACL');
if (xacl) {
// cy.task('log', `--> using X-ACL ${shortenMiddle(xacl)} from env`);
cy.task('log', `--> using X-ACL ${shortenMiddle(xacl)} from env`);
return {
'X-ACL': xacl,
'X-USERNAME': 'lgryglicki',
Expand Down Expand Up @@ -292,6 +292,7 @@ export function getOAuth2Headers() {

let bearerToken = '';
export function getTokenKey() {
cy.task('log', `--> getting token`);
const envToken = Cypress.env('TOKEN');
if (envToken) {
cy.task('log', `--> getting token from env`);
Expand Down
1 change: 1 addition & 0 deletions tests/functional/utils/run-single-test-local.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# Typical: TOKEN='-' ALL=1 ./utils/run-single-test-local.sh
if [ -z "${TOKEN}" ]
then
export TOKEN="$(cat ./token.secret)"
Expand Down
2 changes: 2 additions & 0 deletions tests/functional/utils/run-single-test-remote.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
# Typical TOKEN='-' XACL='-' ALL=1 ./utils/run-single-test-remote.sh
# Manually: DEBUG=1 xvfb-run -a npx cypress run --env DEBUG=1
if [ -z "${TOKEN}" ]
then
export TOKEN="$(cat ./token.secret)"
Expand Down
4 changes: 4 additions & 0 deletions tests/functional/utils/run-single-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,15 @@ fi
if ( [ ! -z "${TOKEN}" ] && [ ! "${TOKEN}" = "-" ] )
then
ENV_ARGS="${ENV_ARGS:+$ENV_ARGS,}TOKEN=${TOKEN}"
else
unset TOKEN
fi

if ( [ ! -z "${XACL}" ] && [ ! "${XACL}" = "-" ] )
then
ENV_ARGS="${ENV_ARGS:+$ENV_ARGS,}XACL=${XACL}"
else
unset XACL
fi

if [ ! -z "${ENV_ARGS}" ]; then
Expand Down
Loading