-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1571 from NationalSecurityAgency/t#1559/last_repo…
…rted_date T#1559/last reported date
- Loading branch information
Showing
14 changed files
with
138 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -909,32 +909,11 @@ describe('Projects Tests', () => { | |
cy.wait('@getProjects'); | ||
cy.wait('@loadInception'); | ||
|
||
cy.get('[data-cy=projectCreated]').should('be.visible').contains('Today'); | ||
cy.get('[data-cy=projectLastReportedSkill]').should('be.visible').contains('Never'); | ||
|
||
const now = dayjs().utc(); | ||
cy.reportSkill('my_project_123', 1, '[email protected]', now.subtract(1, 'year').format('YYYY-MM-DD HH:mm'), false); | ||
|
||
cy.visit('/administrator/'); | ||
cy.wait('@getProjects'); | ||
cy.wait('@loadInception'); | ||
cy.get('[data-cy=projectCreated]').should('be.visible').contains('Today'); | ||
cy.get('[data-cy=projectLastReportedSkill]').should('be.visible').contains('a year ago'); | ||
|
||
cy.reportSkill('my_project_123', 1, '[email protected]', now.subtract(2, 'months').format('YYYY-MM-DD HH:mm'), false); | ||
cy.visit('/administrator/'); | ||
cy.wait('@getProjects'); | ||
cy.wait('@loadInception'); | ||
cy.get('[data-cy=projectCreated]').should('be.visible').contains('Today'); | ||
cy.get('[data-cy=projectLastReportedSkill]').should('be.visible').contains('2 months ago'); | ||
|
||
cy.reportSkill('my_project_123', 1, '[email protected]', now.subtract(7, 'days').utc().format('YYYY-MM-DD HH:mm'), false); | ||
|
||
cy.visit('/administrator/'); | ||
cy.wait('@getProjects'); | ||
cy.wait('@loadInception'); | ||
cy.get('[data-cy=projectCreated]').should('be.visible').contains('Today'); | ||
cy.get('[data-cy=projectLastReportedSkill]').should('be.visible').contains('7 days ago'); | ||
cy.get('[data-cy=projectCreated]') | ||
.should('be.visible') | ||
.contains('Today'); | ||
cy.get('[data-cy=projectLastReportedSkill]') | ||
.should('not.exist'); | ||
}); | ||
|
||
it('Created and Last Reported Skill data should be visible on project page', () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
service/src/main/java/skills/controller/result/model/LatestEvent.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Copyright 2020 SkillTree | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package skills.controller.result.model | ||
|
||
class LatestEvent { | ||
Date lastReportedSkillDate | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters