Esempio n. 1
0
 def test_irisV2_createAudience_stickyList_ExcludePocUsersAndNewUsers(
         self, campaignType, testControlType, listType):
     stickyId = CreateAudience.stickyList(campaignType,
                                          testControlType,
                                          campaignCheck=False,
                                          updateNode=True,
                                          lockNode=True,
                                          stickyInfo={
                                              'excludeUsers': [],
                                              'includeUsers': ':1',
                                          })
     excludeUsers = constant.config[
         'pocUsers'] + CreateAudience.getPocNewUsers(newUsers=True)
     customerCount = list_Calls().getCustomerCountInGVD(stickyId['ID']) - 1
     list = CreateAudience.stickyList(
         campaignType,
         testControlType,
         campaignCheck=False,
         stickyInfo={
             'excludeUsers': excludeUsers,
             'includeUsers': CreateAudience.getPocNewUsers(newUsers=True),
             'groupId': stickyId['ID'],
             'label': stickyId['NAME']
         })
     CreateAudience.waitForGVDToBeUpdated(list['ID'])
     CreateAudienceDBAssertion(list['ID'],
                               list,
                               listType, (customerCount + 2),
                               reachabilityCheck=True,
                               isGVUpdated=True).check()
Esempio n. 2
0
    def irisv2_message_execute_stickyList_particularDate_coupon(
            self, campaignType, testControlType, listType, channel,
            messageInfo):
        includeUsers = constant.config[
            'pocUsers'] + CreateAudience.getPocNewUsers(offset=5)
        approveRespone = AuthorizeMessage.approve(
            campaignType,
            testControlType,
            listType,
            channel,
            messageInfo,
            derivedListInfo={
                'excludeUsers': CreateAudience.getPocNewUsers(newUsers=True),
                'includeUsers': includeUsers,
                'groupId': self.listInfo[0]['gId'],
                'label': self.listInfo[0]['gLabel']
            })
        AuthorizeMessage.assertResponse(approveRespone, 200)

        campaignId = constant.config['node'][campaignType][testControlType][
            'CAMPAIGN']['ID']
        response = constant.config['node'][campaignType][testControlType][
            'LIST'][listType][channel]['MESSAGE'][messageInfo['scheduleType'][
                'type']][messageInfo['offerType']]['RESPONSE']
        payload = constant.config['node'][campaignType][testControlType][
            'LIST'][listType][channel]['MESSAGE'][messageInfo['scheduleType'][
                'type']][messageInfo['offerType']]['PAYLOAD']

        AuthorizeMessageDBAssertion(campaignId, response, payload,
                                    testControlType).check()
    def tests_irisv2_getMessage_create_stickyList_particularDate_points(self, campaignType, testControlType,
                                                                       channel, messageInfo):
        includeUsers = constant.config['pocUsers'] + CreateAudience.getPocNewUsers(newUsers=True)
        CreateMessage.create(campaignType, testControlType, 'ORG_USERS', channel, messageInfo,
                                              derivedListInfo={'excludeUsers': CreateAudience.getPocNewUsers(),
                                                     'includeUsers': includeUsers,
                                                     'groupId': self.listInfo[0]['gId'],
                                                     'label': self.listInfo[0]['gLabel']})
        campaignId = constant.config['node'][campaignType][testControlType]['CAMPAIGN']['ID']
        messageId = constant.config['node'][campaignType][testControlType]['LIST']['ORG_USERS'][channel]['MESSAGE'][
            messageInfo['scheduleType']['type']][messageInfo['offerType']]['RESPONSE']['json']['entity']['id']

        getMessageResponse = GetMessage.getMessageById(campaignId, messageId)
        GetMessage.assertResponse(getMessageResponse, 200)
        CreateMessageDBAssertion(campaignId, messageId, getMessageResponse['json']['entity'],offer=True).check()
Esempio n. 4
0
 def test_irisV2_createAudience_stickyList_newUsers(self, campaignType,
                                                    testControlType,
                                                    listType):
     list = CreateAudience.stickyList(
         campaignType,
         testControlType,
         campaignCheck=False,
         stickyInfo={
             'excludeUsers': CreateAudience.getPocNewUsers(newUsers=True),
             'includeUsers': CreateAudience.getPocNewUsers(newUsers=True)
         })
     CreateAudience.waitForGVDToBeUpdated(list['ID'])
     CreateAudienceDBAssertion(list['ID'],
                               list,
                               listType,
                               2,
                               reachabilityCheck=True).check()
 def irisv2_message_create_stickyList_immediate_coupon(
         self, campaignType, testControlType, channel, messageInfo):
     messageDetails = CreateMessage.create(
         campaignType,
         testControlType,
         'ORG_USERS',
         channel,
         messageInfo,
         derivedListInfo={
             'excludeUsers': CreateAudience.getPocNewUsers(newUsers=True),
             'includeUsers': CreateAudience.getPocNewUsers(offset=3)
         })
     CreateMessage.assertResponse(messageDetails['RESPONSE'], 200)
     CreateMessageDBAssertion(
         constant.config['node'][campaignType][testControlType]['CAMPAIGN']
         ['ID'], messageDetails['RESPONSE']['json']['entity']['id'],
         messageDetails['PAYLOAD']).check()
Esempio n. 6
0
 def test_irisV2_createAudience_stickyList_newUsersAndGroupId(
         self, campaignType, testControlType, listType):
     customerCount = list_Calls().getCustomerCountInGVD(
         self.listInfo[0]['gId'])
     list = CreateAudience.stickyList(
         campaignType,
         testControlType,
         campaignCheck=False,
         stickyInfo={
             'excludeUsers': CreateAudience.getPocNewUsers(newUsers=True),
             'includeUsers': CreateAudience.getPocNewUsers(newUsers=True),
             'groupId': self.listInfo[0]['gId'],
             'label': self.listInfo[0]['gLabel']
         })
     CreateAudience.waitForGVDToBeUpdated(list['ID'])
     CreateAudienceDBAssertion(list['ID'],
                               list,
                               listType, (customerCount + 2),
                               reachabilityCheck=True,
                               isGVUpdated=True).check()
Esempio n. 7
0
 def test_irisV2_createAudience_stickyList_NegativeCase_01(
         self, description, includeUsers, excludeUsers, statusCode,
         errorCode, errorMessage):
     list = CreateAudience.stickyList(
         'LIVE',
         'ORG',
         campaignCheck=False,
         stickyInfo={
             'excludeUsers': CreateAudience.getPocNewUsers() * excludeUsers,
             'includeUsers': constant.config['pocUsers'] * includeUsers
         })
     CreateAudience.assertResponse(list['RESPONSE'], statusCode, errorCode,
                                   errorMessage)
 def irisv2_message_create_stickyList_particularDate_points(
         self, campaignType, testControlType, channel, messageInfo):
     includeUsers = constant.config[
         'pocUsers'] + CreateAudience.getPocNewUsers(offset=8)
     messageDetails = CreateMessage.create(
         campaignType,
         testControlType,
         'ORG_USERS',
         channel,
         messageInfo,
         derivedListInfo={
             'excludeUsers': CreateAudience.getPocNewUsers(newUsers=True),
             'includeUsers': includeUsers,
             'groupId': self.listInfo[0]['gId'],
             'label': self.listInfo[0]['gLabel']
         })
     CreateMessage.assertResponse(messageDetails['RESPONSE'], 200)
     CreateMessageDBAssertion(
         constant.config['node'][campaignType][testControlType]['CAMPAIGN']
         ['ID'],
         messageDetails['RESPONSE']['json']['entity']['id'],
         messageDetails['PAYLOAD'],
         offer=True).check()
Esempio n. 9
0
 def test_irisV2_createAudience_stickyList_NegativeCase_02(
         self, description, popFields, updatePayload, statusCode, errorCode,
         errorMessage):
     stickyData = {
         'excludeUsers': CreateAudience.getPocNewUsers(),
         'includeUsers': constant.config['pocUsers']
     }
     stickyData.update(updatePayload)
     list = CreateAudience.stickyList('LIVE',
                                      'ORG',
                                      campaignCheck=False,
                                      stickyInfo=stickyData,
                                      popFields=popFields)
     CreateAudience.assertResponse(list['RESPONSE'], statusCode, errorCode,
                                   errorMessage)