Skip to content

Commit

Permalink
phpcs and cypress fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ifarzana committed Jul 24, 2023
1 parent 6c9c83c commit 0ace2c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cypress/e2e/campaigns.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ describe('Campaigns', function() {

it('delete a campaign and check if the display status is pending', function() {
cy.intercept('/campaign?draw=2&*').as('campaignGridLoad');
cy.intercept('DELETE', '/campaign/*', (req) => {
}).as('deleteCampaign');
cy.visit('/campaign/view');

// Filter for the created campaign
Expand All @@ -143,6 +145,9 @@ describe('Campaigns', function() {
// Delete the campaign
cy.get('.bootbox .save-button').click();

// Wait for the intercepted DELETE request to complete with status 200
cy.wait('@deleteCampaign').its('response.statusCode').should('eq', 200);

// check the display status
cy.displayStatusEquals('List Campaign Display 1', 3).then((res) => {
expect(res.body).to.be.true;
Expand Down
3 changes: 2 additions & 1 deletion lib/Controller/CypressTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ public function displaySetStatus(Request $request, Response $response): Response
// Set display status
$display->mediaInventoryStatus = $status;

$this->store->update('UPDATE `display` SET MediaInventoryStatus = :status, auditingUntil = :auditingUntil WHERE displayId = :displayId', [
$this->store->update('UPDATE `display` SET MediaInventoryStatus = :status, auditingUntil = :auditingUntil
WHERE displayId = :displayId', [
'displayId' => $display->displayId,
'auditingUntil' => Carbon::now()->addSeconds(86400)->format('U'),
'status' => Display::$STATUS_DONE
Expand Down

0 comments on commit 0ace2c8

Please sign in to comment.